Skip to content

Commit d0bfb8e

Browse files
author
Jason Faust
committed
Small changes to truth checks
Changes to compile with strict version of NPE checks enabled under ecj/tycho.
1 parent 61f4dde commit d0bfb8e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/PMDPreferencePage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public void widgetSelected(SelectionEvent event) {
574574
flContinue = input.open() == InputDialog.OK;
575575
}
576576

577-
if (flContinue) {
577+
if (flContinue && input != null) {
578578
ruleSet = RuleSetUtil.setNameDescription(ruleSet,
579579
getFileNameWithoutExtension(file.getName()), input.getValue());
580580
OutputStream out = new FileOutputStream(fileName);

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br/RuleTableManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ private void exportTo(String fileName, Shell shell) throws FileNotFoundException
398398
flContinue = input.open() == Window.OK;
399399
}
400400

401-
if (flContinue) {
401+
if (flContinue && input != null) {
402402
OutputStream out = null;
403403
try {
404404
ruleSet = RuleSetUtil.setNameDescription(ruleSet, FileUtil.getFileNameWithoutExtension(file.getName()),

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/panelmanagers/RulePanelManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private void showLanguageVersionFields(Language language) {
146146
minLanguageVersionCombo.setVisible(hasVersions);
147147
maxLanguageVersionCombo.setVisible(hasVersions);
148148

149-
if (hasVersions) {
149+
if (hasVersions && language != null) {
150150
List<LanguageVersion> versions = new ArrayList<LanguageVersion>();
151151
versions.add(null); // allow no selection
152152
versions.addAll(language.getVersions());

0 commit comments

Comments
 (0)