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

Misleading error message when using JarMode Layertools and the source is not an archive #31997

Closed
wants to merge 1 commit into from

Conversation

nilshartmann
Copy link
Contributor

If the source file given to the layertools is not an archive file, the error message says that the file cannot be found. That might be confusing, if the file actually exists but "only" has the wrong suffix.
I think splitting the assertion into two separate ones gives more precise error messages.

Split state assertions to output more explizit error message, if the source file is not an archive. This way it's easier to distinguish whether the file is not there of if it has not supported name suffix.
@pivotal-cla
Copy link

@nilshartmann Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@nilshartmann Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2022
@wilkinsona wilkinsona changed the title Explicit error message in JarMode Layertools if source is not an archive Misleading error message when using JarMode Layertools and the source is not an archive Aug 8, 2022
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 8, 2022
@wilkinsona wilkinsona added this to the 2.6.x milestone Aug 8, 2022
@snicoll snicoll self-assigned this Aug 17, 2022
@snicoll snicoll modified the milestones: 2.6.x, 2.6.11 Aug 17, 2022
snicoll pushed a commit that referenced this pull request Aug 17, 2022
This commit split the existing assertion to provide an explicit error
message if the source file is not an archive.

See gh-31997
@snicoll snicoll closed this in f7fba30 Aug 17, 2022
@snicoll
Copy link
Member

snicoll commented Aug 17, 2022

@nilshartmann thank you for making your first contribution to Spring Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants