ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1406867 - /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
Date Wed, 07 Nov 2012 23:37:10 GMT
Author: hibou
Date: Wed Nov  7 23:37:10 2012
New Revision: 1406867

URL: http://svn.apache.org/viewvc?rev=1406867&view=rev
Log:
Stay compatible with older versions of Ivy

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java?rev=1406867&r1=1406866&r2=1406867&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
Wed Nov  7 23:37:10 2012
@@ -17,11 +17,12 @@
  */
 package org.apache.ivyde.eclipse;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.List;
 
 import org.apache.ivy.util.Message;
 import org.apache.ivy.util.MessageLogger;
-import org.apache.ivy.util.StringUtils;
 import org.apache.ivyde.eclipse.ui.console.IvyConsole;
 
 public class IvyDEMessage {
@@ -162,7 +163,17 @@ public class IvyDEMessage {
     }
 
     public static void debug(Throwable t) {
-        debug(StringUtils.getStackTrace(t));
+        debug(getStackTrace(t));
+    }
+
+    private static String getStackTrace(Throwable e) {
+        if (e == null) {
+            return "";
+        }
+        StringWriter sw = new StringWriter();
+        PrintWriter printWriter = new PrintWriter(sw, true);
+        e.printStackTrace(printWriter);
+        return sw.getBuffer().toString();
     }
 
 }



Mime
View raw message