Merge branch 'pr-1837'
This commit is contained in:
@ -139,6 +139,7 @@ CPD also parses raw string literals now correctly (see [#1784](https://github.co
|
||||
* [#1820](https://github.com/pmd/pmd/pull/1820): \[cpp] \[cpd] Improve support for raw string literals - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#1821](https://github.com/pmd/pmd/pull/1821): \[matlab] \[cpd] Matlab question mark token - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#1822](https://github.com/pmd/pmd/pull/1822): \[matlab] \[cpd] Double quoted string - [Maikel Steneker](https://github.com/maikelsteneker)
|
||||
* [#1837](https://github.com/pmd/pmd/pull/1837): \[core] Minor performance improvements - [Michael Hausegger](https://github.com/TheRealHaui)
|
||||
* [#1840](https://github.com/pmd/pmd/pull/1840): \[java] Whitelist serialPersistentFields - [Marcel Härle](https://github.com/marcelhaerle)
|
||||
|
||||
{% endtocmaker %}
|
||||
|
@ -421,7 +421,7 @@ public class GUI implements CPDListener {
|
||||
ignoreAnnotationsCheckbox.setEnabled(current.canIgnoreAnnotations());
|
||||
ignoreUsingsCheckbox.setEnabled(current.canIgnoreUsings());
|
||||
extensionField.setText(current.extensions()[0]);
|
||||
boolean enableExtension = current.extensions()[0].length() == 0;
|
||||
boolean enableExtension = current.extensions()[0].isEmpty();
|
||||
extensionField.setEnabled(enableExtension);
|
||||
extensionLabel.setEnabled(enableExtension);
|
||||
}
|
||||
@ -611,7 +611,7 @@ public class GUI implements CPDListener {
|
||||
private boolean isLegalPath(String path, LanguageConfig config) {
|
||||
String[] extensions = config.extensions();
|
||||
for (int i = 0; i < extensions.length; i++) {
|
||||
if (path.endsWith(extensions[i]) && extensions[i].length() > 0) {
|
||||
if (path.endsWith(extensions[i]) && !extensions[i].isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ public class Designer implements ClipboardOwner {
|
||||
}
|
||||
|
||||
private String getXmlTreeCode() {
|
||||
if (codeEditorPane.getText() != null && codeEditorPane.getText().trim().length() > 0) {
|
||||
if (codeEditorPane.getText() != null && !codeEditorPane.getText().trim().isEmpty()) {
|
||||
Node cu = getCompilationUnit();
|
||||
return getXmlTreeCode(cu);
|
||||
}
|
||||
|
Reference in New Issue
Block a user