any23
any23 copied to clipboard
ANY23-445 Review spotbugs issues
First pass at addressing https://issues.apache.org/jira/browse/ANY23-445. Still loads to do.
Current branch results in following errors
[INFO] --- spotbugs-maven-plugin:3.1.12.2:check (default-cli) @ apache-any23-api ---
[INFO] BugInstance size is 2
[INFO] Error size is 0
[INFO] Total bugs: 2
[ERROR] org.apache.any23.mime.MIMEType defines compareTo(MIMEType) and uses Object.equals() [org.apache.any23.mime.MIMEType] At MIMEType.java:[line 134] EQ_COMPARETO_USE_OBJECT_EQUALS
[ERROR] Possible null pointer dereference in org.apache.any23.plugin.Any23PluginManager.loadJARDir(File) due to return value of called method [org.apache.any23.plugin.Any23PluginManager, org.apache.any23.plugin.Any23PluginManager] Dereferenced at Any23PluginManager.java:[line 201]Known null at Any23PluginManager.java:[line 201] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
@HansBrende if you get a chance can you review. You can run spotbugs analysis as follows
mvn spotbugs:check
You can also get detailed information by running
mvn clean install -DskipTests && mvn spotbugs:gui
You can then load the file in ./api/target/spotbugsXml.xml
@HansBrende do you have any issue with us pushing this off to the 2.5 development drive? This has blocked the 2.4 release for months and I don't really have the time to invest in addressing it right now. Thanks
@lewismc I can potentially do a quick fix-up on this PR this weekend when I get a chance, and then we should be good to go.