From 70f131c7c3d03ef8cb7cb9844569a94f4b6e286d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 13:43:47 +0000 Subject: [PATCH 1/3] chore(deps): bump pmd.version from 7.20.0 to 7.21.0 in /ddk-parent Bumps `pmd.version` from 7.20.0 to 7.21.0. Updates `net.sourceforge.pmd:pmd-core` from 7.20.0 to 7.21.0 - [Release notes](https://github.com/pmd/pmd/releases) - [Commits](https://github.com/pmd/pmd/compare/pmd_releases/7.20.0...pmd_releases/7.21.0) Updates `net.sourceforge.pmd:pmd-java` from 7.20.0 to 7.21.0 - [Release notes](https://github.com/pmd/pmd/releases) - [Commits](https://github.com/pmd/pmd/compare/pmd_releases/7.20.0...pmd_releases/7.21.0) --- updated-dependencies: - dependency-name: net.sourceforge.pmd:pmd-core dependency-version: 7.21.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: net.sourceforge.pmd:pmd-java dependency-version: 7.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- ddk-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index e369d3cea9..1750191a09 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.20.0 + 7.21.0 5.0.2 2.41.0 From b5085e6c8743851aa49b1ce3d01c76637bad7cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Wed, 4 Feb 2026 22:26:09 +0100 Subject: [PATCH 2/3] chore: sync PMD GitHub Action version with Maven plugin Update PMD GitHub Action from 7.19.0 to 7.21.0 to match the version used by the Maven PMD plugin. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 54ebc66dc2..a06dd86785 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.19.0' + version: '7.21.0' rulesets: 'ddk-configuration/pmd/ruleset.xml' analyzeModifiedFilesOnly: false - name: Fail build if there are violations From 5d52bc8955b543f3fc6b78d53149b2079b0e51a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Wed, 4 Feb 2026 20:40:40 +0100 Subject: [PATCH 3/3] fix: resolve PMD 7.21.0 violations PublicMemberInNonPublicType: - Protected inner classes: add @SuppressWarnings where public methods are needed for subclass access in other packages - Private inner classes: change public members to package-private - Package-private classes: change public members to package-private - Externalizable constructors: add @SuppressWarnings (must be public) UnnecessaryCast: - Use pattern matching instanceof (Java 17+) InsufficientStringBufferDeclaration: - Increase StringBuilder initial capacity Co-Authored-By: Claude Opus 4.5 --- .../jvmmodel/InstanceOfCheckOrderer.java | 18 +++++++------- .../issue/AbstractDispatchingCheckImpl.java | 2 ++ .../issue/AbstractStatefulCheckImpl.java | 1 + .../check/runtime/issue/DefaultCheckImpl.java | 6 +++-- .../runtime/issue/DispatchingCheckImpl.java | 2 ++ .../ui/test/util/CheckXtextTestUtil.java | 2 +- .../ui/builder/CheckExtensionGenerator.java | 18 +++++++++----- .../avaloq/tools/ddk/test/core/TestPlan.java | 24 +++++++++---------- .../test/core/junit/runners/SorterUtil.java | 2 +- .../test/ui/test/swtbot/SwtBotRadioTest.java | 2 +- .../ui/junit/runners/TestRunRecording.java | 2 +- .../typesystem/ParameterListMatcherTest.java | 5 ++++ .../ddk/typesystem/AbstractTypeProvider.java | 3 ++- .../typesystem/BuiltInTypeModelAccess.java | 2 +- .../MonitoredClusteringBuilderState.java | 4 ++-- .../ParallelResourceLoader.java | 1 + .../test/export/util/ExportTestUtil.java | 2 +- .../generator/GeneratorSupport.java | 2 +- .../ddk/xtext/expression/generator/Graph.java | 2 +- .../test/format/util/FormatTestUtil.java | 2 +- .../xtext/format/scoping/FormatScopeUtil.java | 4 ++-- .../test/util/GeneratorTestUtil.java | 2 +- .../test/AbstractXtextMarkerBasedTest.java | 7 +++--- .../test/jupiter/AbstractScopingTest.java | 4 ++-- .../test/jupiter/AbstractValidationTest.java | 10 ++++---- .../jupiter/AbstractXtextMarkerBasedTest.java | 7 +++--- .../test/scoping/AbstractScopingTest.java | 4 ++-- .../occurrences/AbstractOccurrencesTest.java | 6 ++--- .../validation/AbstractValidationTest.java | 10 ++++---- .../formatter/util/FormatterTestUtil.java | 2 +- .../jupiter/formatter/FormatterTestUtil.java | 2 +- .../xtext/formatting/ExtendedLineEntry.java | 10 ++++---- .../linking/AbstractFragmentProvider.java | 1 + .../xtext/linking/LazyLinkingResource2.java | 6 ++--- .../QualifiedNameSegmentTreeLookup.java | 20 +++++++++------- .../resource/AbstractFingerprintComputer.java | 1 + .../DirectLinkingEObjectInputStream.java | 4 +++- .../DirectLinkingEObjectOutputStream.java | 2 +- .../DirectLinkingResourceStorageWritable.java | 4 ++-- .../validation/DefaultCheckSequencer.java | 2 +- .../tools/ddk/caching/CacheManager.java | 4 ++-- 41 files changed, 122 insertions(+), 92 deletions(-) diff --git a/com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/jvmmodel/InstanceOfCheckOrderer.java b/com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/jvmmodel/InstanceOfCheckOrderer.java index 6e5695a7ed..b8acf0d820 100644 --- a/com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/jvmmodel/InstanceOfCheckOrderer.java +++ b/com.avaloq.tools.ddk.check.core/src/com/avaloq/tools/ddk/check/jvmmodel/InstanceOfCheckOrderer.java @@ -256,7 +256,7 @@ public Collection getSubTypes(final String parentNode) { * the names of adjacent vertices with outbound edges */ private static record Vertex(Set inbound, Set outbound) { - public boolean isTreeNode() { + boolean isTreeNode() { return inbound().size() <= 1; } } @@ -275,7 +275,7 @@ private static final class Graph implements Forest { * the map * @return the result graph */ - public static Graph fromTypesMap(final Map> typesMap) { + static Graph fromTypesMap(final Map> typesMap) { Graph graph = new Graph(); for (Entry> entry : typesMap.entrySet()) { String toKey = entry.getKey(); @@ -296,7 +296,7 @@ public static Graph fromTypesMap(final Map> typesMap) { * {@link #vertexMap} as lookups of individual vertices do not benefit from that. * For operations that require deterministic order we must sort the keys first. */ - public Graph() { + Graph() { vertexMap = new HashMap<>(); } @@ -305,7 +305,7 @@ public Graph() { * * @return a boolean result */ - public boolean isForest() { + boolean isForest() { return vertexMap.values().stream().allMatch(Vertex::isTreeNode); } @@ -325,7 +325,7 @@ private Vertex makeVertex() { * the key * @return the added or existing vertex */ - public Vertex addVertex(final String key) { + Vertex addVertex(final String key) { return vertexMap.computeIfAbsent(key, x -> makeVertex()); } @@ -339,7 +339,7 @@ public Vertex addVertex(final String key) { * @throws CycleDetectedException * if adding the edge would create a cycle */ - public void addEdgeWithVertices(final String from, final String to) throws CycleDetectedException { + void addEdgeWithVertices(final String from, final String to) throws CycleDetectedException { if (from.equals(to) || isReachable(to, from)) { throw new CycleDetectedException(from, to); } @@ -359,7 +359,7 @@ public void addEdgeWithVertices(final String from, final String to) throws Cycle * @param to * the target vertex */ - public void removeEdge(final String from, final String to) { + void removeEdge(final String from, final String to) { Vertex fromVertex = vertexMap.get(from); Vertex toVertex = vertexMap.get(to); fromVertex.outbound().remove(to); @@ -393,7 +393,7 @@ private void breakDiamondTo(final String toKey) { * Tries to break diamond-structured inheritance hierarchies. * A no-operation if that is not applicable or possible. */ - public void breakDiamonds() { + void breakDiamonds() { List toVertices = vertexMap.entrySet().stream().// filter(entry -> !entry.getValue().isTreeNode()).map(Entry::getKey).sorted().toList(); toVertices.forEach(toKey -> breakDiamondTo(toKey)); @@ -407,7 +407,7 @@ public void breakDiamonds() { * in a mutually exclusive way. As it is we assume that we can leave each problem vertex * under any one of its supertypes, without it ending up excluded from checking. */ - public void forestify() { + void forestify() { List toVertices = vertexMap.entrySet().stream().// filter(entry -> !entry.getValue().isTreeNode()).map(Entry::getKey).sorted().toList(); for (String toKey : toVertices) { diff --git a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractDispatchingCheckImpl.java b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractDispatchingCheckImpl.java index 5678c21fd3..01e668a05d 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractDispatchingCheckImpl.java +++ b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractDispatchingCheckImpl.java @@ -49,6 +49,7 @@ public abstract class AbstractDispatchingCheckImpl extends AbstractCheckImpl { * A tracker for disabled methods. * Concurrent access is allowed. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static class DisabledMethodTracker { private final Map disabled = new ConcurrentHashMap<>(); @@ -145,6 +146,7 @@ protected void handleContextMethodFailure(final String contextName, final EObjec /** * The class holding the current state for a validation method being executed. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public fields needed for subclass access in other packages protected static class State implements ValidationMessageAcceptorMixin, DiagnosticCollector { // CHECKSTYLE:OFF public DiagnosticChain chain; diff --git a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractStatefulCheckImpl.java b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractStatefulCheckImpl.java index c74bd049cb..e3ae93b105 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractStatefulCheckImpl.java +++ b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/AbstractStatefulCheckImpl.java @@ -50,6 +50,7 @@ public ValidationMessageAcceptor getMessageAcceptor() { /** * The class holding the current state for a validation method being executed. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public fields needed for subclass access in other packages protected static class State { // CHECKSTYLE:OFF public DiagnosticChain chain = null; diff --git a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DefaultCheckImpl.java b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DefaultCheckImpl.java index 96caba661f..f4f198d75a 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DefaultCheckImpl.java +++ b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DefaultCheckImpl.java @@ -205,7 +205,7 @@ public int hashCode() { * the parameter class * @return true, if given class is assignable from current method's first formal parameter type */ - public boolean isMatching(final Class param) { + boolean isMatching(final Class param) { return method.getParameterTypes()[0].isAssignableFrom(param); } @@ -216,8 +216,10 @@ public boolean isMatching(final Class param) { * the state * @throws InvocationTargetException * if the method called throws an exception + * @throws IllegalStateException + * if state is already assigned */ - public void invoke(final State state) throws InvocationTargetException { + void invoke(final State state) throws InvocationTargetException { State instanceState = instance.getThreadLocalState().get(); if (instanceState != null && instanceState != state) { throw new IllegalStateException("State is already assigned."); //$NON-NLS-1$ diff --git a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DispatchingCheckImpl.java b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DispatchingCheckImpl.java index fc0a59997b..b16374ba45 100644 --- a/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DispatchingCheckImpl.java +++ b/com.avaloq.tools.ddk.check.runtime.core/src/com/avaloq/tools/ddk/check/runtime/issue/DispatchingCheckImpl.java @@ -46,6 +46,7 @@ public abstract class DispatchingCheckImpl extends AbstractCheckImpl { * A tracker for disabled methods. * Concurrent access is allowed. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static class DisabledMethodTracker { private final Map disabled = new ConcurrentHashMap<>(); @@ -154,6 +155,7 @@ protected void handleContextMethodFailure(final String contextName, final EObjec /** * The class holding the current state for a validation method being executed. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public fields needed for subclass access in other packages protected static class State implements ValidationMessageAcceptorMixin, DiagnosticCollector { // CHECKSTYLE:OFF public DiagnosticChain chain; diff --git a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckXtextTestUtil.java b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckXtextTestUtil.java index 7cd624770c..b1e73c5396 100644 --- a/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckXtextTestUtil.java +++ b/com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/util/CheckXtextTestUtil.java @@ -33,7 +33,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final CheckXtextTestUtil INSTANCE = new CheckXtextTestUtil(); - public static CheckXtextTestUtil get() { + static CheckXtextTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/CheckExtensionGenerator.java b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/CheckExtensionGenerator.java index ef3118d530..88f6f5e13d 100644 --- a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/CheckExtensionGenerator.java +++ b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/CheckExtensionGenerator.java @@ -93,9 +93,9 @@ class CheckExtensionGenerator { // CHECKSTYLE:ON private static final Logger LOGGER = LogManager.getLogger(CheckExtensionGenerator.class); - public static final String PREFERENCE_PLUGIN_XML_FILENAME = "PluginXmlFilename"; - public static final String STANDARD_PLUGIN_FILENAME = ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR; - public static final String STANDARD_FRAGMENT_FILENAME = ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR; + static final String PREFERENCE_PLUGIN_XML_FILENAME = "PluginXmlFilename"; + static final String STANDARD_PLUGIN_FILENAME = ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR; + static final String STANDARD_FRAGMENT_FILENAME = ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR; @Inject private CheckProjectHelper projectHelper; @@ -109,6 +109,7 @@ class CheckExtensionGenerator { /** * A plug-in model that can be loaded/saved from a file. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static final class CheckWorkspacePluginModel extends WorkspacePluginModel { private static final long serialVersionUID = 1L; @@ -142,6 +143,7 @@ public IPluginAttribute createAttribute(final IPluginElement element) { /** * A {@code Plugin} that can load/save plugin xml from file other than "plugin.xml". */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static final class CheckPlugin extends Plugin { private static final long serialVersionUID = 1L; @@ -173,6 +175,7 @@ protected void processChild(final Node child) { /** * A {@code PluginExtension} that can be loaded from an xml file. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static final class CheckPluginExtension extends PluginExtension { private static final long serialVersionUID = 1L; @@ -230,6 +233,7 @@ public void checkLoad(final Node node) { /** * A {@code PluginElement} that can be loaded from an xml file. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class CheckPluginElement extends PluginElement { private static final long serialVersionUID = 1L; @@ -334,7 +338,7 @@ void checkLoad(final Node node) { * @throws CoreException * the core exception */ - public void changePluginXmlFile(final IBuildContext context, final Delta delta, final IProgressMonitor monitor) throws CoreException { + void changePluginXmlFile(final IBuildContext context, final Delta delta, final IProgressMonitor monitor) throws CoreException { URI uri = delta.getUri(); CheckCatalog catalog = projectHelper.getCatalog(context, uri); if (catalog == null) { @@ -536,8 +540,10 @@ private void mergeManifest(final CheckCatalog catalog, final IProgressMonitor mo * a modification * @param monitor * progress monitor + * @throws OperationCanceledException + * if the operation was canceled */ - public void modifyModel(final ModelModification modification, final IProgressMonitor monitor) { + void modifyModel(final ModelModification modification, final IProgressMonitor monitor) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } @@ -569,7 +575,7 @@ public void run() { * @throws CoreException * the core exception */ - public void handleCatalogDeletion(final Delta delta, final IProgressMonitor monitor) throws CoreException { + void handleCatalogDeletion(final Delta delta, final IProgressMonitor monitor) throws CoreException { IFile file = getPluginFile(delta.getUri()); if (validPluginFile(file)) { Iterable catalogs = delta.getOld().getExportedObjectsByType(CheckPackage.Literals.CHECK_CATALOG); diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java index 2a9133203e..46698e9e93 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/TestPlan.java @@ -59,7 +59,7 @@ private TestPlan(final List setupSteps, final List t * * @return a new test plan instance, never {@code null} */ - public static TestPlan create() { + static TestPlan create() { return new TestPlan(); } @@ -72,7 +72,7 @@ public static TestPlan create() { * the setup step, must not be {@code null} * @return the newly added {@link AbstractStep}, never {@code null} */ - public T addSetupStep(final T setupStep) { + T addSetupStep(final T setupStep) { Assert.assertTrue("Must not add a setup step after adding a test step.", getCompoundTestStep().getSteps().isEmpty()); //$NON-NLS-1$ getCompoundSetupStep().addStep(setupStep); return setupStep; @@ -87,7 +87,7 @@ public T addSetupStep(final T setupStep) { * the test step, must not be {@code null} * @return the newly added {@link AbstractStep}, never {@code null} */ - public T addTestStep(final T testStep) { + T addTestStep(final T testStep) { getCompoundTestStep().addStep(testStep); return testStep; } @@ -133,7 +133,7 @@ private List getAllTestEntityActions() { * whether a system test plan shall be created * @return test plan containing previous test steps that need to be undone, never {@code null} */ - public static TestPlan createUndoTestPlan(final TestPlan testPlan, final TestPlan previousTestPlan, final boolean systemTest) { + static TestPlan createUndoTestPlan(final TestPlan testPlan, final TestPlan previousTestPlan, final boolean systemTest) { if (systemTest) { // If the current and the previous test are system tests, compute the steps to undo. List setupStepsToUndo = computeStepsToUndo(previousTestPlan.getCompoundSetupStep().getSteps(), testPlan); @@ -157,7 +157,7 @@ public static TestPlan createUndoTestPlan(final TestPlan testPlan, final TestPla * the test plan, must not be {@code null} * @return a set of all steps with previously existing test entities, never {@code null} */ - public static Set getAllStepsWithPreExistingTestEntities(final TestPlan previousTestPlan, final TestPlan testPlan) { + static Set getAllStepsWithPreExistingTestEntities(final TestPlan previousTestPlan, final TestPlan testPlan) { Set stepsWithPreExistingTestEntities = new HashSet(); stepsWithPreExistingTestEntities.addAll(getStepsWithPreExistingEntities(testPlan, previousTestPlan.compoundSetupStep)); stepsWithPreExistingTestEntities.addAll(getStepsWithPreExistingEntities(testPlan, previousTestPlan.compoundTestStep)); @@ -207,7 +207,7 @@ private boolean hasAllTestEntities(final ITestEntityActionProvider step) { * * @return all executed steps, never {@code null} */ - public Set getAllExecutedSteps() { + Set getAllExecutedSteps() { Set executedSteps = new HashSet(); executedSteps.addAll(getCompoundSetupStep().getExecutedSteps()); executedSteps.addAll(getCompoundTestStep().getExecutedSteps()); @@ -223,7 +223,7 @@ public Set getAllExecutedSteps() { * the filter, must not be {@code null} * @return the new filtered test plan, never {@code null} */ - public static TestPlan createFilteredTestPlan(final TestPlan testPlan, final Collection filter) { + static TestPlan createFilteredTestPlan(final TestPlan testPlan, final Collection filter) { List filteredSetupSteps = filterCompoundStep(filter, testPlan.getCompoundSetupStep()); List filteredTestSteps = filterCompoundStep(filter, testPlan.getCompoundTestStep()); return new TestPlan(filteredSetupSteps, filteredTestSteps); @@ -236,7 +236,7 @@ public static TestPlan createFilteredTestPlan(final TestPlan testPlan, final Col * the test plan, must not be {@code null} * @return the test reverse test plan, never {@code null} */ - public static TestPlan createReverseTestPlan(final TestPlan testPlan) { + static TestPlan createReverseTestPlan(final TestPlan testPlan) { List setupSteps = testPlan.getCompoundSetupStep().getSteps(); Collections.reverse(setupSteps); List testSteps = testPlan.getCompoundTestStep().getSteps(); @@ -270,7 +270,7 @@ private static List filterCompoundStep(final Collection setupUndoSteps = getAllUndoSteps(testPlan.getCompoundSetupStep().getSteps()); List testUndoSteps = getAllUndoSteps(testPlan.getCompoundTestStep().getSteps()); return new TestPlan(setupUndoSteps, testUndoSteps); @@ -360,7 +360,7 @@ private boolean hasTestEntity(final TestEntityAction testEntityAction) { * previous test plan, can be {@code null} * @return executable test plan, never {@code null} */ - public static TestPlan createExecutableTestPlan(final TestPlan testPlan, final TestPlan previousTestPlan) { + static TestPlan createExecutableTestPlan(final TestPlan testPlan, final TestPlan previousTestPlan) { final List setupStepsToExecute = Lists.newArrayList(Collections2.filter(testPlan.getCompoundSetupStep().getSteps(), input -> input != null && isStepToExecute(input, previousTestPlan))); return new TestPlan(setupStepsToExecute, testPlan.getCompoundTestStep().getSteps()); @@ -393,7 +393,7 @@ private static boolean isStepToExecute(final AbstractStep setupStep, final TestP * * @return the compound setup step, never {@code null} */ - public CompoundStep getCompoundSetupStep() { + CompoundStep getCompoundSetupStep() { return compoundSetupStep; } @@ -402,7 +402,7 @@ public CompoundStep getCompoundSetupStep() { * * @return the compound test step, never {@code null} */ - public CompoundStep getCompoundTestStep() { + CompoundStep getCompoundTestStep() { return compoundTestStep; } } diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/SorterUtil.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/SorterUtil.java index a44cec1efd..cadcf0679e 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/SorterUtil.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/junit/runners/SorterUtil.java @@ -31,7 +31,7 @@ public final class SorterUtil { private static final class SingletonHolder { private static SorterUtil instance = new SorterUtil(); - public static SorterUtil get() { + static SorterUtil get() { return instance; } } diff --git a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java index a338355ede..6f4846e60a 100644 --- a/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java +++ b/com.avaloq.tools.ddk.test.ui.test/src/com/avaloq/tools/ddk/test/ui/test/swtbot/SwtBotRadioTest.java @@ -50,7 +50,7 @@ enum RadioWidgetInstance { this.text = text; } - public String getText() { + String getText() { return text; } } diff --git a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/junit/runners/TestRunRecording.java b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/junit/runners/TestRunRecording.java index 8f93cee8d2..1627557b3d 100644 --- a/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/junit/runners/TestRunRecording.java +++ b/com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/junit/runners/TestRunRecording.java @@ -443,7 +443,7 @@ private static String getThreadInfo() { Set deadlockedThreads = getDeadlockThreadIds(); ThreadInfo[] threadInfos = THREAD_BEAN.dumpAllThreads(true, true); // CHECKSTYLE:OFF MagicNumber - StringBuilder trace = new StringBuilder(150).append(threadInfos.length).append(" active threads").append(NEW_LINE); + StringBuilder trace = new StringBuilder(200).append(threadInfos.length).append(" active threads").append(NEW_LINE); // CHECKSTYLE:ON for (ThreadInfo info : threadInfos) { if (info == null) { diff --git a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java index b83e0509d3..f22eb2259a 100644 --- a/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java +++ b/com.avaloq.tools.ddk.typesystem.test/src/com/avaloq/tools/ddk/typesystem/ParameterListMatcherTest.java @@ -61,6 +61,7 @@ public class ParameterListMatcherTest { private static final IMatchResult MATCH_RESULT_MATCH = IParameterMatchChecker.MATCH; private static final IMatchResult MATCH_RESULT_TYPE_ERROR = IParameterMatchChecker.TYPE_ERROR; + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class NamedType extends NamedTypeImpl { private final String name; @@ -76,6 +77,7 @@ public String getName() { } + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class FormalParameter extends EObjectImpl implements IFormalParameter { private final boolean mandatory; @@ -109,6 +111,7 @@ public IType getType() { } + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class NamedFormalParameter extends FormalParameter implements INamedFormalParameter { private final String name; @@ -133,6 +136,7 @@ protected class ParameterList extends EObjectImpl implements InternalEObject { // Empty class to make protected constructor visible. } + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class ActualParameter extends EObjectImpl implements IActualParameter { private final IType type; @@ -152,6 +156,7 @@ public IExpression getValue() { } + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class NamedActualParameter extends ActualParameter implements INamedActualParameter { private final String name; diff --git a/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProvider.java b/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProvider.java index b50f633190..8fa32d8c7a 100644 --- a/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProvider.java +++ b/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/AbstractTypeProvider.java @@ -66,6 +66,7 @@ public abstract class AbstractTypeProvider implements ITypeProvider { * @param * the type of the item */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static final class ImmutableLinkedItem { private final T object; @@ -242,7 +243,7 @@ protected int size() { * the item to get the type for * @return type type of {@code t} */ - public IType getType(final T t) { + IType getType(final T t) { if (t == null) { return null; } diff --git a/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccess.java b/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccess.java index 1bf98348c2..0a6249613d 100644 --- a/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccess.java +++ b/com.avaloq.tools.ddk.typesystem/src/com/avaloq/tools/ddk/typesystem/BuiltInTypeModelAccess.java @@ -66,7 +66,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final BuiltInTypeModelAccess INSTANCE = new BuiltInTypeModelAccess(); - public static BuiltInTypeModelAccess get() { + static BuiltInTypeModelAccess get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/MonitoredClusteringBuilderState.java b/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/MonitoredClusteringBuilderState.java index 8c92fec749..ebfa1c1489 100644 --- a/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/MonitoredClusteringBuilderState.java +++ b/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/MonitoredClusteringBuilderState.java @@ -1281,8 +1281,8 @@ protected void queueAffectedResources(final Set allRemainingURIs, final IRe checkForCancellation(monitor); if (allRemainingURIs.contains(candidateURI)) { boolean affected; - if (manager instanceof IResourceDescription.Manager.AllChangeAware) { - affected = ((IResourceDescription.Manager.AllChangeAware) manager).isAffectedByAny(deltas, oldState.getResourceDescription(candidateURI), cachingIndex); + if (manager instanceof IResourceDescription.Manager.AllChangeAware allChangeAware) { + affected = allChangeAware.isAffectedByAny(deltas, oldState.getResourceDescription(candidateURI), cachingIndex); } else { affected = manager.isAffected(deltas, oldState.getResourceDescription(candidateURI), cachingIndex); } diff --git a/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/resourceloader/ParallelResourceLoader.java b/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/resourceloader/ParallelResourceLoader.java index 952bd6878c..0048738680 100644 --- a/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/resourceloader/ParallelResourceLoader.java +++ b/com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/resourceloader/ParallelResourceLoader.java @@ -142,6 +142,7 @@ protected Resource loadResource(final URI uri, final ResourceSet localResourceSe /** * Parallel load operation implementation. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class ParallelLoadOperation implements LoadOperation { private final BlockingQueue> resourceQueue; diff --git a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/test/export/util/ExportTestUtil.java b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/test/export/util/ExportTestUtil.java index a9be0cb950..edbabdea72 100644 --- a/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/test/export/util/ExportTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.export.test/src/com/avaloq/tools/ddk/xtext/test/export/util/ExportTestUtil.java @@ -28,7 +28,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final ExportTestUtil INSTANCE = new ExportTestUtil(); - public static ExportTestUtil get() { + static ExportTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/GeneratorSupport.java b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/GeneratorSupport.java index d23fedd31f..91224ebeea 100644 --- a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/GeneratorSupport.java +++ b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/GeneratorSupport.java @@ -75,7 +75,7 @@ private static class CustomResourceLoader extends ResourceLoaderImpl { this.loader = l; } - public void close() { + void close() { try { loader.close(); } catch (IOException e) { diff --git a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/Graph.java b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/Graph.java index f84a568fc4..b7447b70b1 100644 --- a/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/Graph.java +++ b/com.avaloq.tools.ddk.xtext.expression/src/com/avaloq/tools/ddk/xtext/expression/generator/Graph.java @@ -52,7 +52,7 @@ private static class Node { * target node * @return this */ - public Node addEdge(final Node node) { + Node addEdge(final Node node) { outEdges.add(node); node.inEdges.add(this); return this; diff --git a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java index dee3a3a51a..a298dccf18 100644 --- a/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.format.test/src/com/avaloq/tools/ddk/xtext/test/format/util/FormatTestUtil.java @@ -43,7 +43,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final FormatTestUtil INSTANCE = new FormatTestUtil(); - public static FormatTestUtil get() { + static FormatTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext.format/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopeUtil.java b/com.avaloq.tools.ddk.xtext.format/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopeUtil.java index b23040c5f2..98c6f54d5f 100644 --- a/com.avaloq.tools.ddk.xtext.format/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopeUtil.java +++ b/com.avaloq.tools.ddk.xtext.format/src/com/avaloq/tools/ddk/xtext/format/scoping/FormatScopeUtil.java @@ -254,7 +254,7 @@ protected List getAssignments(final AbstractRule rule) { * type of the contents to collect * @return List a list with elements which have eObj as its container and which are of type */ - public List getFilteredEContents(final EObject eObj, final Class type) { + List getFilteredEContents(final EObject eObj, final Class type) { if (eObj != null && !eObj.eIsProxy()) { TreeIterator eContents = eObj.eAllContents(); return Lists.newArrayList(Iterators.filter(eContents, type)); @@ -300,7 +300,7 @@ private void collectAllUsedGrammars(final Grammar grammar, final Collection resources = resourceSet.getResources(); diff --git a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GeneratorTestUtil.java b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GeneratorTestUtil.java index 4ff3726b6f..73e1b1429e 100644 --- a/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GeneratorTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.generator.test/src/com/avaloq/tools/ddk/xtext/generator/test/util/GeneratorTestUtil.java @@ -27,7 +27,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final GeneratorTestUtil INSTANCE = new GeneratorTestUtil(); - public static GeneratorTestUtil get() { + static GeneratorTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java index e10ed157c7..825e6db453 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/AbstractXtextMarkerBasedTest.java @@ -367,7 +367,7 @@ protected void validate(final String sourceFileName, final TestSourceType source protected void processErrorsFound(final String sourceWithoutMarkers) { if (!errorsOnPosition.isEmpty()) { // CHECKSTYLE:OFF MagicNumber - StringBuilder sb = new StringBuilder(50); + StringBuilder sb = new StringBuilder(100); // CHECKSTYLE:ON sb.append(memorizedErrorsToString(sourceWithoutMarkers)); sb.append(SPLITTING_LINE); @@ -386,8 +386,8 @@ protected void processErrorsFound(final String sourceWithoutMarkers) { * input testing source with injected errors, never {@code null} */ private String memorizedErrorsToString(final String source) { - StringBuilder result = new StringBuilder(); - StringBuilder errorBuffer = new StringBuilder(); + StringBuilder result = new StringBuilder(120); + StringBuilder errorBuffer = new StringBuilder(120); // Sort positions List positions = Lists.newArrayList(errorsOnPosition.keySet()); @@ -497,6 +497,7 @@ protected MarkerTagsInfo getMarkerTagsInfo() { * for all tests within one test class. Tags for current test are also stored here. * One may prefer in the future to be able to clean tags for the current test after the test. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class MarkerTagsInfo { // For sources under test diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractScopingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractScopingTest.java index 395ef797e4..de77334f8c 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractScopingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractScopingTest.java @@ -798,8 +798,8 @@ protected void testLinking(final EObject sourceObject, final int targetTag, fina * CrossReference object, can be {@code null} */ protected void assertEObjectsAreEqual(final EObject sourceObject, final EObject targetObject, final CrossReference crossReference) { - StringBuilder expected = new StringBuilder(); - StringBuilder found = new StringBuilder(); + StringBuilder expected = new StringBuilder(80); + StringBuilder found = new StringBuilder(80); if (crossReference != null) { String crossReferenceText = "Cross reference:\n" + crossReference.toString() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ expected.append(crossReferenceText); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractValidationTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractValidationTest.java index e59a736ca4..5f353ee263 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractValidationTest.java @@ -377,7 +377,7 @@ public void apply(final EObject root, final Integer pos) { * actual message */ private void createErrorMessage(final Integer pos, final List diagnosticsOnTargetPosition, final boolean issueFound, final boolean expectedSeverityMatches, final int actualSeverity, final boolean expectedMessageMatches, final String actualMessage) { - StringBuilder errorMessage = new StringBuilder(175); + StringBuilder errorMessage = new StringBuilder(200); if (issueMustBeFound && !issueFound) { errorMessage.append("Expected issue not found. Code '").append(issueCode).append('\n'); } else if (!issueMustBeFound && issueFound) { @@ -1093,7 +1093,7 @@ protected void memorizeUnexpectedResourceErrors() { if (diagnostic instanceof AbstractDiagnostic) { AbstractDiagnostic diag = (AbstractDiagnostic) diagnostic; // Create error message - StringBuilder sb = new StringBuilder(35); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. Code '"); sb.append(diag.getCode()); sb.append(DOT_AND_LINEBREAK); @@ -1101,7 +1101,7 @@ protected void memorizeUnexpectedResourceErrors() { memorizeErrorOnPosition(diag.getOffset(), sb.toString()); } else { // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. '"); sb.append(diagnostic.toString()); sb.append(DOT_AND_LINEBREAK); @@ -1120,7 +1120,7 @@ protected void memorizeUnexpectedErrors() { if (diagnostic instanceof AbstractValidationDiagnostic) { AbstractValidationDiagnostic avd = (AbstractValidationDiagnostic) diagnostic; // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected issue found. Code '"); sb.append(avd.getIssueCode()); sb.append(DOT_AND_LINEBREAK); @@ -1142,7 +1142,7 @@ protected void memorizeUnexpectedErrors() { } } else { // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. '"); sb.append(diagnostic.toString()); sb.append(DOT_AND_LINEBREAK); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractXtextMarkerBasedTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractXtextMarkerBasedTest.java index d797d5e8ce..fc21b9eea1 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractXtextMarkerBasedTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/jupiter/AbstractXtextMarkerBasedTest.java @@ -369,7 +369,7 @@ protected void validate(final String sourceFileName, final TestSourceType source protected void processErrorsFound(final String sourceWithoutMarkers) { if (!errorsOnPosition.isEmpty()) { // CHECKSTYLE:OFF MagicNumber - StringBuilder sb = new StringBuilder(50); + StringBuilder sb = new StringBuilder(100); // CHECKSTYLE:ON sb.append(memorizedErrorsToString(sourceWithoutMarkers)); sb.append(SPLITTING_LINE); @@ -388,8 +388,8 @@ protected void processErrorsFound(final String sourceWithoutMarkers) { * input testing source with injected errors, never {@code null} */ private String memorizedErrorsToString(final String source) { - StringBuilder result = new StringBuilder(); - StringBuilder errorBuffer = new StringBuilder(); + StringBuilder result = new StringBuilder(120); + StringBuilder errorBuffer = new StringBuilder(120); // Sort positions List positions = Lists.newArrayList(errorsOnPosition.keySet()); @@ -499,6 +499,7 @@ protected MarkerTagsInfo getMarkerTagsInfo() { * for all tests within one test class. Tags for current test are also stored here. * One may prefer in the future to be able to clean tags for the current test after the test. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class MarkerTagsInfo { // For sources under test diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java index 86b877c451..3416f4e920 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/scoping/AbstractScopingTest.java @@ -798,8 +798,8 @@ protected void testLinking(final EObject sourceObject, final int targetTag, fina * CrossReference object, can be {@code null} */ protected void assertEObjectsAreEqual(final EObject sourceObject, final EObject targetObject, final CrossReference crossReference) { - StringBuilder expected = new StringBuilder(); - StringBuilder found = new StringBuilder(); + StringBuilder expected = new StringBuilder(80); + StringBuilder found = new StringBuilder(80); if (crossReference != null) { String crossReferenceText = "Cross reference:\n" + crossReference.toString() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ expected.append(crossReferenceText); diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java index 4fc61bf775..a1e70d99c8 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/ui/occurrences/AbstractOccurrencesTest.java @@ -90,7 +90,7 @@ private static final class OccurrencesToCheck { * @param offset * cursor offset */ - public void setCursor(final int offset) { + void setCursor(final int offset) { this.cursorOffset = offset; } @@ -100,7 +100,7 @@ public void setCursor(final int offset) { * @param offset * cursor offset */ - public void addSemanticOccurrence(final int offset) { + void addSemanticOccurrence(final int offset) { semanticMarkers.add(offset); } @@ -110,7 +110,7 @@ public void addSemanticOccurrence(final int offset) { * @param offset * cursor offset */ - public void addNoSemanticOccurence(final int offset) { + void addNoSemanticOccurence(final int offset) { noSemanticMarkers.add(offset); } } diff --git a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java index 8479f692b8..1f679e305c 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java +++ b/com.avaloq.tools.ddk.xtext.test.core/src/com/avaloq/tools/ddk/xtext/test/validation/AbstractValidationTest.java @@ -378,7 +378,7 @@ public void apply(final EObject root, final Integer pos) { * actual message */ private void createErrorMessage(final Integer pos, final List diagnosticsOnTargetPosition, final boolean issueFound, final boolean expectedSeverityMatches, final int actualSeverity, final boolean expectedMessageMatches, final String actualMessage) { - StringBuilder errorMessage = new StringBuilder(175); + StringBuilder errorMessage = new StringBuilder(200); if (issueMustBeFound && !issueFound) { errorMessage.append("Expected issue not found. Code '").append(issueCode).append('\n'); } else if (!issueMustBeFound && issueFound) { @@ -1094,7 +1094,7 @@ protected void memorizeUnexpectedResourceErrors() { if (diagnostic instanceof AbstractDiagnostic) { AbstractDiagnostic diag = (AbstractDiagnostic) diagnostic; // Create error message - StringBuilder sb = new StringBuilder(35); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. Code '"); sb.append(diag.getCode()); sb.append(DOT_AND_LINEBREAK); @@ -1102,7 +1102,7 @@ protected void memorizeUnexpectedResourceErrors() { memorizeErrorOnPosition(diag.getOffset(), sb.toString()); } else { // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. '"); sb.append(diagnostic.toString()); sb.append(DOT_AND_LINEBREAK); @@ -1121,7 +1121,7 @@ protected void memorizeUnexpectedErrors() { if (diagnostic instanceof AbstractValidationDiagnostic) { AbstractValidationDiagnostic avd = (AbstractValidationDiagnostic) diagnostic; // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected issue found. Code '"); sb.append(avd.getIssueCode()); sb.append(DOT_AND_LINEBREAK); @@ -1143,7 +1143,7 @@ protected void memorizeUnexpectedErrors() { } } else { // Create error message - StringBuilder sb = new StringBuilder(30); + StringBuilder sb = new StringBuilder(50); sb.append("Unexpected diagnostic found. '"); sb.append(diagnostic.toString()); sb.append(DOT_AND_LINEBREAK); diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/util/FormatterTestUtil.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/util/FormatterTestUtil.java index a751cfb643..a31493e53e 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/util/FormatterTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/formatter/util/FormatterTestUtil.java @@ -29,7 +29,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final FormatterTestUtil INSTANCE = new FormatterTestUtil(); - public static FormatterTestUtil get() { + static FormatterTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/jupiter/formatter/FormatterTestUtil.java b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/jupiter/formatter/FormatterTestUtil.java index b7394d0f49..a359873f53 100644 --- a/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/jupiter/formatter/FormatterTestUtil.java +++ b/com.avaloq.tools.ddk.xtext.test/src/com/avaloq/tools/ddk/xtext/jupiter/formatter/FormatterTestUtil.java @@ -29,7 +29,7 @@ private static final class InstanceHolder { // Initialize-on-demand holder pattern. private static final FormatterTestUtil INSTANCE = new FormatterTestUtil(); - public static FormatterTestUtil get() { + static FormatterTestUtil get() { return INSTANCE; } } diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedLineEntry.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedLineEntry.java index 045be1ba52..73aff1359c 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedLineEntry.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/formatting/ExtendedLineEntry.java @@ -146,7 +146,7 @@ protected String getColumnIndentPadding() { */ public boolean isFixedLocatorClosing() { for (IExtendedLocator acsLocator : acsLocators) { - if (acsLocator instanceof FixedLocator && ((FixedLocator) acsLocator).getLeft() != null) { + if (acsLocator instanceof FixedLocator fixedLocator && fixedLocator.getLeft() != null) { return true; } } @@ -160,7 +160,7 @@ public boolean isFixedLocatorClosing() { */ public boolean isFixedLocatorOpening() { for (IExtendedLocator acsLocator : acsLocators) { - if (acsLocator instanceof FixedLocator && ((FixedLocator) acsLocator).getRight() != null) { + if (acsLocator instanceof FixedLocator fixedLocator && fixedLocator.getRight() != null) { return true; } } @@ -174,7 +174,7 @@ public boolean isFixedLocatorOpening() { */ public boolean isFixed() { for (IExtendedLocator acsLocator : acsLocators) { - if (acsLocator instanceof FixedLocator && ((FixedLocator) acsLocator).getRight() != null && (((FixedLocator) acsLocator).isFixed())) { + if (acsLocator instanceof FixedLocator fixedLocator && fixedLocator.getRight() != null && fixedLocator.isFixed()) { return true; } } @@ -188,7 +188,7 @@ public boolean isFixed() { */ public boolean isRelative() { for (IExtendedLocator acsLocator : acsLocators) { - if (acsLocator instanceof FixedLocator && ((FixedLocator) acsLocator).getRight() != null && (((FixedLocator) acsLocator).isRelative())) { + if (acsLocator instanceof FixedLocator fixedLocator && fixedLocator.getRight() != null && fixedLocator.isRelative()) { return true; } } @@ -203,7 +203,7 @@ public boolean isRelative() { */ public boolean isNoBreak() { for (IExtendedLocator acsLocator : acsLocators) { - if (acsLocator instanceof FixedLocator && ((FixedLocator) acsLocator).getRight() != null && (((FixedLocator) acsLocator).isNoBreak())) { + if (acsLocator instanceof FixedLocator fixedLocator && fixedLocator.getRight() != null && fixedLocator.isNoBreak()) { return true; } } diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProvider.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProvider.java index 58dc6f69bd..79a130b173 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProvider.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/AbstractFragmentProvider.java @@ -41,6 +41,7 @@ public abstract class AbstractFragmentProvider implements IFragmentProvider { /** * Helper object used to iterate over the segments in a URI fragment and extract the number of repetitions of the segments. */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected class FragmentSegmentIterator implements Iterator { private final String fragment; private final int length; diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java index 6a56391126..45f39b4544 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/linking/LazyLinkingResource2.java @@ -213,12 +213,12 @@ private static class LazyResolutionFlag { done = false; } - public boolean isDone() { + boolean isDone() { return done; } /** Set the flag to true, indicating that lazy resolution was completely done. */ - public void setDone() { + void setDone() { done = true; } } @@ -438,7 +438,7 @@ public EList eAdapters() { private static final class CustomAdapterList extends EAdapterList { private static final long serialVersionUID = 1L; - public CustomAdapterList(final Notifier notifier) { + CustomAdapterList(final Notifier notifier) { super(notifier); } diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java index bc6730e24e..907970a631 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java @@ -66,6 +66,7 @@ private static class SegmentNode implements Externalizable { protected Object[] values; protected List children; + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public no-arg constructor required by Externalizable public SegmentNode() { // required by externalization } @@ -93,7 +94,7 @@ public SegmentNode() { * @return matching node or successor node */ @SuppressWarnings("PMD.NPathComplexity") - public SegmentNode find(final QualifiedName name, int segIdx, final boolean exactMatch) { + SegmentNode find(final QualifiedName name, int segIdx, final boolean exactMatch) { if (children == null || children.isEmpty()) { return null; } @@ -132,10 +133,12 @@ public SegmentNode find(final QualifiedName name, int segIdx, final boolean exac * whether to return {@link QualifiedNamePattern#isRecursivePattern() recursive matches} or not * @param excludeDuplicates * whether duplicate values should be excluded in the result + * @param + * the type of values in the result collection * @return collection of all values mapped by the nodes in the given range, never {@code null} */ @SuppressWarnings("unchecked") - public Collection matches(final QualifiedName lower, final int lowerIdx, final SegmentNode upper, final boolean recursive, final boolean excludeDuplicates) { + Collection matches(final QualifiedName lower, final int lowerIdx, final SegmentNode upper, final boolean recursive, final boolean excludeDuplicates) { final Collection result = excludeDuplicates ? Sets. newHashSet() : Lists. newArrayList(); Visitor visitor = new Visitor() { @Override @@ -246,7 +249,7 @@ private boolean visitChildren(final Visitor visitor, final SegmentNode stopOn) { * @param newValues * new values to associate qualified name with; if mappings already exist any missing mapping will be added */ - public void merge(final QualifiedName name, int segIdx, final Object[] newValues) { // NOPMD - varargs doesn't make sense here + void merge(final QualifiedName name, int segIdx, final Object[] newValues) { // NOPMD - varargs doesn't make sense here if (children == null) { children = new ArrayList(DEFAULT_CHILD_CAPACITY); } @@ -275,7 +278,7 @@ public void merge(final QualifiedName name, int segIdx, final Object[] newValues * @param visitor * visitor to visit this node with, must not be {@code null} */ - public void accept(final Visitor visitor) { + void accept(final Visitor visitor) { visitor.visit(this); if (children != null) { for (SegmentNode child : children) { @@ -284,7 +287,7 @@ public void accept(final Visitor visitor) { } } - public List> getMappings(final Object value) { + List> getMappings(final Object value) { List> result = new ArrayList<>(); if (children != null) { for (SegmentNode node : children) { @@ -387,6 +390,7 @@ public void readExternal(final ObjectInput in) throws IOException, ClassNotFound private static class ValueSharingSegmentNode extends SegmentNode { private static final long serialVersionUID = 1L; + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public no-arg constructor required by Externalizable public ValueSharingSegmentNode() { // required by externalization } @@ -397,7 +401,7 @@ public ValueSharingSegmentNode() { @Override @SuppressWarnings("unchecked") - public Collection matches(final QualifiedName lower, final int lowerIdx, final SegmentNode upper, final boolean recursive, final boolean excludeDuplicates) { + Collection matches(final QualifiedName lower, final int lowerIdx, final SegmentNode upper, final boolean recursive, final boolean excludeDuplicates) { final Collection result = excludeDuplicates ? Sets. newHashSet() : Lists. newArrayList(); final Set arrays = Sets.newHashSet(); Visitor visitor = new Visitor() { @@ -418,7 +422,7 @@ public void visit(final SegmentNode node) { } @Override - public void merge(final QualifiedName name, int segIdx, final Object[] newValues) { // NOPMD - varargs doesn't make sense here + void merge(final QualifiedName name, int segIdx, final Object[] newValues) { // NOPMD - varargs doesn't make sense here if (children == null) { children = new ArrayList(DEFAULT_CHILD_CAPACITY); } @@ -459,7 +463,7 @@ private abstract static class Visitor { * @param node * node to visit, never {@code null} */ - public abstract void visit(SegmentNode node); + abstract void visit(SegmentNode node); } private SegmentNode root; diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/AbstractFingerprintComputer.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/AbstractFingerprintComputer.java index c9a7ae98c2..8abc20beb8 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/AbstractFingerprintComputer.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/AbstractFingerprintComputer.java @@ -81,6 +81,7 @@ protected enum FingerprintIndirection { * Internal representation of an exported item, containing its fingerprint and its objects (the object itself, plus its * children). */ + @SuppressWarnings("PMD.PublicMemberInNonPublicType") // Public methods needed for subclass access in other packages protected static class ExportItem implements Comparable { private final CharSequence key; private String keyAsString; diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java index e0658e59f6..8d381f4456 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectInputStream.java @@ -44,9 +44,11 @@ class DirectLinkingEObjectInputStream extends EObjectInputStream { * @see DirectLinkingEObjectOutputStream#writeEObjectURI(EObject, Resource) * @throws IOException * if an I/O exception occurred + * @throws IllegalStateException + * if an EStructuralFeature cannot be resolved */ @SuppressWarnings("unchecked") - public EObject readEObject(final Resource context) throws IOException { + EObject readEObject(final Resource context) throws IOException { if (readBoolean() == LOCAL_EOBJECT) { int count = readCompressedInt(); EObject eObject = context.getContents().get(readCompressedInt()); diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectOutputStream.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectOutputStream.java index 316473a22b..c0a84e99fa 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectOutputStream.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingEObjectOutputStream.java @@ -57,7 +57,7 @@ class DirectLinkingEObjectOutputStream extends EObjectOutputStream { * @throws IOException * if an I/O exception occurred */ - public void writeEObjectURI(final EObject obj, final Resource context) throws IOException { + void writeEObjectURI(final EObject obj, final Resource context) throws IOException { Resource resource = obj.eResource(); if (resource == context) { // NOPMD writeBoolean(LOCAL_EOBJECT); diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingResourceStorageWritable.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingResourceStorageWritable.java index 113d3856c1..d6c26e750a 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingResourceStorageWritable.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingResourceStorageWritable.java @@ -198,7 +198,7 @@ private void writeMapping(final Entry> entry, final Dire private class SelectiveObjectOutputStream extends BinaryResourceImpl.EObjectOutputStream { private final StorageAwareResource storageAwareResource; - public SelectiveObjectOutputStream(final StorageAwareResource storageAwareResource, final OutputStream outputStream, final Map options) throws IOException { + SelectiveObjectOutputStream(final StorageAwareResource storageAwareResource, final OutputStream outputStream, final Map options) throws IOException { super(outputStream, options); this.storageAwareResource = storageAwareResource; } @@ -218,7 +218,7 @@ public void saveEObject(final InternalEObject internalEObject, final BinaryResou handleSaveEObject(internalEObject, this); } - public void saveSelectedResourceContents(final Resource resource, final int startIndex, final int objCount) throws IOException { + void saveSelectedResourceContents(final Resource resource, final int startIndex, final int objCount) throws IOException { this.resource = resource; URI uri = resource.getURI(); if (uri != null && uri.isHierarchical() && !uri.isRelative()) { diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/validation/DefaultCheckSequencer.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/validation/DefaultCheckSequencer.java index 610955c258..0235c8cc08 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/validation/DefaultCheckSequencer.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/validation/DefaultCheckSequencer.java @@ -19,7 +19,7 @@ public class DefaultCheckSequencer implements ICheckSequencer { private static final class SingletonHolder { private static DefaultCheckSequencer instance = new DefaultCheckSequencer(); - public static DefaultCheckSequencer get() { + static DefaultCheckSequencer get() { return instance; } } diff --git a/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/CacheManager.java b/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/CacheManager.java index 6b199d348a..342f924260 100644 --- a/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/CacheManager.java +++ b/com.avaloq.tools.ddk/src/com/avaloq/tools/ddk/caching/CacheManager.java @@ -37,7 +37,7 @@ public class CacheManager { private static final class SingletonHolder { private static CacheManager instance = new CacheManager(); - public static CacheManager get() { + static CacheManager get() { return instance; } } @@ -250,7 +250,7 @@ void aggregate(final CacheStatistics statistics) { super.aggregate(statistics); } - public int getCacheCounter() { + int getCacheCounter() { return counter; } }