Author: ceki
Date: Tue Jun 24 20:26:13 2008
New Revision: 1704
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/EscapeUtil.java
Log:
indentation changes
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/EscapeUtil.java
==============================================================================
---
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/EscapeUtil.java
(original)
+++
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/pattern/util/EscapeUtil.java
Tue Jun 24 20:26:13 2008
@@ -1,39 +1,39 @@
-
package ch.qos.logback.core.pattern.util;
public class EscapeUtil {
-
- public static void escape(String escapeChars, StringBuffer buf, char
next, int pointer) {
- if (escapeChars.indexOf(next) >= 0) {
- buf.append(next);
- } else
- switch (next) {
+
+ public static void escape(String escapeChars, StringBuffer buf, char next,
+ int pointer) {
+ if (escapeChars.indexOf(next) >= 0) {
+ buf.append(next);
+ } else
+ switch (next) {
case '_':
// the \_ sequence is swallowed
break;
- case '\\':
- buf.append(next);
- break;
- case 't':
- buf.append('\t');
- break;
- case 'r':
- buf.append('\r');
- break;
- case 'n':
- buf.append('\n');
- break;
- default:
- String echars = "";
- for (int i = 0; i < escapeChars.length(); i++) {
- echars += ", \\" +
escapeChars.charAt(i);
- }
- new IllegalArgumentException("Illegal char '" +
next
- + " at column " + pointer + ".
Only \\\\, \\_" + echars
- + ", \\t, \\n, \\r combinations
are allowed as escape characters.");
- }
- }
-
+ case '\\':
+ buf.append(next);
+ break;
+ case 't':
+ buf.append('\t');
+ break;
+ case 'r':
+ buf.append('\r');
+ break;
+ case 'n':
+ buf.append('\n');
+ break;
+ default:
+ String echars = "";
+ for (int i = 0; i < escapeChars.length(); i++) {
+ echars += ", \\" + escapeChars.charAt(i);
+ }
+ new IllegalArgumentException("Illegal char '" + next + " at column "
+ + pointer + ". Only \\\\, \\_" + echars
+ + ", \\t, \\n, \\r combinations are allowed as escape
characters.");
+ }
+ }
+
public static String basicEscape(String s) {
char c;
int len = s.length();
@@ -67,4 +67,3 @@
return sbuf.toString();
}
}
-
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev