Skip to content

Conversation

@Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 changed the title avoid falsy catch on mkdirs() avoid false IO catch on mkdirs() May 27, 2025
@Pankraz76
Copy link
Contributor Author

is this any good?

@Pankraz76 Pankraz76 marked this pull request as ready for review May 27, 2025 11:24
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

Thanks. Most comments are the same across the files

@Pankraz76 Pankraz76 force-pushed the avoid-unnecessary-catch-on-mkdirs branch from dd3aa4d to c642b8b Compare May 27, 2025 20:18
Copy link
Contributor Author

@Pankraz76 Pankraz76 left a comment

Choose a reason for hiding this comment

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

will continue/dedicate in

@Pankraz76 Pankraz76 requested a review from elharo May 27, 2025 20:21
@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 28, 2025

Caused by: org.apache.maven.plugin.MojoExecutionException: The following files had format violations:
src/main/java/org/apache/maven/plugin/coreit/CleanMojo.java
@@ -70,7 +70,6 @@
············outputFile·=·new·File(project.getBasedir(),·pathname).getAbsoluteFile();
········}

    -
     ········outputFile.getParentFile().mkdirs();
     ········try·{
     ············outputFile.createNewFile();

Run 'mvn spotless:apply' to fix these violations.

no changed maybe rebase to main helps fix CI.

image

@Pankraz76 Pankraz76 force-pushed the avoid-unnecessary-catch-on-mkdirs branch from c642b8b to 469a8e6 Compare May 28, 2025 09:06
@Pankraz76 Pankraz76 force-pushed the avoid-unnecessary-catch-on-mkdirs branch from 469a8e6 to 6502d96 Compare May 29, 2025 10:17
Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

I see no benefit in this change.

@gnodet gnodet closed this Jun 3, 2025
@Pankraz76
Copy link
Contributor Author

its simply false catch and hindering try-with-resources statement promoting bare overhead.

will give dedicated example. But yes it should be done in combination with autoclosable to have logical unit.

@Pankraz76
Copy link
Contributor Author

I see no benefit in this change.

indeed, not all, as its a mix of:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants