Today I updated ruleset for SLF4J. There is no enhancement but many fixing.
ruleset for SLF4Jを更新しました。バグ修正が主な変更となっています。
The biggest fix is avoiding NullPointerException. Sometimes ASTClassOrInterfaceType#getType() returns null, so we have to use #getImage() to know the type of Field. I used testExcludes option of maven-compiler-plugin to test in this situation.
最大の変更点はNullPointerExceptionの回避です。状況によってASTClassOrInterfaceType#getType()がnullを返すことがあるので、フィールドの型などを確認する際は代わりに#getImage()を使ってやる必要がありました。なお単体テストでこの状況を再現するためにmaven-compiler-pluginのtestExcludesオプションを使用しています。
You can see code coverages at CloudBees.
カバレッジはCloudBeesからご確認いただけます。