Skip to content

Commit 7ade1db

Browse files
Phillip KrallPhillip Krall
authored andcommitted
code clean up
1 parent 7d5dfe8 commit 7ade1db

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,16 @@ public void widgetSelected(SelectionEvent e) {
403403
// TODO EMF's ResourceDialog would be better.
404404
FileDialog fileDialog = new FileDialog(getShell(), SWT.MULTI);
405405
String path = fileDialog.open();
406-
List<String> files = new ArrayList();
407-
String[] names = fileDialog.getFileNames();
408-
for (int i = 0, n = names.length; i < n; i++) {
406+
List<String> files = new ArrayList<>();
407+
String[] names = fileDialog.getFileNames();
408+
for (int i = 0, n = names.length; i < n; i++) {
409409
StringBuffer buf = new StringBuffer(fileDialog.getFilterPath());
410-
if (buf.charAt(buf.length() - 1) != File.separatorChar)
411-
buf.append(File.separatorChar);
410+
if (buf.charAt(buf.length() - 1) != File.separatorChar) {
411+
buf.append(File.separatorChar);
412+
}
412413
buf.append(names[i]);
413414
files.add(buf.toString());
414-
}
415+
}
415416
if (path != null) {
416417
ruleSetFileText.setText(String.join(",", files));
417418
}

0 commit comments

Comments
 (0)