Conversation
|
|
deprecation is the right decision if a method parameter becomes a no-op - esp if there is a direct replacement with less parameters. Even if it wouldn't be for-removal, its worth getting rid of a parameter which doesn't do anything since it is something which could allow further code simplifications in future. This is just aligning NB's usage with the new API while shrinking the build log too as side effect. I am mostly looking for a second set of eyes who could go through the diff and check if it looks good. I already done that after refactoring but it wouldn't hurt. going to do a second pass and remove redundant overrides of the default method as in (there aren't many - this will be a second commit -> I think this will allow removal of a field in some cases) |
can be replaced with variants without CompilationUnitTree parameter added requires.nb.javac=true to - enterprise/maven.j2ee - java/gradle.java ignored in refactoring - java/jshell.support refactoring script: ```java $src.getStartPosition($cu, $doc, $tree) :: $src instanceof com.sun.source.util.DocSourcePositions => $src.getStartPosition($doc, $tree) ;; $src.getEndPosition($cu, $doc, $tree) :: $src instanceof com.sun.source.util.DocSourcePositions => $src.getEndPosition($doc, $tree) ;; $src.getStartPosition($cu, $tree) :: $src instanceof com.sun.source.util.SourcePositions => $src.getStartPosition($tree) ;; $src.getEndPosition($cu, $tree) :: $src instanceof com.sun.source.util.SourcePositions => $src.getEndPosition($tree) ;; ```
c284e06 to
7349925
Compare
the methods are now default methods which made the original overriding redundant.
7349925 to
f405fd1
Compare
can be replaced with variants without
CompilationUnitTreeparameter (javadoc, select 27)added
requires.nb.javac=truetoenterprise/maven.j2eejava/gradle.javaignored in refactoring
java/jshell.supportrefactoring script:
(i tried parameter type matching but it didn't work - likely classpath issue. Shouldn't matter though since there is no ambiguity)