This is an automated email from the ASF dual-hosted git repository.

neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
     new b04dcb7  If unenter is not available (on older javac versions), print 
the error into a log, rather than into System.err
     new f046af7  Merge pull request #3304 from jlahoda/no-unter-print
b04dcb7 is described below

commit b04dcb7474cef7c5dbfe01662a1c1792c6fce9cb
Author: Jan Lahoda <[email protected]>
AuthorDate: Fri Nov 5 06:20:34 2021 +0100

    If unenter is not available (on older javac versions), print the error into 
a log, rather than into System.err
---
 .../src/org/netbeans/api/java/source/TreeUtilities.java               | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java 
b/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
index 3316ce9..b94657d 100644
--- a/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
+++ b/java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
@@ -121,6 +121,8 @@ import org.openide.util.Exceptions;
  */
 public final class TreeUtilities {
     
+    private static final Logger LOG = 
Logger.getLogger(TreeUtilities.class.getName());
+
     /**{@link Kind}s that are represented by {@link ClassTree}.
      * 
      * @since 0.67
@@ -932,7 +934,7 @@ public final class TreeUtilities {
             Method m = Enter.class.getDeclaredMethod("unenter", 
JCCompilationUnit.class, JCTree.class);
             m.invoke(Enter.instance(ctx), cut, tree);
         } catch (Throwable t) {
-            t.printStackTrace();
+            LOG.log(Level.FINE, null, t);
         }
     }
 

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

Reply via email to