< prev index next >

src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java

Print this page

        

@@ -32,11 +32,10 @@
 import java.io.OutputStream;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;

@@ -344,15 +343,15 @@
                 public Void run() {
                     try {
                         int i = name.lastIndexOf('.');
                         Path path;
                         if (i > 0) {
-                            Path dir = Paths.get(name.substring(0, i).replace('.', File.separatorChar));
+                            Path dir = Path.get(name.substring(0, i).replace('.', File.separatorChar));
                             Files.createDirectories(dir);
                             path = dir.resolve(name.substring(i+1, name.length()) + ".class");
                         } else {
-                            path = Paths.get(name + ".class");
+                            path = Path.get(name + ".class");
                         }
                         Files.write(path, classFile);
                         return null;
                     } catch (IOException e) {
                         throw new InternalError(
< prev index next >