Skip to content
Permalink
Browse files
8261237: remove isClassPathAttributePresent method
Reviewed-by: shade, clanger, redestad, alanb
  • Loading branch information
MBaesken committed Feb 9, 2021
1 parent 5183d8a commit 8ebed28403afa1fae2505a1937694c90d27c6d6b
Showing with 1 addition and 20 deletions.
  1. +1 −20 src/java.base/share/classes/jdk/internal/vm/VMSupport.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@@ -79,25 +79,6 @@ public static synchronized Properties getAgentProperties() {
return serializePropertiesToByteArray(getAgentProperties());
}

/*
* Returns true if the given JAR file has the Class-Path attribute in the
* main section of the JAR manifest. Throws RuntimeException if the given
* path is not a JAR file or some other error occurs.
*/
public static boolean isClassPathAttributePresent(String path) {
try {
Manifest man = (new JarFile(path)).getManifest();
if (man != null) {
if (man.getMainAttributes().getValue(Attributes.Name.CLASS_PATH) != null) {
return true;
}
}
return false;
} catch (IOException ioe) {
throw new RuntimeException(ioe.getMessage());
}
}

/*
* Return the temporary directory that the VM uses for the attach
* and perf data files.

1 comment on commit 8ebed28

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 8ebed28 Feb 9, 2021

Please sign in to comment.