tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r892609 - /tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
Date Sun, 20 Dec 2009 16:41:22 GMT
Author: markt
Date: Sun Dec 20 16:41:22 2009
New Revision: 892609

URL: http://svn.apache.org/viewvc?rev=892609&view=rev
Log:
Tab police. No functional change.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java?rev=892609&r1=892608&r2=892609&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java Sun Dec 20 16:41:22 2009
@@ -32,7 +32,7 @@
     // XXX move message resources in this package
     protected static final StringManager sm =
         StringManager.getManager("org.apache.tomcat.util.http.res");
-	
+        
     static String st_200=null;
     static String st_302=null;
     static String st_400=null;
@@ -47,25 +47,25 @@
      *
      */
     public static String getMessage( int status ) {
-	// method from Response.
-	
-	// Does HTTP requires/allow international messages or
-	// are pre-defined? The user doesn't see them most of the time
-	switch( status ) {
-	case 200:
-	    if( st_200==null ) st_200=sm.getString( "sc.200");
-	    return st_200;
-	case 302:
-	    if( st_302==null ) st_302=sm.getString( "sc.302");
-	    return st_302;
-	case 400:
-	    if( st_400==null ) st_400=sm.getString( "sc.400");
-	    return st_400;
-	case 404:
-	    if( st_404==null ) st_404=sm.getString( "sc.404");
-	    return st_404;
-	}
-	return sm.getString("sc."+ status);
+        // method from Response.
+        
+        // Does HTTP requires/allow international messages or
+        // are pre-defined? The user doesn't see them most of the time
+        switch( status ) {
+        case 200:
+            if( st_200==null ) st_200=sm.getString( "sc.200");
+            return st_200;
+        case 302:
+            if( st_302==null ) st_302=sm.getString( "sc.302");
+            return st_302;
+        case 400:
+            if( st_400==null ) st_400=sm.getString( "sc.400");
+            return st_400;
+        case 404:
+            if( st_404==null ) st_404=sm.getString( "sc.404");
+            return st_404;
+        }
+        return sm.getString("sc."+ status);
     }
 
     /**
@@ -77,31 +77,31 @@
      */
     public static String filter(String message) {
 
-	if (message == null)
-	    return (null);
+        if (message == null)
+            return (null);
 
-	char content[] = new char[message.length()];
-	message.getChars(0, message.length(), content, 0);
-	StringBuilder result = new StringBuilder(content.length + 50);
-	for (int i = 0; i < content.length; i++) {
-	    switch (content[i]) {
-	    case '<':
-		result.append("&lt;");
-		break;
-	    case '>':
-		result.append("&gt;");
-		break;
-	    case '&':
-		result.append("&amp;");
-		break;
-	    case '"':
-		result.append("&quot;");
-		break;
-	    default:
-		result.append(content[i]);
-	    }
-	}
-	return (result.toString());
+        char content[] = new char[message.length()];
+        message.getChars(0, message.length(), content, 0);
+        StringBuilder result = new StringBuilder(content.length + 50);
+        for (int i = 0; i < content.length; i++) {
+            switch (content[i]) {
+            case '<':
+                result.append("&lt;");
+                break;
+            case '>':
+                result.append("&gt;");
+                break;
+            case '&':
+                result.append("&amp;");
+                break;
+            case '"':
+                result.append("&quot;");
+                break;
+            default:
+                result.append(content[i]);
+            }
+        }
+        return (result.toString());
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message