-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P5
-
Affects Version/s: None
-
Component/s: core-libs
-
b11
Type of file parameter is known to be Path. And instanceof only checks if it's null or not.
public String implProbeContentType(Path file) throws IOException {
if (!(file instanceof Path))
return null;
Before implProbeContentType method is called, parameter is checked for null in sun.nio.fs.AbstractFileTypeDetector#probeContentType. It means null check is redundant too.
public String implProbeContentType(Path file) throws IOException {
if (!(file instanceof Path))
return null;
Before implProbeContentType method is called, parameter is checked for null in sun.nio.fs.AbstractFileTypeDetector#probeContentType. It means null check is redundant too.