abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r423361 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java
Date Wed, 19 Jul 2006 04:21:23 GMT
Author: jmsnell
Date: Tue Jul 18 21:21:19 2006
New Revision: 423361

URL: http://svn.apache.org/viewvc?rev=423361&view=rev
Log:
Removing tabs. Tabs suck. Don't use tabs.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java?rev=423361&r1=423360&r2=423361&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/ServletRequestContext.java
Tue Jul 18 21:21:19 2006
@@ -77,65 +77,65 @@
   }
   
   public URI getBaseUri() {
-	// TODO: this should be done from properties
-	StringBuffer buffer = new StringBuffer("http://");
-	buffer.append(servletRequest.getServerName());
-	if (servletRequest.getLocalPort() != 80) {
-		buffer.append(":");
-		buffer.append(servletRequest.getLocalPort());
-	}
-	buffer.append(servletRequest.getServletPath());
-  
-  // So that .resolve() works appropriately.
-  buffer.append("/");
-	try {
-		return new URI(buffer.toString());
-	} catch (URISyntaxException e) {
-		throw new RuntimeException(e);
-	}
+    // TODO: this should be done from properties
+    StringBuffer buffer = new StringBuffer("http://");
+    buffer.append(servletRequest.getServerName());
+    if (servletRequest.getLocalPort() != 80) {
+      buffer.append(":");
+      buffer.append(servletRequest.getLocalPort());
+    }
+    buffer.append(servletRequest.getServletPath());
+    
+    // So that .resolve() works appropriately.
+    buffer.append("/");
+    try {
+      return new URI(buffer.toString());
+    } catch (URISyntaxException e) {
+      throw new RuntimeException(e);
+    }
   }
   
   public String getHeader(String name) {
-	  return servletRequest.getHeader(name);
+    return servletRequest.getHeader(name);
   }
 
   @SuppressWarnings("unchecked")
   public List<String> getHeaders(String name) {
-	  return Collections.list(servletRequest.getHeaders(name));
+    return Collections.list(servletRequest.getHeaders(name));
   }
-  
+
   @SuppressWarnings("unchecked")
   public List<String> getHeaderNames() {
-	  return Collections.list(servletRequest.getHeaderNames());
+    return  Collections.list(servletRequest.getHeaderNames());
   }
-  
+    
   public URI getPathInfo() {
-	try {
-		String pathInfo = servletRequest.getPathInfo();
-		if(pathInfo == null) {
-			pathInfo = "";
-		}
-		return new URI(pathInfo);
-	} catch (URISyntaxException e) {
-		throw new RuntimeException(e);
-	}
+    try {
+      String pathInfo = servletRequest.getPathInfo();
+      if(pathInfo == null)  {
+        pathInfo = "";
+      }
+      return new URI(pathInfo);
+    } catch (URISyntaxException e) {
+      throw new RuntimeException(e);
+    }
   }
   
   public String getParameter(String name) {
-	  return servletRequest.getParameter(name);
+    return  servletRequest.getParameter(name);
   }
-  
+    
   public List<String> getParameters(String name) {
-	  return Arrays.asList(servletRequest.getParameterValues(name)); 
+   return Arrays.asList(servletRequest.getParameterValues(name));  
   }
-  
-  @SuppressWarnings("unchecked")
-  public List<String> getParameterNames() {
-	  return Collections.list(servletRequest.getParameterNames());
+
+  @SuppressWarnings("unchecked") 
+  public List<String> getParameterNames() { 
+    return Collections.list(servletRequest.getParameterNames());
   }
-    
+        
   public InputStream getInputStream() throws IOException {
-	  return servletRequest.getInputStream();
+    return servletRequest.getInputStream();
   }
 
 }



Mime
View raw message