carnold 2005/02/11 15:33:51
Modified: src/java/org/apache/log4j/helpers OptionConverter.java
Log:
Bug 22894(Backslashes): moving strip method to FileAppender, reverting
OptionConverter
Revision Changes Path
1.54 +0 -41
logging-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java
Index: OptionConverter.java
===================================================================
RCS file:
/home/cvs/logging-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- OptionConverter.java 11 Feb 2005 21:17:11 -0000 1.53
+++ OptionConverter.java 11 Feb 2005 23:33:50 -0000 1.54
@@ -33,12 +33,10 @@
// Contributors: Avy Sharell
// Matthieu Verbert
// Colin Sampaleanu
-// Curt Arnold
// Contributors: Avy Sharell
// Matthieu Verbert
// Colin Sampaleanu
-// Curt Arnold
/**
* A convenience class to convert property values to specific types.
@@ -47,7 +45,6 @@
* @author Simon Kitching;
* @author Anders Kristensen
* @author Avy Sharell
- * @author Curt Arnold
*/
public class OptionConverter {
static String DELIM_START = "${";
@@ -539,42 +536,4 @@
((ConfiguratorBase)configurator).dumpErrors();
}
}
-
- /**
- * Replaces double backslashes (except the leading doubles in UNC's)
- * with single backslashes for compatibility with existing path
specifications
- * that were working around use of OptionConverter.convertSpecialChars
- * in XML configuration files.
- *
- * @param src source string
- * @return source string with double backslashes replaced
- *
- * @since 1.3
- */
- public static String stripDuplicateBackslashes(final String src) {
- int i = src.lastIndexOf('\\');
- if (i > 0) {
- StringBuffer buf = new StringBuffer(src);
- for(; i > 0; i = src.lastIndexOf('\\', i - 1)) {
- //
- // if the preceding character is a slash then
- // remove the preceding character
- // and continue processing with the earlier part of
the string
- if(src.charAt(i - 1) == '\\') {
- buf.deleteCharAt(i);
- i--;
- if (i == 0) break;
- } else {
- //
- // if there was a single slash then
- // the string was not trying to work around
- // convertSpecialChars
- //
- return src;
- }
- }
- return buf.toString();
- }
- return src;
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]