8297682: Use Collections.emptyIterator where applicable
Reviewed-by: stsypanov, alanb, jpai
This commit is contained in:
parent
f36e144923
commit
85f9b37d71
src
java.base/unix/classes/sun/nio/fs
jdk.compiler/share/classes/com/sun/tools/javac/processing
@ -189,8 +189,7 @@ abstract class UnixFileSystem
|
||||
sm.checkRead(rootDirectory.toString());
|
||||
return allowedList.iterator();
|
||||
} catch (SecurityException x) {
|
||||
List<Path> disallowed = Collections.emptyList();
|
||||
return disallowed.iterator();
|
||||
return Collections.emptyIterator(); //disallowed
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -383,8 +383,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
|
||||
handleException(key, e);
|
||||
}
|
||||
|
||||
java.util.List<Processor> pl = Collections.emptyList();
|
||||
return pl.iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user