diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
index 95925fc99..0a4a68ed5 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@ import org.apache.commons.lang3.Validate;
/**
*
FastDateFormat is a fast and thread-safe version of
* {@link java.text.SimpleDateFormat}.
- *
+ *
*
This class can be used as a direct replacement to
* SimpleDateFormat in most formatting situations.
* This class is especially useful in multi-threaded server environments.
@@ -80,10 +80,10 @@ public class FastDateFormat extends Format {
// Note that Integer.toString() is not called, the conversion is simply
// taking the value and adding (mathematically) the ASCII value for '0'.
// So, don't change this code! It works and is very fast.
-
+
/**
* Required for serialization support.
- *
+ *
* @see java.io.Serializable
*/
private static final long serialVersionUID = 1L;
@@ -104,11 +104,12 @@ public class FastDateFormat extends Format {
* SHORT locale dependent date or time style.
*/
public static final int SHORT = DateFormat.SHORT;
-
+
//@GuardedBy("this")
private static String cDefaultPattern; // lazily initialised by getInstance()
- private static final Map cInstanceCache = new HashMap(7);
+ private static final Map cInstanceCache =
+ new HashMap(7);
private static final Map
- *
+ *
* @return the time zone
*/
public TimeZone getTimeZone() {
@@ -937,7 +938,7 @@ public class FastDateFormat extends Format {
/**
*
Returns true if the time zone of the
* calendar overrides the time zone of the formatter.
- *
+ *
* @return true if time zone of formatter
* overridden for calendars
*/
@@ -947,7 +948,7 @@ public class FastDateFormat extends Format {
/**
*
Gets the locale used by this formatter.
- *
+ *
* @return the locale
*/
public Locale getLocale() {
@@ -960,7 +961,7 @@ public class FastDateFormat extends Format {
*
*
The actual formatted length will almost always be less than or
* equal to this amount.
- *
+ *
* @return the maximum formatted length
*/
public int getMaxLengthEstimate() {
@@ -971,7 +972,7 @@ public class FastDateFormat extends Format {
//-----------------------------------------------------------------------
/**
*
Compares two objects for equality.
- *
+ *
* @param obj the object to compare to
* @return true if equal
*/
@@ -995,7 +996,7 @@ public class FastDateFormat extends Format {
/**
*
Returns a hashcode compatible with equals.
- *
+ *
* @return a hashcode compatible with equals
*/
@Override
@@ -1011,7 +1012,7 @@ public class FastDateFormat extends Format {
/**
*
Gets a debugging string version of this formatter.
- *
+ *
* @return a debugging string
*/
@Override
@@ -1022,7 +1023,7 @@ public class FastDateFormat extends Format {
// Serializing
//-----------------------------------------------------------------------
/**
- * Create the object after serialization. This implementation reinitializes the
+ * Create the object after serialization. This implementation reinitializes the
* transient properties.
*
* @param in ObjectInputStream from which the object is being deserialized.
@@ -1033,7 +1034,7 @@ public class FastDateFormat extends Format {
in.defaultReadObject();
init();
}
-
+
// Rules
//-----------------------------------------------------------------------
/**
@@ -1042,14 +1043,14 @@ public class FastDateFormat extends Format {
private interface Rule {
/**
* Returns the estimated lentgh of the result.
- *
+ *
* @return the estimated length
*/
int estimateLength();
-
+
/**
* Appends the value of the specified calendar to the output buffer based on the rule implementation.
- *
+ *
* @param buffer the output buffer
* @param calendar calendar to be appended
*/
@@ -1062,7 +1063,7 @@ public class FastDateFormat extends Format {
private interface NumberRule extends Rule {
/**
* Appends the specified value to the output buffer based on the rule implementation.
- *
+ *
* @param buffer the output buffer
* @param value the value to be appended
*/
@@ -1078,7 +1079,7 @@ public class FastDateFormat extends Format {
/**
* Constructs a new instance of CharacterLiteral
* to hold the specified value.
- *
+ *
* @param value the character literal
*/
CharacterLiteral(char value) {
@@ -1109,7 +1110,7 @@ public class FastDateFormat extends Format {
/**
* Constructs a new instance of StringLiteral
* to hold the specified value.
- *
+ *
* @param value the string literal
*/
StringLiteral(String value) {
@@ -1141,7 +1142,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TextField
* with the specified field and values.
- *
+ *
* @param field the field
* @param values the field values
*/
@@ -1180,7 +1181,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of UnpadedNumberField with the specified field.
- *
+ *
* @param field the field
*/
UnpaddedNumberField(int field) {
@@ -1266,7 +1267,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of PaddedNumberField.
- *
+ *
* @param field the field
* @param size size of the output field
*/
@@ -1327,7 +1328,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TwoDigitNumberField with the specified field.
- *
+ *
* @param field the field
*/
TwoDigitNumberField(int field) {
@@ -1442,7 +1443,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TwelveHourField with the specified
* NumberRule.
- *
+ *
* @param rule the rule
*/
TwelveHourField(NumberRule rule) {
@@ -1484,7 +1485,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TwentyFourHourField with the specified
* NumberRule.
- *
+ *
* @param rule the rule
*/
TwentyFourHourField(NumberRule rule) {
@@ -1530,7 +1531,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TimeZoneNameRule with the specified properties.
- *
+ *
* @param timeZone the time zone
* @param timeZoneForced if true the time zone is forced into standard and daylight
* @param locale the locale
@@ -1592,12 +1593,12 @@ public class FastDateFormat extends Format {
private static class TimeZoneNumberRule implements Rule {
static final TimeZoneNumberRule INSTANCE_COLON = new TimeZoneNumberRule(true);
static final TimeZoneNumberRule INSTANCE_NO_COLON = new TimeZoneNumberRule(false);
-
+
final boolean mColon;
-
+
/**
* Constructs an instance of TimeZoneNumberRule with the specified properties.
- *
+ *
* @param colon add colon between HH and MM in the output if true
*/
TimeZoneNumberRule(boolean colon) {
@@ -1616,26 +1617,26 @@ public class FastDateFormat extends Format {
*/
public void appendTo(StringBuffer buffer, Calendar calendar) {
int offset = calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
-
+
if (offset < 0) {
buffer.append('-');
offset = -offset;
} else {
buffer.append('+');
}
-
+
int hours = offset / (60 * 60 * 1000);
buffer.append((char)(hours / 10 + '0'));
buffer.append((char)(hours % 10 + '0'));
-
+
if (mColon) {
buffer.append(':');
}
-
+
int minutes = offset / (60 * 1000) - 60 * hours;
buffer.append((char)(minutes / 10 + '0'));
buffer.append((char)(minutes % 10 + '0'));
- }
+ }
}
// ----------------------------------------------------------------------
@@ -1649,7 +1650,7 @@ public class FastDateFormat extends Format {
/**
* Constructs an instance of TimeZoneDisplayKey with the specified properties.
- *
+ *
* @param timeZone the time zone
* @param daylight adjust the style for daylight saving time if true
* @param style the timezone style