incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r727737 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
Date Thu, 18 Dec 2008 15:07:56 GMT
Author: fmeschbe
Date: Thu Dec 18 07:07:55 2008
New Revision: 727737

URL: http://svn.apache.org/viewvc?rev=727737&view=rev
Log:
code format

Modified:
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java?rev=727737&r1=727736&r2=727737&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
(original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
Thu Dec 18 07:07:55 2008
@@ -59,7 +59,7 @@
         }
         return path;
     }
-    
+
     /**
      * Returns a string used for matching map entries against the given request
      * or URI parts.
@@ -72,8 +72,9 @@
      * @param path The (absolute) path
      * @return The request path string {scheme}://{host}:{port}{path}.
      */
-    public static String getURI(String scheme, String host, int port, String path) {
-        
+    public static String getURI(String scheme, String host, int port,
+            String path) {
+
         StringBuilder sb = new StringBuilder();
         sb.append(scheme).append("://").append(host);
         if (port > 0 && !(port == 80 && "http".equals(scheme))
@@ -81,7 +82,7 @@
             sb.append(':').append(port);
         }
         sb.append(path);
-        
+
         return sb.toString();
     }
 
@@ -101,7 +102,8 @@
         return null;
     }
 
-    public static MapEntry createResolveEntry(String url, Resource resource, boolean trailingSlash)
{
+    public static MapEntry createResolveEntry(String url, Resource resource,
+            boolean trailingSlash) {
         ValueMap props = resource.adaptTo(ValueMap.class);
         if (props != null) {
             String redirect = props.get(
@@ -122,7 +124,8 @@
         return null;
     }
 
-    public static List<MapEntry> createMapEntry(String url, Resource resource, boolean
trailingSlash) {
+    public static List<MapEntry> createMapEntry(String url, Resource resource,
+            boolean trailingSlash) {
         ValueMap props = resource.adaptTo(ValueMap.class);
         if (props != null) {
             String redirect = props.get(
@@ -149,7 +152,8 @@
                     internalRedirect.length);
                 for (String redir : internalRedirect) {
                     if (!redir.contains("$")) {
-                        prepEntries.add(new MapEntry(redir, url, status, trailingSlash));
+                        prepEntries.add(new MapEntry(redir, url, status,
+                            trailingSlash));
                     }
                 }
 
@@ -162,12 +166,14 @@
         return null;
     }
 
-    public MapEntry(String url, String redirect, int status, boolean trailingSlash) {
+    public MapEntry(String url, String redirect, int status,
+            boolean trailingSlash) {
         this(url, new String[] { redirect }, status, trailingSlash);
     }
 
-    public MapEntry(String url, String[] redirect, int status, boolean trailingSlash) {
-        
+    public MapEntry(String url, String[] redirect, int status,
+            boolean trailingSlash) {
+
         // ensure trailing slashes on redirects if the url
         // ends with a trailing slash
         if (trailingSlash) {
@@ -176,7 +182,7 @@
                 redirect[i] = appendSlash(redirect[i]);
             }
         }
-        
+
         this.urlPattern = Pattern.compile(url);
         this.redirect = redirect;
         this.status = status;
@@ -204,7 +210,7 @@
     public String getPattern() {
         return urlPattern.toString();
     }
-    
+
     public String[] getRedirect() {
         return redirect;
     }
@@ -238,7 +244,7 @@
     }
 
     // ---------- Object overwrite
-    
+
     @Override
     public String toString() {
         StringBuilder buf = new StringBuilder();



Mime
View raw message