Merge
authorjiangli
Wed, 05 Apr 2017 22:48:35 +0000
changeset 46366 b9a1aa504eb5
parent 46364 00a21c0ff97e (current diff)
parent 46365 d79745f72ae6 (diff)
child 46368 da05330bbc7b
child 46369 3bf4544bec14
child 46371 0337d0617e7b
child 46373 e8e9b36783f3
Merge
--- a/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.cpp	Wed Apr 05 13:15:44 2017 -0700
+++ b/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.cpp	Wed Apr 05 22:48:35 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,9 +83,6 @@
   case NON_EXIST:
     out->print("Expecting that %s does not exist", path);
     break;
-  case REQUIRED:
-    out->print("Expecting that file %s must exist and is not altered", path);
-    break;
   default:
     ShouldNotReachHere();
   }
@@ -130,37 +127,13 @@
       return fail("[BOOT classpath mismatch, actual =", Arguments::get_sysclasspath());
     }
     break;
-  case NON_EXIST: // fall-through
-  case REQUIRED:
+  case NON_EXIST:
     {
       struct stat st;
-      if (os::stat(path, &st) != 0) {
-        // The file does not actually exist
-        if (type == REQUIRED) {
-          // but we require it to exist -> fail
-          return fail("Required file doesn't exist");
-        }
-      } else {
+      if (os::stat(path, &st) == 0) {
         // The file actually exists
-        if (type == NON_EXIST) {
-          // But we want it to not exist -> fail
-          return fail("File must not exist");
-        }
-        if ((st.st_mode & S_IFMT) != S_IFREG) {
-          return fail("Did not get a regular file as expected.");
-        }
-        time_t    timestamp;
-        long      filesize;
-
-        if (!read_time(&timestamp) || !read_long(&filesize)) {
-          return fail("Corrupted archive file header");
-        }
-        if (timestamp != st.st_mtime) {
-          return fail("Timestamp mismatch");
-        }
-        if (filesize != st.st_size) {
-          return fail("File size mismatch");
-        }
+        // But we want it to not exist -> fail
+        return fail("File must not exist");
       }
     }
     break;
--- a/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.hpp	Wed Apr 05 13:15:44 2017 -0700
+++ b/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.hpp	Wed Apr 05 22:48:35 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -128,15 +128,13 @@
 
   enum {
     BOOT      = 1,
-    NON_EXIST = 2,
-    REQUIRED  = 3
+    NON_EXIST = 2
   };
 
   virtual const char* type_name(int type) {
     switch (type) {
     case BOOT:      return "BOOT";
     case NON_EXIST: return "NON_EXIST";
-    case REQUIRED:  return "REQUIRED";
     default:        ShouldNotReachHere(); return "?";
     }
   }