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 2020/05/04 04:55:24 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2102: [NETBEANS-4203] for InputOutput.reset() do NbWriter.reset() as needed

JaroslavTulach commented on a change in pull request #2102:
URL: https://github.com/apache/netbeans/pull/2102#discussion_r419213291



##########
File path: platform/core.output2/src/org/netbeans/core/output2/NbIOProvider.java
##########
@@ -214,7 +214,17 @@ public Lookup getIOLookup(InputOutput io) {
     @Override
     public void resetIO(InputOutput io) {
         if (io instanceof NbIO) {
-            ((NbIO) io).reset();
+            if(io.getOut() instanceof NbWriter) {
+                try {
+                    // NbWriter does OutWriter fixup,
+                    // then NbWriter invokes ((NbIO) io).reset()
+                    io.getOut().reset();
+                } catch(IOException ex) {
+                    Exceptions.printStackTrace(ex);

Review comment:
       This will probably show a dialog to the user. If you just want to print errors to console, consider `Exceptions.attachSeverity` first.




----------------------------------------------------------------
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.

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