From c9cafb4b1c688a2aa7e7c508f75f0a56ca0c0379 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 3 Feb 2024 20:26:01 +0100 Subject: [PATCH 1/4] Check code with PMD 7.0.0-rc4 --- .github/workflows/build.yml | 3 +-- pom.xml | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70ce75f4..9e1dae7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ on: branches: - main - master - - compat-7.0 tags: - '**' pull_request: @@ -37,7 +36,7 @@ jobs: run: | echo "LANG=en_US.UTF-8" >> $GITHUB_ENV echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3" >> $GITHUB_ENV - echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/20/scripts" >> $GITHUB_ENV + echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/master/scripts" >> $GITHUB_ENV - name: Check Environment shell: bash run: | diff --git a/pom.xml b/pom.xml index 3636812e..0b53c58f 100644 --- a/pom.xml +++ b/pom.xml @@ -77,9 +77,9 @@ UTF-8 UTF-8 - 21 - 3.21.0 - 6.55.0 + 23-SNAPSHOT + 3.21.2 + 7.0.0-rc4 ${project.build.directory}/generated-sources/jflex @@ -280,6 +280,11 @@ true + + net.sourceforge.pmd + pmd-compat6 + ${pmd.check.version} + net.sourceforge.pmd pmd-core @@ -295,6 +300,16 @@ pmd-java ${pmd.check.version} + + net.sourceforge.pmd + pmd-javascript + ${pmd.check.version} + + + net.sourceforge.pmd + pmd-jsp + ${pmd.check.version} + net.sourceforge.pmd From 60cf31b3d57e3da8cfec02342f8089e766e849c7 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 3 Feb 2024 21:01:39 +0100 Subject: [PATCH 2/4] Fix PMD violations --- config/pmd-check.xml | 5 +---- .../sourceforge/pmd/util/fxdesigner/Designer.java | 5 ----- .../pmd/util/fxdesigner/MainDesignerController.java | 6 +++--- .../pmd/util/fxdesigner/MetricPaneController.java | 3 ++- .../pmd/util/fxdesigner/app/NodeSelectionSource.java | 2 +- .../fxdesigner/app/services/EventLoggerImpl.java | 5 +++-- .../fxdesigner/model/testing/PropertyMapModel.java | 2 +- .../util/fxdesigner/model/testing/TestXmlDumper.java | 6 +++--- .../util/fxdesigner/popups/EventLogController.java | 3 ++- .../pmd/util/fxdesigner/util/DesignerUtil.java | 4 ++-- .../pmd/util/fxdesigner/util/LimitedSizeStack.java | 12 +++++------- .../util/fxdesigner/util/beans/XmlInterfaceImpl.java | 5 +---- .../util/codearea/HighlightLayerCodeArea.java | 2 +- .../util/codearea/SyntaxHighlightingCodeArea.java | 5 ----- .../util/fxdesigner/util/controls/ControlUtil.java | 2 +- .../fxdesigner/util/controls/DragAndDropUtil.java | 9 +++++---- .../util/controls/NodeEditionCodeArea.java | 2 +- .../util/controls/NodeParentageCrumbBar.java | 4 ++-- .../fxdesigner/util/controls/PropertyMapView.java | 2 +- .../util/fxdesigner/util/controls/RippleEffect.java | 2 +- .../util/reactfx/DistinctBetweenStream.java | 2 +- 21 files changed, 37 insertions(+), 51 deletions(-) diff --git a/config/pmd-check.xml b/config/pmd-check.xml index 4fd85b17..e0698c29 100644 --- a/config/pmd-check.xml +++ b/config/pmd-check.xml @@ -26,10 +26,9 @@ 1 - @@ -47,7 +46,6 @@ 1 - 1 - languageChoicebox; // Other fields - private final Stack recentFiles = new LimitedSizeStack<>(5); + private final Deque recentFiles = new LimitedSizeStack<>(5); public MainDesignerController(@NamedArg("designerRoot") DesignerRoot designerRoot) { super(designerRoot); @@ -293,7 +293,7 @@ private void updateRecentFilesMenu() { @PersistentProperty public List getRecentFiles() { - return recentFiles; + return new ArrayList<>(recentFiles); } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/MetricPaneController.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/MetricPaneController.java index 8e95790e..a726b3af 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/MetricPaneController.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/MetricPaneController.java @@ -5,6 +5,7 @@ package net.sourceforge.pmd.util.fxdesigner; import java.util.ArrayList; +import java.util.List; import org.checkerframework.checker.nullness.qual.Nullable; import org.reactfx.EventStreams; @@ -88,7 +89,7 @@ private ObservableList> evaluateAllMetrics(Node n) { if (provider == null) { return FXCollections.emptyObservableList(); } - ArrayList> results = new ArrayList<>(); + List> results = new ArrayList<>(); for (Metric metric : provider.getMetrics()) { MetricResult result = computeMetric(metric, n); if (result != null) { diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/NodeSelectionSource.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/NodeSelectionSource.java index e15af55b..c1ba0ace 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/NodeSelectionSource.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/NodeSelectionSource.java @@ -83,7 +83,7 @@ default Val initNodeSelectionHandling(DesignerRoot root, } - class NodeSelectionEvent { + final class NodeSelectionEvent { // RRR data class diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/services/EventLoggerImpl.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/services/EventLoggerImpl.java index df3719cc..2dd5a311 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/services/EventLoggerImpl.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/app/services/EventLoggerImpl.java @@ -13,6 +13,7 @@ import java.time.Duration; import java.util.EnumSet; import java.util.Objects; +import java.util.Set; import org.reactfx.EventSource; import org.reactfx.EventStream; @@ -95,8 +96,8 @@ public void logEvent(LogEntry event) { private static EventStream filterOnCategory(EventStream input, boolean complement, Category first, Category... selection) { - EnumSet considered = EnumSet.of(first, selection); - EnumSet complemented = complement ? EnumSet.complementOf(considered) : considered; + EnumSet considered = EnumSet.of(first, selection); // NOPMD - need to use EnumSet for next line EnumSet.complementOf + Set complemented = complement ? EnumSet.complementOf(considered) : considered; return input.filter(e -> complemented.contains(e.getCategory())); } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/PropertyMapModel.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/PropertyMapModel.java index d4019775..55678e1f 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/PropertyMapModel.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/PropertyMapModel.java @@ -137,7 +137,7 @@ private static RebindSubscription makeDefault(PropertyDe return RebindSubscription.make( () -> mapping.remove(p), addedP -> { - if (addedP == p) { + if (addedP.equals(p)) { return makeDefault(p, mapping); } else { mapping.remove(p); diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/TestXmlDumper.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/TestXmlDumper.java index 3e8e5048..bc312496 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/TestXmlDumper.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/model/testing/TestXmlDumper.java @@ -86,7 +86,7 @@ private void appendSingle(Element testCode, LiveTestCase descriptor, Document do numViolations.setTextContent(expectedViolations.size() + ""); testCode.appendChild(numViolations); - if (expectedViolations.size() > 0 && expectedViolations.stream().allMatch(it -> it.getMessage() != null)) { + if (!expectedViolations.isEmpty() && expectedViolations.stream().allMatch(it -> it.getMessage() != null)) { Element messages = doc.createElementNS(NS, "expected-messages"); for (LiveViolationRecord record : expectedViolations) { Element r = doc.createElementNS(NS, "message"); @@ -96,7 +96,7 @@ private void appendSingle(Element testCode, LiveTestCase descriptor, Document do testCode.appendChild(messages); } - if (expectedViolations.size() > 0) { + if (!expectedViolations.isEmpty()) { Element linenos = doc.createElementNS(NS, "expected-linenumbers"); // create a text doc just to ask for line numbers @@ -119,7 +119,7 @@ private void appendSingle(Element testCode, LiveTestCase descriptor, Document do boolean hasNonDefaultVersion = descriptor.languageVersionProperty() .getOpt() - .filter(it -> it.getLanguage().getDefaultVersion() != it) + .filter(it -> !it.getLanguage().getDefaultVersion().equals(it)) .isPresent(); if (hasNonDefaultVersion) { Element sourceType = doc.createElementNS(NS, "source-type"); diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/popups/EventLogController.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/popups/EventLogController.java index ec3439d4..50bc602c 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/popups/EventLogController.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/popups/EventLogController.java @@ -30,6 +30,7 @@ import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; +import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; import javafx.css.PseudoClass; import javafx.fxml.FXML; @@ -183,7 +184,7 @@ private Subscription bindPopupToThisController() { // reset error nodes on closing binding = binding.and(() -> selectedErrorNodes.setValue(Collections.emptyList())); - SortedList logEntries = new SortedList<>(getLogger().getLog(), Comparator.reverseOrder()); + ObservableList logEntries = new SortedList<>(getLogger().getLog(), Comparator.reverseOrder()); eventLogTableView.itemsProperty().setValue(logEntries); binding = binding.and( () -> eventLogTableView.itemsProperty().setValue(FXCollections.emptyObservableList()) diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/DesignerUtil.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/DesignerUtil.java index e62a7343..01d5948b 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/DesignerUtil.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/DesignerUtil.java @@ -75,7 +75,7 @@ private DesignerUtil() { public static Set setOf(T... ts) { - LinkedHashSet set = new LinkedHashSet<>(ts.length); + Set set = new LinkedHashSet<>(ts.length); Collections.addAll(set, ts); return set; } @@ -400,7 +400,7 @@ public static BuilderFactory customBuilderFactory(@NonNull DesignerRoot owner) { // Controls that need the DesignerRoot can declare a constructor // with a parameter w/ signature @NamedArg("designerRoot") DesignerRoot // to be injected with the relevant instance of the app. - ProxyBuilder builder = new ProxyBuilder<>(type); + ProxyBuilder builder = new ProxyBuilder<>(type); // NOPMD - can't use Map<> here: it's a builder, not a map. builder.put("designerRoot", owner); return builder; } else { diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/LimitedSizeStack.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/LimitedSizeStack.java index fe8d69e5..d569a244 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/LimitedSizeStack.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/LimitedSizeStack.java @@ -4,7 +4,7 @@ package net.sourceforge.pmd.util.fxdesigner.util; -import java.util.Stack; +import java.util.ArrayDeque; /** * Stack with a limited size, without duplicates, without null value. Used to store recent files. @@ -14,7 +14,7 @@ * @author Clément Fournier * @since 6.0.0 */ -public class LimitedSizeStack extends Stack { +public class LimitedSizeStack extends ArrayDeque { private final int maxSize; @@ -25,9 +25,9 @@ public LimitedSizeStack(int maxSize) { @Override - public E push(E item) { + public void push(E item) { if (item == null) { - return null; + return; } this.remove(item); @@ -35,9 +35,7 @@ public E push(E item) { super.push(item); if (size() > maxSize) { - this.removeElementAt(size() - 1); + this.removeLast(); } - - return item; } } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/beans/XmlInterfaceImpl.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/beans/XmlInterfaceImpl.java index 0930e5a8..ef99f470 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/beans/XmlInterfaceImpl.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/beans/XmlInterfaceImpl.java @@ -9,7 +9,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.logging.Logger; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -30,8 +29,6 @@ */ public class XmlInterfaceImpl extends XmlInterface { - private static final Logger LOGGER = Logger.getLogger(XmlInterface.class.getName()); - // names used in the Xml schema private static final String SCHEMA_NODE_ELEMENT = "node"; private static final String SCHEMA_NODESEQ_ELEMENT = "nodeseq"; @@ -83,7 +80,7 @@ protected SimpleBeanModelNode parseSettingsOwnerNode(Element nodeElement) { node.addChild(parseSettingsOwnerNode(child)); } } catch (ClassNotFoundException e) { - LOGGER.warning("Ignoring unknown settings node of type " + child.getAttribute(SCHEMA_NODE_CLASS_ATTRIBUTE)); + System.out.println("Ignoring unknown settings node of type " + child.getAttribute(SCHEMA_NODE_CLASS_ATTRIBUTE)); } } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/HighlightLayerCodeArea.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/HighlightLayerCodeArea.java index b93a3629..b3e09107 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/HighlightLayerCodeArea.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/HighlightLayerCodeArea.java @@ -174,7 +174,7 @@ private StyleSpans> recomputePainting() { final StyleSpans> base = allSpans.get(0); return allSpans.stream() - .filter(spans -> spans != base) + .filter(spans -> !base.equals(spans)) .filter(spans -> spans.length() <= getLength()) .reduce(base, (accumulator, elt) -> accumulator.overlay(elt, SyntaxHighlightingCodeArea::additiveOverlay)); diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/SyntaxHighlightingCodeArea.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/SyntaxHighlightingCodeArea.java index 9e9ed50e..d6a05ce3 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/SyntaxHighlightingCodeArea.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/codearea/SyntaxHighlightingCodeArea.java @@ -198,11 +198,6 @@ private void setCurrentSyntaxHighlight(final @Nullable StyleSpans> styleSpans) { - super.setStyleSpans(from, styleSpans); - } - /** * Given the old value of the highlighting spans, and a newly computed value, * computes the spans as they should be applied to the codearea. The default behaviour diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/ControlUtil.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/ControlUtil.java index 45b47c7b..8f2e1856 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/ControlUtil.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/ControlUtil.java @@ -226,7 +226,7 @@ public static void subscribeOnSkin(Control node, public static void copyToClipboardButton(Button button, Supplier copiedText) { button.setOnAction(e -> { - final ClipboardContent content = new ClipboardContent(); + final ClipboardContent content = new ClipboardContent(); // NOPMD - can't use Map<> because of putString(...) method content.putString(copiedText.get()); Clipboard.getSystemClipboard().setContent(content); SimplePopups.showActionFeedback(button, AlertType.CONFIRMATION, "Copied to clipboard"); diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/DragAndDropUtil.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/DragAndDropUtil.java index 910ecf5e..d387d1b3 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/DragAndDropUtil.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/DragAndDropUtil.java @@ -5,6 +5,7 @@ package net.sourceforge.pmd.util.fxdesigner.util.controls; import java.io.Serializable; +import java.util.Map; import java.util.function.Consumer; import org.reactfx.Subscription; @@ -23,7 +24,7 @@ public final class DragAndDropUtil { // since dragboard contents must be Serializable we // put a TextRegion in the dragboard and not a Node - private static class SerializableTextRegion implements Serializable { + private static final class SerializableTextRegion implements Serializable { private final int startOffset; private final int length; @@ -54,7 +55,7 @@ public static Subscription registerAsNodeDragSource(javafx.scene.Node source, No source.setOnDragDetected(evt -> { // drag and drop Dragboard db = source.startDragAndDrop(TransferMode.LINK); - ClipboardContent content = new ClipboardContent(); + Map content = new ClipboardContent(); content.put(NODE_RANGE_DATA_FORMAT, new SerializableTextRegion(data.getTextRegion())); db.setContent(content); root.getService(DesignerRoot.IS_NODE_BEING_DRAGGED).setValue(true); @@ -89,7 +90,7 @@ public static void registerAsNodeDragTarget(javafx.scene.Node target, Consumer { - if (evt.getGestureSource() != target + if (evt.getGestureSource() != target // NOPMD CompareObjectsWithEquals && evt.getDragboard().hasContent(NODE_RANGE_DATA_FORMAT)) { /* allow for both copying and moving, whatever user chooses */ evt.acceptTransferModes(TransferMode.LINK); @@ -98,7 +99,7 @@ public static void registerAsNodeDragTarget(javafx.scene.Node target, Consumer { - if (evt.getGestureSource() != target + if (evt.getGestureSource() != target // NOPMD CompareObjectsWithEquals && evt.getDragboard().hasContent(NODE_RANGE_DATA_FORMAT)) { target.getStyleClass().addAll(NODE_DRAG_OVER); } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeEditionCodeArea.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeEditionCodeArea.java index aecb770e..5ec7d188 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeEditionCodeArea.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeEditionCodeArea.java @@ -156,7 +156,7 @@ private void enableCtrlSelection() { /** Scroll the editor to a node and makes it visible. */ private void scrollToNode(Node node, boolean scrollToTop) { - if (getVisibleParagraphs().size() < 1) { + if (getVisibleParagraphs().isEmpty()) { return; } diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeParentageCrumbBar.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeParentageCrumbBar.java index 539696b4..3c0a8be3 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeParentageCrumbBar.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/NodeParentageCrumbBar.java @@ -65,14 +65,14 @@ public NodeParentageCrumbBar(@NamedArg("designerRoot") DesignerRoot designerRoot final Callback, Button> originalCrumbFactory = getCrumbFactory(); setOnCrumbAction(ev -> { - if (ev.getSelectedCrumb() != ellipsisCrumb) { + if (ev.getSelectedCrumb() != ellipsisCrumb) { // NOPMD - CompareObjectsWithEquals selectionEvents.push(ev.getSelectedCrumb().getValue()); } }); setCrumbFactory(item -> { Button button = originalCrumbFactory.call(item); - if (item == ellipsisCrumb) { + if (item == ellipsisCrumb) { // NOPMD - CompareObjectsWithEquals button.setText("... (" + numElidedNodes + ")"); button.setTooltip(new Tooltip(numElidedNodes + " ancestors are not shown")); } else if (item != null) { diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/PropertyMapView.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/PropertyMapView.java index 54721dc5..529559b3 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/PropertyMapView.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/PropertyMapView.java @@ -140,7 +140,7 @@ private static void setHeader(PropertyMapView view, PopOver popOver, String s) { popOver.setUserData(view); } - private class PropertyMappingListCell extends SmartTextFieldListCell>> { + private final class PropertyMappingListCell extends SmartTextFieldListCell>> { @Override protected Pair getNonEditingGraphic(Pair> pair) { diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/RippleEffect.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/RippleEffect.java index f04bb91c..442c1574 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/RippleEffect.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/RippleEffect.java @@ -31,13 +31,13 @@ public class RippleEffect { private Duration rippleDuration = Duration.millis(250); private double lastRippleHeight = 0; private double lastRippleWidth = 0; - private Color rippleColor = new Color(0, 0, 0, 0.11); private EventHandler handler; public RippleEffect(ReadOnlyDoubleProperty containerWidth, ReadOnlyDoubleProperty containerHeight, Supplier containerBackground) { + Color rippleColor = new Color(0, 0, 0, 0.11); circleRipple = new Circle(0.1, rippleColor); circleRipple.setOpacity(0.0); // Optional box blur on ripple - smoother ripple effect diff --git a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/reactfx/DistinctBetweenStream.java b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/reactfx/DistinctBetweenStream.java index a7c8a518..f9cdfa0a 100644 --- a/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/reactfx/DistinctBetweenStream.java +++ b/src/main/java/net/sourceforge/pmd/util/fxdesigner/util/reactfx/DistinctBetweenStream.java @@ -51,7 +51,7 @@ protected Subscription observeInputs() { } static DistinctBetweenStream distinctBetween(EventStream input, Function timerFactory) { - return new DistinctBetweenStream(input, timerFactory); + return new DistinctBetweenStream<>(input, timerFactory); } } From 585d090807eb7ea04d4c9fbca94decdf89a049a2 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 3 Feb 2024 21:04:17 +0100 Subject: [PATCH 3/4] Update custom PMD rules --- config/pmd-check.xml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/config/pmd-check.xml b/config/pmd-check.xml index e0698c29..72cb5a37 100644 --- a/config/pmd-check.xml +++ b/config/pmd-check.xml @@ -67,25 +67,24 @@ From acec04f335735ef308c427b756c1b8d741c42dd8 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 3 Feb 2024 21:17:04 +0100 Subject: [PATCH 4/4] Update release notes --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03974006..8e2050cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ * **Bump required pmd-core version to 7.0.0-SNAPSHOT.** +**Merged pull requests:** + +* [#77](https://github.com/pmd/pmd-designer/pull/77) Enable PMD checks with PMD 7 by [@adangel](https://github.com/adangel) + ## 7.0.0-rc4 * **Bump required pmd-core version to 7.0.0-rc4.**