Skip to content

Commit 7cdca67

Browse files
authored
JAVA-38574-Upgrade-core-java-io-6-JDK-21 (#17445)
1 parent ba1748b commit 7cdca67

File tree

1 file changed

+0
-10
lines changed
  • core-java-modules/core-java-io-6/src/main/java/com/baeldung/filewritervsbufferedwriter

1 file changed

+0
-10
lines changed

core-java-modules/core-java-io-6/src/main/java/com/baeldung/filewritervsbufferedwriter/BenchmarkWriters.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,6 @@ public void bufferedWriter100000Writes() {
145145

146146
public static void main(String[] args) throws Exception {
147147
Files.deleteIfExists(Paths.get(FILE_PATH));
148-
149-
// We need to extract the classpath from the class loader before calling JMH
150-
// This is necessary to load org.openjdk.jmh.runner.ForkedMain
151-
URLClassLoader classLoader = (URLClassLoader) BenchmarkWriters.class.getClassLoader();
152-
StringBuilder classpath = new StringBuilder();
153-
for (URL url : classLoader.getURLs()) {
154-
classpath.append(url.getPath()).append(File.pathSeparator);
155-
}
156-
System.setProperty("java.class.path", classpath.toString());
157-
158148
org.openjdk.jmh.Main.main(args);
159149
}
160150
}

0 commit comments

Comments
 (0)