errael commented on code in PR #8253:
URL: https://github.com/apache/netbeans/pull/8253#discussion_r2019033142
##########
java/java.hints/test/unit/src/org/netbeans/modules/java/hints/errors/MagicSurroundWithTryCatchFixTest.java:
##########
@@ -47,14 +49,69 @@ public void test104085() throws Exception {
"package test; public class Test {public void test()
{try {}finally{System.out.println(\"\"); new java.io.FileInputStream(\"\");}}}",
150 - 43,
"FixImpl",
- "package test; import java.io.FileNotFoundException;
import java.util.logging.Level; import java.util.logging.Logger; public class
Test {public void test() {try {}finally{try { System.out.println(\"\"); new
java.io.FileInputStream(\"\"); } catch (FileNotFoundException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex); } }}}");
+ "package test; import java.io.FileNotFoundException;
import java.util.logging.Level; import java.util.logging.Logger; public class
Test {public void test() {try {}finally{try { System.out.println(\"\"); new
java.io.FileInputStream(\"\"); } catch (FileNotFoundException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, \"\", ex); } }}}");
Review Comment:
Using `null` does seem the best choice. Modified PR so if System.Logger
`(String) null` is used as the arg.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists