You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2020/05/05 09:05:11 UTC
[netbeans] branch master updated: [NETBEANS-4203] for
InputOutput.reset() do NbWriter.reset() as needed
This is an automated email from the ASF dual-hosted git repository.
skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new e61cbfb [NETBEANS-4203] for InputOutput.reset() do NbWriter.reset() as needed
new 1983ffc Merge pull request #2102 from errael/master
e61cbfb is described below
commit e61cbfbdb216032bf9def804345eea1df5c77676
Author: Ernie Rael <er...@raelity.com>
AuthorDate: Thu Apr 23 16:38:32 2020 +0100
[NETBEANS-4203] for InputOutput.reset() do NbWriter.reset() as needed
---
.../src/org/netbeans/core/output2/NbIOProvider.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/platform/core.output2/src/org/netbeans/core/output2/NbIOProvider.java b/platform/core.output2/src/org/netbeans/core/output2/NbIOProvider.java
index 1b97732..dc02729 100644
--- a/platform/core.output2/src/org/netbeans/core/output2/NbIOProvider.java
+++ b/platform/core.output2/src/org/netbeans/core/output2/NbIOProvider.java
@@ -25,6 +25,7 @@ import java.io.Reader;
import java.util.EnumSet;
import java.util.Set;
import java.util.WeakHashMap;
+import java.util.logging.Level;
import javax.swing.Action;
import org.netbeans.api.io.Hyperlink;
import org.netbeans.api.io.OutputColor;
@@ -214,7 +215,14 @@ public final class NbIOProvider extends IOProvider implements
@Override
public void resetIO(InputOutput io) {
if (io instanceof NbIO) {
- ((NbIO) io).reset();
+ try {
+ // ((NbWriter)io.getOut).reset() does OutWriter fixup,
+ // then NbWriter invokes ((NbIO) io).reset()
+ io.getOut().reset();
+ } catch (IOException ex) {
+ Exceptions.attachSeverity(ex, Level.WARNING);
+ Exceptions.printStackTrace(ex);
+ }
} else {
throw new IllegalArgumentException();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists