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] Deprecate UseObjectForClearerAPI · Issue #3741 · pmd/pmd Closed Labels is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them Milestone DescriptionThe rule UseObjectForClearerAPI reports methods that take more than 3 String parameters. I think the justification is ok, but it's bizarre to single out strings. OTOH, generalizing this to any type of argument just gives ExcessiveParameterList. Although it's less thoroughly justified, ExcessiveParameterList also recommends using an object to wrap parameters. Another problem with UseObjectForClearerAPI is that it doesn't care about constructors. Clearly, callFun("a", "b", "c", "d") is no less readable than callFun(new FunArguments("a", "b", "c", "d")) So to stay true to its goal of increasing readability, the rule should flag constructors, and also not simply recommend using an object, but also maybe the builder pattern. Since this is burned into the rule name we can't really change that (the rule name doesn't match our guidelines). I think UseObjectForClearerAPI should be deprecated and its description used to enrich the description of ExcessiveParameterList. Reacted by Dan Ziemba and Sören Glimm Activity
MetadataMetadataAssigneesLabelsis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them 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. |