Skip to content

Commit

Permalink
Temporary NPE suppression to hide #127 until it's fixed in CheckStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
jshiell committed Jul 28, 2015
1 parent aa18c9e commit 846429d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
32 changes: 16 additions & 16 deletions CheckStyle-IDEA.ipr
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="active-configuration" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-127a-checks.xml:Issue 127" />
<entry key="active-configuration" value="LOCAL_FILE:$PRJ_DIR$/test-configs/yazino-checkstyle-rules.xml:Yazino" />
<entry key="check-nonjava-files" value="false" />
<entry key="check-test-classes" value="false" />
<entry key="location-0" value="LOCAL_FILE:$PRJ_DIR$/test-configs/amigo-cs5.0.xml:A2" />
<entry key="location-1" value="LOCAL_FILE:$PRJ_DIR$/test-configs/amigo-cs5.0.xml:Amigo" />
<entry key="location-10" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-127a-checks.xml:Issue 127" />
<entry key="location-11" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-164/checkstyle.xml:Issue 164" />
<entry key="location-2" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-98.xml:Issue 98" />
<entry key="location-3" value="LOCAL_FILE:$PRJ_DIR$/test-configs/testy.jar!/yazino-checkstyle-rules.xml:JAR test" />
<entry key="location-4" value="LOCAL_FILE:$PRJ_DIR$/test-configs/man-checkstyle.xml:Man" />
<entry key="location-5" value="LOCAL_FILE:$PRJ_DIR$/test-configs/man-checkstyle.xml:Man2" />
<entry key="location-6" value="LOCAL_FILE:$PRJ_DIR$/test-configs/sonar.xml:Sonar" />
<entry key="location-7" value="CLASSPATH:/sun_checks.xml:The default CheckStyle rules" />
<entry key="location-8" value="LOCAL_FILE:$PRJ_DIR$/test-configs/checkstyle-with-header.xml:With header" />
<entry key="location-9" value="LOCAL_FILE:$PRJ_DIR$/test-configs/yazino-checkstyle-rules.xml:Yazino" />
<entry key="property-10.checkstyle.suppressions.file" value="issue-127a-suppressions.xml" />
<entry key="property-11.checkstyle.suppressions.file" value="$PROJECT_DIR$/test-configs/yazino-checkstyle-suppressions.xml" />
<entry key="property-2.samedir" value="" />
<entry key="property-3.checkstyle.suppressions.file" value="yazino-checkstyle-suppressions.xml" />
<entry key="property-9.checkstyle.suppressions.file" value="$PROJECT_DIR$/test-configs/yazino-checkstyle-suppressions.xml" />
<entry key="location-10" value="LOCAL_FILE:$PRJ_DIR$/test-configs/sonar.xml:Sonar" />
<entry key="location-11" value="CLASSPATH:/sun_checks.xml:The default CheckStyle rules" />
<entry key="location-2" value="LOCAL_FILE:$PRJ_DIR$/test-configs/checkstyle-with-header.xml:With header" />
<entry key="location-3" value="LOCAL_FILE:$PRJ_DIR$/test-configs/yazino-checkstyle-rules.xml:Yazino" />
<entry key="location-4" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-127a-checks.xml:Issue 127" />
<entry key="location-5" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-164/checkstyle.xml:Issue 164" />
<entry key="location-6" value="LOCAL_FILE:$PRJ_DIR$/test-configs/issue-98.xml:Issue 98" />
<entry key="location-7" value="LOCAL_FILE:$PRJ_DIR$/test-configs/testy.jar!/yazino-checkstyle-rules.xml:JAR test" />
<entry key="location-8" value="LOCAL_FILE:$PRJ_DIR$/test-configs/man-checkstyle.xml:Man" />
<entry key="location-9" value="LOCAL_FILE:$PRJ_DIR$/test-configs/man-checkstyle.xml:Man2" />
<entry key="property-3.checkstyle.suppressions.file" value="$PROJECT_DIR$/test-configs/yazino-checkstyle-suppressions.xml" />
<entry key="property-4.checkstyle.suppressions.file" value="issue-127a-suppressions.xml" />
<entry key="property-5.checkstyle.suppressions.file" value="$PROJECT_DIR$/test-configs/yazino-checkstyle-suppressions.xml" />
<entry key="property-6.samedir" value="" />
<entry key="property-7.checkstyle.suppressions.file" value="yazino-checkstyle-suppressions.xml" />
<entry key="suppress-errors" value="false" />
<entry key="thirdparty-classpath" value="$PROJECT_DIR$/../Third Party/CreateYourOwnCheckStyleCheck/BlundellCheckstyle/target/blundell-checkstyle-checks-1.0.jar;$PRJ_DIR$/test-configs/issue-164/vdna-checkstyle-2.1.1-SNAPSHOT.jar" />
</map>
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ This code is released under a BSD licence, as specified in the accompanying LICE

