You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/09/10 03:43:49 UTC

[GitHub] [netbeans] mbien opened a new pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

mbien opened a new pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160


   Text Blocks are in java since 15. Converted the inspection into a hint so that it doesn't show up as warning and moved it to the suggestion category.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-949862117


   @jlahoda feature freeze happened. heads up: If this bugfix is supposed to be integrated still, the target branch has to be changed to delivery before pressing the button.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-918820266


   @jlahoda interesting, will change it as you suggest. Do you know how i can reproduce it locally? when i run the test directly from netbeans after rebuilding everything once, it is all green. 
   
   I did also add "requires.nb.javac=true" to the properties as suggested in the comment on the test - same result, still all green.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] neilcsmith-net commented on pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-950680783


   Sure, merging now.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-949080288


   @jlahoda you were right. Not sure what happened last time when i had my test failing locally. Test should pass now after i switched it to `hint` like you correctly suggested. Rebased on top of latest from master.
   
   @matthiasblaesing this would be a potential candidate for integration too.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] jlahoda commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
jlahoda commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-918814363


   I think it will be necessary to replace `:verifier:` with `:hint:` in the test, at least for now. E.g.:
   ```
   diff --git a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToStringTest.java b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToStringTest.java
   index a209f8e281..505ef34154 100644
   --- a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToStringTest.java
   +++ b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToStringTest.java
   @@ -55,7 +55,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -85,7 +85,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -121,7 +121,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -156,7 +156,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -197,7 +197,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -228,7 +228,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -260,7 +260,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -290,7 +290,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -321,7 +321,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -356,7 +356,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("3:18-3:21:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("3:18-3:21:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package helloworld;\n"
   @@ -387,7 +387,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("4:27-4:30:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("4:27-4:30:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("package test;\n"
   @@ -419,7 +419,7 @@ public class ConvertTextBlockToStringTest {
                    .sourceLevel(SourceVersion.latest().name())
                    .options("--enable-preview")
                    .run(ConvertTextBlockToString.class)
   -                .findWarning("2:27-2:30:verifier:" + Bundle.ERR_ConvertTextBlockToString())
   +                .findWarning("2:27-2:30:hint:" + Bundle.ERR_ConvertTextBlockToString())
                    .applyFix()
                    .assertCompilable()
                    .assertOutput("class myClass{\n"
   ```
   


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] jlahoda commented on pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
jlahoda commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-950363982


   @neilcsmith-net, would you be OK with this being added to 12.6?


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] jlahoda commented on pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
jlahoda commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-949306790


   +1 on integrating this. I can do that in the evening today, unless @matthiasblaesing can help sooner.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-918834414


   if i replace `:verifier:` with `:hint:` all tests fail on my machine with e.g:
   ```
   Testcase: escapeCharTextBlock(org.netbeans.modules.java.hints.jdk.ConvertTextBlockToStringTest):	FAILED
   Warning: "3:18-3:21:hint:Text block may not be supported" not found. All ErrorDescriptions: [3:18-3:21:verifier:Text block may not be supported]
   junit.framework.AssertionFailedError: Warning: "3:18-3:21:hint:Text block may not be supported" not found. All ErrorDescriptions: [3:18-3:21:verifier:Text block may not be supported]
   	at org.netbeans.modules.java.hints.test.api.HintTest$HintOutput.findWarning(HintTest.java:869)
   	at org.netbeans.modules.java.hints.jdk.ConvertTextBlockToStringTest.escapeCharTextBlock(ConvertTextBlockToStringTest.java:324)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   ```
   does travis log more of the junit output? it would be useful to see a stack trace, instead of only reporting which test class failed.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-917324753


   i am actually not sure what exactly fails. When I search "ConvertTextBlockToStringTest" in the travis log it does say it failed but not *what* failed. The same test works locally with 11 and 15.
   


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-916702178


   going to take a look at the failed tests later, probably just have to update them to the new category.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] neilcsmith-net merged pull request #3160: [jackpot] ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
neilcsmith-net merged pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160


   


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] jlahoda commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
jlahoda commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-916640622


   Thanks for tackling this. The changes to the messages are great. For the hint, I guess I agree it should be on one line only (or, as far as I am concerned, disabled). But if it is a suggestion/`Hint.Kind.ACTION`, it will not be usable in Inspect&Transform, which is not much desirable.
   
   So, my suggestion would be:
   -keep the `severity = Severity.HINT`, that should make the hint work on the current line only
   -drop both `minSourceVersion = "13"` (as it does not make sense anyway) and `hintKind = Hint.Kind.ACTION`
   -change the category to `rules15`
   
   I think this should make the warning appear only if the caret is inside the span that would be converted. There may be some infrastructure changes that would make the appearance even better, but that does not need to be done here.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-916642645


   @jlahoda when i unset hintKind + set severity = Severity.HINT it indeed is inline only + still available as inspection -> perfect.
   
   will add your other suggestions too. Should I force push to keep it clean or just add a commit?


-- 
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-unsubscribe@netbeans.apache.org

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



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

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


[GitHub] [netbeans] mbien commented on pull request #3160: ConvertTextBlockToString warning should be a hint/suggestion

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3160:
URL: https://github.com/apache/netbeans/pull/3160#issuecomment-916631590


   looks like tests fail since they expect it to be available as an inspection. I was wondering if it was possible to keep it as inspection while making it only a suggestion (not a warning) in editor.  Or make it only show up if the release is set to < 15.


-- 
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-unsubscribe@netbeans.apache.org

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



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

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