Browse Source

Kill stringUtils.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270286 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
35fcf0d678
2 changed files with 0 additions and 82 deletions
  1. +0
    -41
      proposal/myrmidon/src/main/org/apache/tools/ant/util/StringUtils.java
  2. +0
    -41
      proposal/myrmidon/src/todo/org/apache/tools/ant/util/StringUtils.java

+ 0
- 41
proposal/myrmidon/src/main/org/apache/tools/ant/util/StringUtils.java View File

@@ -1,41 +0,0 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.tools.ant.util;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
* A set of helper methods related to string manipulation.
*
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
*/
public final class StringUtils
{

/**
* the line separator for this OS
*/
public final static String LINE_SEP = System.getProperty( "line.separator" );

/**
* Convenient method to retrieve the full stacktrace from a given exception.
*
* @param t the exception to get the stacktrace from.
* @return the stacktrace from the given exception.
*/
public static String getStackTrace( Throwable t )
{
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter( sw, true );
t.printStackTrace( pw );
pw.flush();
pw.close();
return sw.toString();
}
}

+ 0
- 41
proposal/myrmidon/src/todo/org/apache/tools/ant/util/StringUtils.java View File

@@ -1,41 +0,0 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.tools.ant.util;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
* A set of helper methods related to string manipulation.
*
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
*/
public final class StringUtils
{

/**
* the line separator for this OS
*/
public final static String LINE_SEP = System.getProperty( "line.separator" );

/**
* Convenient method to retrieve the full stacktrace from a given exception.
*
* @param t the exception to get the stacktrace from.
* @return the stacktrace from the given exception.
*/
public static String getStackTrace( Throwable t )
{
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter( sw, true );
t.printStackTrace( pw );
pw.flush();
pw.close();
return sw.toString();
}
}

Loading…
Cancel
Save