Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource.isFile() return true when the resource path actually not exists #26707

Closed
drgnchan opened this issue Mar 20, 2021 · 1 comment
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@drgnchan
Copy link
Contributor

drgnchan commented Mar 20, 2021

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 20, 2021
@drgnchan
Copy link
Contributor Author

is this issue associated with #26702

@jhoeller jhoeller self-assigned this Mar 22, 2021
@rstoyanchev rstoyanchev added the in: core Issues in core modules (aop, beans, core, context, expression) label Nov 11, 2021
@bclozel bclozel assigned bclozel and unassigned jhoeller Sep 26, 2022
@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 26, 2022
@bclozel bclozel added this to the 5.3.24 milestone Sep 26, 2022
bclozel added a commit that referenced this issue Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants