From f068cb71b59a8183ad5724fcfe4c2c3f4b9ccb13 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Thu, 27 Sep 2012 13:12:09 +0000 Subject: [PATCH] Tab police git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390989 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 4 +-- .../commons/lang3/time/FastDateParser.java | 30 +++++++++---------- .../apache/commons/lang3/StringUtilsTest.java | 12 ++++---- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build.xml b/build.xml index d63764bc8..b147d2209 100644 --- a/build.xml +++ b/build.xml @@ -42,8 +42,8 @@ - - + + diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index 4618262df..447e567ec 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -107,7 +107,7 @@ public class FastDateParser implements DateParser, Serializable { */ private void init() { Calendar definingCalendar = Calendar.getInstance(timeZone, locale); - thisYear= definingCalendar.get(Calendar.YEAR); + thisYear= definingCalendar.get(Calendar.YEAR); StringBuilder regex= new StringBuilder(); List collector = new ArrayList(); @@ -460,7 +460,7 @@ public class FastDateParser implements DateParser, Serializable { return formatField.length()>2 ?LITERAL_YEAR_STRATEGY :ABBREVIATED_YEAR_STRATEGY; case 'Z': case 'z': - return getLocaleSpecificStrategy(Calendar.ZONE_OFFSET, definingCalendar); + return getLocaleSpecificStrategy(Calendar.ZONE_OFFSET, definingCalendar); } } @@ -473,12 +473,12 @@ public class FastDateParser implements DateParser, Serializable { * @return a cache of Locale to Strategy */ private static ConcurrentMap getCache(int field) { - synchronized(caches) { - if(caches[field]==null) { - caches[field]= new ConcurrentHashMap(3); - } - return caches[field]; - } + synchronized(caches) { + if(caches[field]==null) { + caches[field]= new ConcurrentHashMap(3); + } + return caches[field]; + } } /** @@ -489,12 +489,12 @@ public class FastDateParser implements DateParser, Serializable { * @return a TextStrategy for the field and Locale */ private Strategy getLocaleSpecificStrategy(int field, Calendar definingCalendar) { - ConcurrentMap cache = getCache(field); - Strategy strategy= cache.get(Integer.valueOf(field)); + ConcurrentMap cache = getCache(field); + Strategy strategy= cache.get(Integer.valueOf(field)); if(strategy==null) { - strategy= field==Calendar.ZONE_OFFSET - ? new TimeZoneStrategy(locale) - : new TextStrategy(field, definingCalendar, locale); + strategy= field==Calendar.ZONE_OFFSET + ? new TimeZoneStrategy(locale) + : new TextStrategy(field, definingCalendar, locale); Strategy inCache= cache.putIfAbsent(locale, strategy); if(inCache!=null) { return inCache; @@ -503,7 +503,7 @@ public class FastDateParser implements DateParser, Serializable { return strategy; } - /** + /** * A strategy that copies the static or quoted field in the parsing pattern */ private static class CopyQuotedStrategy implements Strategy { @@ -546,7 +546,7 @@ public class FastDateParser implements DateParser, Serializable { } } - /** + /** * A strategy that handles a text field in the parsing pattern */ private static class TextStrategy implements Strategy { diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index 4064ee272..893b5e79c 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -77,12 +77,12 @@ public class StringUtilsTest { private static final String[] EMPTY_ARRAY_LIST = {}; private static final String[] NULL_ARRAY_LIST = {null}; private static final Object[] NULL_TO_STRING_LIST = { - new Object(){ - @Override - public String toString() { - return null; - } - } + new Object(){ + @Override + public String toString() { + return null; + } + } }; private static final String[] MIXED_ARRAY_LIST = {null, "", "foo"}; private static final Object[] MIXED_TYPE_LIST = {"foo", Long.valueOf(2L)};