GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [java] UnusedPrivateMethod false positive when passing in lombok.val as argument · Issue #3118 · pmd/pmd Closed Labels a:false-positivePMD flags a piece of code that is not problematic Milestone DescriptionAffects PMD Version: 6.31.0 Rule: UnusedPrivateMethod Description: Passing an argument defined using Lombok's val to a private method is not recognized as usage of that method by PMD. PMD's behavior for Lombok val should be similar to its handling of Java 10's var keyword. Changing the below test to use var instead of Lombok val leads to the test passing. Code Sample demonstrating the issue: <test-code> <description>Lombok.val should not fail</description> <expected-problems>0</expected-problems> <code><![CDATA[ import lombok.val; public class ValExample { public void example() { val example = "value"; aPrivateMethod(example); } private void aPrivateMethod(String s) { System.out.println(s); } } ]]></code> </test-code> Expected outcome: Running PMD through: Maven Activity
MetadataMetadataAssigneesLabelsa:false-positivePMD flags a piece of code that is not problematic TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |