errael commented on code in PR #8253:
URL: https://github.com/apache/netbeans/pull/8253#discussion_r2017691971


##########
java/java.hints/src/org/netbeans/modules/java/hints/jackpot/hintsimpl/LoggerStringConcat.java:
##########
@@ -172,9 +185,15 @@ private static ErrorDescription compute(HintContext ctx, 
String methodName) {
             for (TreePath tp : tps)
                 if (tp.getLeaf().getKind() == Kind.ERRONEOUS) return null;
 
-        FixImpl fix = new 
FixImpl(NbBundle.getMessage(LoggerStringConcat.class, 
"MSG_LoggerStringConcat_fix"), methodName, TreePathHandle.create(ctx.getPath(), 
ctx.getInfo()), TreePathHandle.create(message, ctx.getInfo()));
+        // fixMessageTemplate
+        FixImpl fix = new FixImpl(Bundle.MSG_LoggerStringConcat_fix(), 
methodName, TreePathHandle.create(ctx.getPath(), ctx.getInfo()), 
TreePathHandle.create(message, ctx.getInfo()));
+
+        Fix fixMessageSupplier = null;
+        if 
(ctx.getInfo().getSourceVersion().compareTo(SourceVersion.RELEASE_8) >= 0) {
+            fixMessageSupplier = JavaFixUtilities.rewriteFix(ctx, 
Bundle.MSG_LoggerStringConcat_fixLambda(), message, "() -> $message");
+        }
 
-        return ErrorDescriptionFactory.forTree(ctx, message, 
NbBundle.getMessage(LoggerStringConcat.class, "MSG_LoggerStringConcat"), 
fix.toEditorFix());
+        return ErrorDescriptionFactory.forTree(ctx, message, 
Bundle.MSG_LoggerStringConcat(), fixMessageSupplier, fix.toEditorFix());

Review Comment:
   It does, in ErrorDescriptionFactory.resolveDefaultFixes()
   
https://github.com/apache/netbeans/blob/e6698c997933a75879780f095dacfe1d731874f3/java/spi.java.hints/src/org/netbeans/spi/java/hints/ErrorDescriptionFactory.java#L266-L267
   
   Doesn't look particularly simpler to me; the opposite. But changing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to