Skip to content

Commit 8ebed28

Browse files
committed
8261237: remove isClassPathAttributePresent method
Reviewed-by: shade, clanger, redestad, alanb
1 parent 5183d8a commit 8ebed28

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/java.base/share/classes/jdk/internal/vm/VMSupport.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -79,25 +79,6 @@ public static byte[] serializeAgentPropertiesToByteArray() throws IOException {
7979
return serializePropertiesToByteArray(getAgentProperties());
8080
}
8181

82-
/*
83-
* Returns true if the given JAR file has the Class-Path attribute in the
84-
* main section of the JAR manifest. Throws RuntimeException if the given
85-
* path is not a JAR file or some other error occurs.
86-
*/
87-
public static boolean isClassPathAttributePresent(String path) {
88-
try {
89-
Manifest man = (new JarFile(path)).getManifest();
90-
if (man != null) {
91-
if (man.getMainAttributes().getValue(Attributes.Name.CLASS_PATH) != null) {
92-
return true;
93-
}
94-
}
95-
return false;
96-
} catch (IOException ioe) {
97-
throw new RuntimeException(ioe.getMessage());
98-
}
99-
}
100-
10182
/*
10283
* Return the temporary directory that the VM uses for the attach
10384
* and perf data files.

0 commit comments

Comments
 (0)