Affects: springframework-5.3.5; spring web 5.3.5; spring boot 2.4.4

demo:

@SpringBootApplication
public class ResourcebugApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ResourcebugApplication.class, args);
        Resource notExistsResource = context.getResource("com/example/resourcebug/NotExists.java");
        System.out.println("notExistsResource is file: " + notExistsResource.isFile());
    }
}

output: notExistsResource is file: true

expected output: notExistsResource is file: false

Comment From: drgnchan

is this issue associated with #26702