< prev index next >

src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java

Print this page
rev 54573 : 8222532: (zipfs) Performance regression when writing ZipFileSystem entries in parallel
Reviewed-by: TBD

@@ -674,11 +674,11 @@
         throw new UnsupportedOperationException();
     }
 
     @Override
     public Iterator<Path> iterator() {
-        return new Iterator<Path>() {
+        return new Iterator<>() {
             private int i = 0;
 
             @Override
             public boolean hasNext() {
                 return (i < getNameCount());

@@ -744,12 +744,12 @@
     }
 
     void setAttribute(String attribute, Object value, LinkOption... options)
         throws IOException
     {
-        String type = null;
-        String attr = null;
+        String type;
+        String attr;
         int colonPos = attribute.indexOf(':');
         if (colonPos == -1) {
             type = "basic";
             attr = attribute;
         } else {

@@ -770,12 +770,12 @@
 
     Map<String, Object> readAttributes(String attributes, LinkOption... options)
         throws IOException
 
     {
-        String view = null;
-        String attrs = null;
+        String view;
+        String attrs;
         int colonPos = attributes.indexOf(':');
         if (colonPos == -1) {
             view = "basic";
             attrs = attributes;
         } else {
< prev index next >