diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 99ae0f7406..7e404f91f4 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -16,7 +16,7 @@ jobs: uses: pmd/pmd-github-action@v2.0.0 id: pmd with: - version: '7.18.0' + version: '7.19.0' rulesets: 'ddk-configuration/pmd/ruleset.xml' analyzeModifiedFilesOnly: false - name: Fail build if there are violations diff --git a/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidator.java b/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidator.java index d589396e03..ea1109f5eb 100644 --- a/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidator.java +++ b/com.avaloq.tools.ddk.checkcfg.core/src/com/avaloq/tools/ddk/checkcfg/validation/CheckCfgValidator.java @@ -87,7 +87,7 @@ public Set getTypeConformanceCheckedReferences() { */ @Check public void checkDisabledCheckIsNotConfigured(final ConfiguredCheck configuredCheck) { - if (configuredCheck.getSeverity().equals(SeverityKind.IGNORE) && isParameterConfigured(configuredCheck)) { + if (configuredCheck.getSeverity() == SeverityKind.IGNORE && isParameterConfigured(configuredCheck)) { warning(Messages.CheckCfgJavaValidator_DISABLED_CHECK_NOT_CONFIGURED, CheckcfgPackage.Literals.CONFIGURABLE_SECTION__PARAMETER_CONFIGURATIONS, IssueCodes.DISABLED_CHECK_NOT_CONFIGURED); } } diff --git a/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/outline/CheckCfgOutlineTreeProvider.java b/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/outline/CheckCfgOutlineTreeProvider.java index b70ad926db..fe9632aed6 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/outline/CheckCfgOutlineTreeProvider.java +++ b/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/outline/CheckCfgOutlineTreeProvider.java @@ -80,7 +80,7 @@ protected Object _text(final ConfiguredCheck configuredCheck) { // Unresolved reference ruleText = new StyledString("", // stylerFactory.createXtextStyleAdapterStyler(semanticHighlightingConfiguration.errorTextStyle())); - } else if (configuredCheck.getSeverity().equals(SeverityKind.IGNORE)) { + } else if (configuredCheck.getSeverity() == SeverityKind.IGNORE) { // Disabled ruleText = new StyledString(safeName(configuredCheck.getCheck().getLabel()), // stylerFactory.createXtextStyleAdapterStyler(semanticHighlightingConfiguration.disabledValue())); diff --git a/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/syntaxcoloring/SemanticHighlightingCalculator.java b/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/syntaxcoloring/SemanticHighlightingCalculator.java index 9f8728ad3e..1e579e8f6d 100644 --- a/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/syntaxcoloring/SemanticHighlightingCalculator.java +++ b/com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/syntaxcoloring/SemanticHighlightingCalculator.java @@ -46,7 +46,7 @@ public void provideHighlightingFor(final XtextResource resource, final IHighligh while (iter.hasNext()) { EObject current = iter.next(); - if (current instanceof ConfiguredCheck && ((ConfiguredCheck) current).getSeverity().equals(SeverityKind.IGNORE)) { + if (current instanceof ConfiguredCheck check && check.getSeverity() == SeverityKind.IGNORE) { INode node = getFirstParseTreeNode(current, CheckcfgPackage.Literals.CONFIGURED_CHECK__CHECK); highlightNode(node, SemanticHighlightingConfiguration.DISABLED_VALUE_ID, acceptor); } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java index af37dc4e7d..d801b1bf69 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestEntityAction.java @@ -37,7 +37,7 @@ public class TestEntityAction { public TestEntityAction(final ITestEntity testEntity, final TestEntityOperation entityAction) { Assert.isNotNull(testEntity, TEST_ENTITY_ARGUMENT); Assert.isNotNull(entityAction, ENTITY_ACTION_ARGUMENT); - if (entityAction.equals(TestEntityOperation.DISPOSE)) { + if (entityAction == TestEntityOperation.DISPOSE) { testEntity.dispose(); } this.testEntity = testEntity; diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedFormattingConfigBasedStream.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedFormattingConfigBasedStream.java index bd574cc653..b3d19092e0 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedFormattingConfigBasedStream.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedFormattingConfigBasedStream.java @@ -141,7 +141,7 @@ private void handleNoFormatLocators(final Set locators) { for (ElementLocator locator : locators) { if (locator instanceof NoFormatLocator) { if (!this.noFormatLocators.remove(locator)) { - if (locator.getType().equals(LocatorType.BETWEEN)) { + if (locator.getType() == LocatorType.BETWEEN) { // In case we are dealing with a 'between' locator we only need to add a NoFormat 'memento'. // In this way we do not format anything until the following element this.noFormatLocators.add(noFormatMemento); diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index ce166e648a..8332f66079 100644 --- a/ddk-parent/pom.xml +++ b/ddk-parent/pom.xml @@ -53,7 +53,7 @@ 4.9.8.2 4.9.8 3.28.0 - 7.18.0 + 7.19.0 5.0.1 2.40.0