Skip to content

Commit 6a866dd

Browse files
committed
Merge branch 'pr-63'
2 parents 61f4dde + 5204f9b commit 6a866dd

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

ReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Eclipse Update Site:
2727
* [#53](https://github.com/pmd/pmd-eclipse-plugin/pull/53): README: markdown, fix links - [Lars Hvam](https://github.com/larshp)
2828
* [#60](https://github.com/pmd/pmd-eclipse-plugin/pull/60): Update to PMD 6.7.0 - [Jan](https://github.com/jgerken)
2929
* [#61](https://github.com/pmd/pmd-eclipse-plugin/pull/61): Support Eclipse SimRel 2018-09 - [jftsunami](https://github.com/jftsunami)
30+
* [#63](https://github.com/pmd/pmd-eclipse-plugin/pull/63): Minor changes - [jftsunami](https://github.com/jftsunami)
3031

3132

3233
## 01-August-2018: 4.0.17.v20180801-1551

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());

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/properties/PMDProjectPropertyPage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import java.util.Comparator;
4343
import java.util.List;
4444

45+
import org.apache.commons.lang3.StringUtils;
4546
import org.apache.log4j.Logger;
4647
import org.eclipse.core.resources.IProject;
4748
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -414,7 +415,7 @@ public void widgetSelected(SelectionEvent e) {
414415
files.add(buf.toString());
415416
}
416417
if (path != null) {
417-
ruleSetFileText.setText(String.join(",", files));
418+
ruleSetFileText.setText(StringUtils.join(files, ","));
418419
}
419420
}
420421
});

0 commit comments

Comments
 (0)