Skip to content

Commit

Permalink
8292140: (fs) Needless instanceof check in RegistryFileTypeDetector
Browse files Browse the repository at this point in the history
Reviewed-by: alanb
  • Loading branch information
Andrey Turbanov committed Aug 11, 2022
1 parent 2ddf728 commit ad5f628
Showing 1 changed file with 2 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,7 +25,7 @@

package sun.nio.fs;

import java.nio.file.*;
import java.nio.file.Path;
import java.io.IOException;

/**
Expand All @@ -41,9 +41,6 @@ public RegistryFileTypeDetector() {

@Override
public String implProbeContentType(Path file) throws IOException {
if (!(file instanceof Path))
return null;

// get file extension
Path name = file.getFileName();
if (name == null)
Expand Down

1 comment on commit ad5f628

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.