Skip to content

Conversation

@MateusJunior7
Copy link

This PR fixes a SpotBugs warning (REC_CATCH_EXCEPTION) in
DescriptorGeneratorMojo.generateIndex(), where a generic catch (Exception)
block was used even though the code only throws IOException.

The catch block was narrowed to IOException, improving clarity and preventing
overly broad exception handling.

After the change, the REC warning no longer appears in SpotBugs.

*/
@Parameter
private List<String> mojoDependencies = null;
private final List<String> mojoDependencies = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

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

It can not be a final ... Maven need a possibility to set this filed during plugin configuration

@Bukama Bukama changed the title Narrow caught exception type in generateIndex() to fix REC_CATCH_EXCEPTION Fixing several spotbugs warnings Nov 29, 2025
@Bukama
Copy link
Contributor

Bukama commented Nov 29, 2025

@MateusJunior7 Hi, as every PR you created includes the previous commits I closed the older ones, as this here contains all things you changed. I changed the title, but not sure if you want to rename it. Also see the requested change by @slawekjaranowski

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