creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1549117 - /creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java
Date Sun, 08 Dec 2013 19:05:37 GMT
Author: rdonkin
Date: Sun Dec  8 19:05:37 2013
New Revision: 1549117

URL: http://svn.apache.org/r1549117
Log:
Format Code.

Modified:
    creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java

Modified: creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java
URL: http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java?rev=1549117&r1=1549116&r2=1549117&view=diff
==============================================================================
--- creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java
(original)
+++ creadur/rat/branches/gsoc/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/GuessUtils.java
Sun Dec  8 19:05:37 2013
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.document.impl.guesser;
 
 import java.util.Locale;
@@ -23,21 +23,24 @@ import java.util.Locale;
 import org.apache.commons.lang.StringUtils;
 
 public class GuessUtils {
-    
-    private static final String[] SEPARATORS = {"/", "\\"};
-    
-    /**
-     * Converts name to upper case and strips any path.
-     * @param name not null
-     * @return not null
-     */
-    public static final String normalise(final String name) {
-        String result = name.toUpperCase(Locale.US);
-        final int lastSeparatorIndex = StringUtils.lastIndexOfAny(result, SEPARATORS);
-        final int length = result.length();
-        if (lastSeparatorIndex >= 0 && lastSeparatorIndex < length) {
-            result = result.substring(lastSeparatorIndex + 1);
-        }
-        return result;
-    }
+
+	private static final String[] SEPARATORS = { "/", "\\" };
+
+	/**
+	 * Converts name to upper case and strips any path.
+	 * 
+	 * @param name
+	 *            not null
+	 * @return not null
+	 */
+	public static final String normalise(final String name) {
+		String result = name.toUpperCase(Locale.US);
+		final int lastSeparatorIndex = StringUtils.lastIndexOfAny(result,
+				SEPARATORS);
+		final int length = result.length();
+		if (lastSeparatorIndex >= 0 && lastSeparatorIndex < length) {
+			result = result.substring(lastSeparatorIndex + 1);
+		}
+		return result;
+	}
 }



Mime
View raw message