## Version History

* **4.17.3** Fixed: Temporary suppression of exception in #127 until it's fixed in CheckStyle.
* **4.17.3** Fixed: Started reducing the embarrassing amount of duplicated code.
* **4.17.2** Fixed: Errors are also now entered in the event log, so they can be read after the balloon popup closes.
* **4.17.2** Fixed: Modernised how notifications are raised.
Expand Down Expand Up @@ -257,11 +258,11 @@ This code is released under a BSD licence, as specified in the accompanying LICE
* **3.1** Improved: Suppression files are now searched for relative to the project if they are not present relative to the config file.
* **3.1** Improved: If a suppression file is not found then it will be ignored and the user will be warned.
* **3.1** Fixed: Concurrency issues. Thanks to Gerhard Radatz.
* 3.0.13- Fixed: File location fixes galore! Thanks to Gerhard Radatz.
* 3.0.13- Fixed: Removing active configuration no longer causes an exception. Thanks to Gerhard Radatz.
* 3.0.12- Fixed: Inspection ID now correctly conforms to rules. Apologies if this breaks inspection config.
* 3.0.11- Improved: Module/Project scans are properly batched and a lot faster. Progress feedback is more limited, however.
* 3.0.10- Fixed: Partial property detection. Thanks to LightGuard.JP.
* **3.0.13** Fixed: File location fixes galore! Thanks to Gerhard Radatz.
* **3.0.13** Fixed: Removing active configuration no longer causes an exception. Thanks to Gerhard Radatz.
* **3.0.12** Fixed: Inspection ID now correctly conforms to rules. Apologies if this breaks inspection config.
* **3.0.11** Improved: Module/Project scans are properly batched and a lot faster. Progress feedback is more limited, however.
* **3.0.10** Fixed: Partial property detection. Thanks to LightGuard.JP.
* **3.0.9** Fixed: Cache sychronisation problem.
* **3.0.8** Fixed: Null property in configuration hash-table resulting in NPE.
* **3.0.7** Fixed: Module scan results are no longer shared between files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public ProblemDescriptor[] checkFile(@NotNull final PsiFile psiFile,
.map(results -> asProblemDescriptors(results, manager))
.orElseGet(Collections::emptyList));

} catch (NullPointerException e) { // temp fix for 127, until it's fixed in CS
LOG.warn("NPE suppressed when scanning: " + psiFile.getName(), e);
return NO_PROBLEMS_FOUND;

} catch (ProcessCanceledException | AssertionError e) {
LOG.warn("Process cancelled when scanning: " + psiFile.getName());
return NO_PROBLEMS_FOUND;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<change-notes>
<![CDATA[
<ul>
<li>4.17.3: Fixed: Temporary suppression of exception in #127 until it's fixed in CheckStyle.</li>
<li>4.17.3: Fixed: Started reducing the embarrassing amount of duplicated code.</li>
<li>4.17.2: Fixed: Errors are also now entered in the event log, so they can be read after the balloon popup closes.</li>
<li>4.17.2: Fixed: Modernised how notifications are raised.</li>
Expand Down

0 comments on commit 846429d

Please sign in to comment.