-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
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.