harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r440606 [2/3] - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/
Date Wed, 06 Sep 2006 04:01:23 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Date.java Tue Sep  5 21:01:21 2006
@@ -37,10 +37,10 @@
 	
 	private static final long serialVersionUID = 7523967970034938905L;
 
-	transient private long milliseconds;
-
-	// Used by parse()
-	private static int creationYear = new Date().getYear();
+    // Used by parse()
+    private static int creationYear = new Date().getYear();
+    
+    private transient long milliseconds;
 
 	/**
 	 * Initializes this Date instance to the current date and time.
@@ -63,7 +63,8 @@
 	 * 
 	 * @deprecated use GregorianCalendar(int, int, int)
 	 */
-	public Date(int year, int month, int day) {
+	@Deprecated
+    public Date(int year, int month, int day) {
 		GregorianCalendar cal = new GregorianCalendar(false);
 		cal.set(1900 + year, month, day);
 		milliseconds = cal.getTimeInMillis();
@@ -86,7 +87,8 @@
 	 * 
 	 * @deprecated use GregorianCalendar(int, int, int, int, int)
 	 */
-	public Date(int year, int month, int day, int hour, int minute) {
+	@Deprecated
+    public Date(int year, int month, int day, int hour, int minute) {
 		GregorianCalendar cal = new GregorianCalendar(false);
 		cal.set(1900 + year, month, day, hour, minute);
 		milliseconds = cal.getTimeInMillis();
@@ -111,7 +113,8 @@
 	 * 
 	 * @deprecated use GregorianCalendar(int, int, int, int, int, int)
 	 */
-	public Date(int year, int month, int day, int hour, int minute, int second) {
+	@Deprecated
+    public Date(int year, int month, int day, int hour, int minute, int second) {
 		GregorianCalendar cal = new GregorianCalendar(false);
 		cal.set(1900 + year, month, day, hour, minute, second);
 		milliseconds = cal.getTimeInMillis();
@@ -137,7 +140,8 @@
 	 * 
 	 * @deprecated use DateFormat
 	 */
-	public Date(String string) {
+	@Deprecated
+    public Date(String string) {
 		milliseconds = parse(string);
 	}
 
@@ -172,7 +176,8 @@
 	 * 
 	 * @see java.lang.Cloneable
 	 */
-	public Object clone() {
+	@Override
+    public Object clone() {
 		try {
 			return super.clone();
 		} catch (CloneNotSupportedException e) {
@@ -190,10 +195,12 @@
 	 *         they are equal, and > 0 if this Date is greater
 	 */
 	public int compareTo(Date date) {
-		if (milliseconds < date.milliseconds)
-			return -1;
-		if (milliseconds == date.milliseconds)
-			return 0;
+		if (milliseconds < date.milliseconds) {
+            return -1;
+        }
+		if (milliseconds == date.milliseconds) {
+            return 0;
+        }
 		return 1;
 	}
 
@@ -209,7 +216,8 @@
 	 * 
 	 * @see #hashCode
 	 */
-	public boolean equals(Object object) {
+	@Override
+    public boolean equals(Object object) {
 		return (object == this) || (object instanceof Date)
 				&& (milliseconds == ((Date) object).milliseconds);
 	}
@@ -221,7 +229,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.DATE)
 	 */
-	public int getDate() {
+	@Deprecated
+    public int getDate() {
 		return new GregorianCalendar(milliseconds).get(Calendar.DATE);
 	}
 
@@ -232,7 +241,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.DAY_OF_WEEK)
 	 */
-	public int getDay() {
+	@Deprecated
+    public int getDay() {
 		return new GregorianCalendar(milliseconds).get(Calendar.DAY_OF_WEEK) - 1;
 	}
 
@@ -243,7 +253,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.HOUR_OF_DAY)
 	 */
-	public int getHours() {
+	@Deprecated
+    public int getHours() {
 		return new GregorianCalendar(milliseconds).get(Calendar.HOUR_OF_DAY);
 	}
 
@@ -254,7 +265,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.MINUTE)
 	 */
-	public int getMinutes() {
+	@Deprecated
+    public int getMinutes() {
 		return new GregorianCalendar(milliseconds).get(Calendar.MINUTE);
 	}
 
@@ -265,7 +277,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.MONTH)
 	 */
-	public int getMonth() {
+	@Deprecated
+    public int getMonth() {
 		return new GregorianCalendar(milliseconds).get(Calendar.MONTH);
 	}
 
@@ -276,7 +289,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.SECOND)
 	 */
-	public int getSeconds() {
+	@Deprecated
+    public int getSeconds() {
 		return new GregorianCalendar(milliseconds).get(Calendar.SECOND);
 	}
 
@@ -298,7 +312,8 @@
 	 * @deprecated use
 	 *             <code>(Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / 60000</code>
 	 */
-	public int getTimezoneOffset() {
+	@Deprecated
+    public int getTimezoneOffset() {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		return -(cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / 60000;
 	}
@@ -310,7 +325,8 @@
 	 * 
 	 * @deprecated use Calendar.get(Calendar.YEAR) - 1900
 	 */
-	public int getYear() {
+	@Deprecated
+    public int getYear() {
 		return new GregorianCalendar(milliseconds).get(Calendar.YEAR) - 1900;
 	}
 
@@ -322,14 +338,17 @@
 	 * 
 	 * @see #equals
 	 */
-	public int hashCode() {
+	@Override
+    public int hashCode() {
 		return (int) (milliseconds >>> 32) ^ (int) milliseconds;
 	}
 
 	private static int parse(String string, String[] array) {
-		for (int i = 0, alength = array.length, slength = string.length(); i < alength; i++)
-			if (string.regionMatches(true, 0, array[i], 0, slength))
-				return i;
+		for (int i = 0, alength = array.length, slength = string.length(); i < alength; i++) {
+            if (string.regionMatches(true, 0, array[i], 0, slength)) {
+                return i;
+            }
+        }
 		return -1;
 	}
 
@@ -344,7 +363,8 @@
 	 * 
 	 * @deprecated use DateFormat
 	 */
-	public static long parse(String string) {
+	@Deprecated
+    public static long parse(String string) {
 
 		if (string == null) {
 			throw new IllegalArgumentException("string is null.");
@@ -363,24 +383,28 @@
 			char next = offset < length ? string.charAt(offset) : '\r';
 			offset++;
 
-			if (next == '(')
-				commentLevel++;
+			if (next == '(') {
+                commentLevel++;
+            }
 			if (commentLevel > 0) {
-				if (next == ')')
-					commentLevel--;
-				if (commentLevel == 0)
-					next = ' ';
-				else
-					continue;
+				if (next == ')') {
+                    commentLevel--;
+                }
+				if (commentLevel == 0) {
+                    next = ' ';
+                } else {
+                    continue;
+                }
 			}
 
 			int nextState = PAD;
-			if ('a' <= next && next <= 'z' || 'A' <= next && next <= 'Z')
-				nextState = LETTERS;
-			else if ('0' <= next && next <= '9')
-				nextState = NUMBERS;
-			else if (!Character.isSpace(next) && ",+-:/".indexOf(next) == -1) //$NON-NLS-1$
-				throw new IllegalArgumentException();
+			if ('a' <= next && next <= 'z' || 'A' <= next && next <= 'Z') {
+                nextState = LETTERS;
+            } else if ('0' <= next && next <= '9') {
+                nextState = NUMBERS;
+            } else if (!Character.isSpace(next) && ",+-:/".indexOf(next) == -1) {
+                throw new IllegalArgumentException();
+            }
 
 			if (state == NUMBERS && nextState != NUMBERS) {
 				int digit = Integer.parseInt(buffer.toString());
@@ -390,60 +414,69 @@
 						zone = true;
 						zoneOffset = sign == '-' ? -digit : digit;
 						sign = 0;
-					} else
-						throw new IllegalArgumentException();
+					} else {
+                        throw new IllegalArgumentException();
+                    }
 				} else if (digit >= 70) {
 					if (year == -1
 							&& (Character.isSpace(next) || next == ','
-									|| next == '/' || next == '\r'))
-						year = digit;
-					else
-						throw new IllegalArgumentException();
+									|| next == '/' || next == '\r')) {
+                        year = digit;
+                    } else {
+                        throw new IllegalArgumentException();
+                    }
 				} else if (next == ':') {
-					if (hour == -1)
-						hour = digit;
-					else if (minute == -1)
-						minute = digit;
-					else
-						throw new IllegalArgumentException();
+					if (hour == -1) {
+                        hour = digit;
+                    } else if (minute == -1) {
+                        minute = digit;
+                    } else {
+                        throw new IllegalArgumentException();
+                    }
 				} else if (next == '/') {
-					if (month == -1)
-						month = digit - 1;
-					else if (date == -1)
-						date = digit;
-					else
-						throw new IllegalArgumentException();
+					if (month == -1) {
+                        month = digit - 1;
+                    } else if (date == -1) {
+                        date = digit;
+                    } else {
+                        throw new IllegalArgumentException();
+                    }
 				} else if (Character.isSpace(next) || next == ','
 						|| next == '-' || next == '\r') {
-					if (hour != -1 && minute == -1)
-						minute = digit;
-					else if (minute != -1 && second == -1)
-						second = digit;
-					else if (date == -1)
-						date = digit;
-					else if (year == -1)
-						year = digit;
-					else
-						throw new IllegalArgumentException();
-				} else if (year == -1 && month != -1 && date != -1)
-					year = digit;
-				else
-					throw new IllegalArgumentException();
+					if (hour != -1 && minute == -1) {
+                        minute = digit;
+                    } else if (minute != -1 && second == -1) {
+                        second = digit;
+                    } else if (date == -1) {
+                        date = digit;
+                    } else if (year == -1) {
+                        year = digit;
+                    } else {
+                        throw new IllegalArgumentException();
+                    }
+				} else if (year == -1 && month != -1 && date != -1) {
+                    year = digit;
+                } else {
+                    throw new IllegalArgumentException();
+                }
 			} else if (state == LETTERS && nextState != LETTERS) {
 				String text = buffer.toString().toUpperCase();
 				buffer.setLength(0);
-				if (text.length() == 1)
-					throw new IllegalArgumentException();
+				if (text.length() == 1) {
+                    throw new IllegalArgumentException();
+                }
 				if (text.equals("AM")) { //$NON-NLS-1$
-					if (hour == 12)
-						hour = 0;
-					else if (hour < 1 || hour > 12)
-						throw new IllegalArgumentException();
+					if (hour == 12) {
+                        hour = 0;
+                    } else if (hour < 1 || hour > 12) {
+                        throw new IllegalArgumentException();
+                    }
 				} else if (text.equals("PM")) { //$NON-NLS-1$
-					if (hour == 12)
-						hour = 0;
-					else if (hour < 1 || hour > 12)
-						throw new IllegalArgumentException();
+					if (hour == 12) {
+                        hour = 0;
+                    } else if (hour < 1 || hour > 12) {
+                        throw new IllegalArgumentException();
+                    }
 					hour += 12;
 				} else {
 					DateFormatSymbols symbols = new DateFormatSymbols(Locale.US);
@@ -460,43 +493,51 @@
 					} else if ((value = zone(text)) != 0) {
 						zone = true;
 						zoneOffset = value;
-					} else
-						throw new IllegalArgumentException();
+					} else {
+                        throw new IllegalArgumentException();
+                    }
 				}
 			}
 
-			if (next == '+' || (year != -1 && next == '-'))
-				sign = next;
-			else if (!Character.isSpace(next) && next != ','
-					&& nextState != NUMBERS)
-				sign = 0;
-
-			if (nextState == LETTERS || nextState == NUMBERS)
-				buffer.append(next);
+			if (next == '+' || (year != -1 && next == '-')) {
+                sign = next;
+            } else if (!Character.isSpace(next) && next != ','
+					&& nextState != NUMBERS) {
+                sign = 0;
+            }
+
+			if (nextState == LETTERS || nextState == NUMBERS) {
+                buffer.append(next);
+            }
 			state = nextState;
 		}
 
 		if (year != -1 && month != -1 && date != -1) {
-			if (hour == -1)
-				hour = 0;
-			if (minute == -1)
-				minute = 0;
-			if (second == -1)
-				second = 0;
-			if (year < (creationYear - 80))
-				year += 2000;
-			else if (year < 100)
-				year += 1900;
+			if (hour == -1) {
+                hour = 0;
+            }
+			if (minute == -1) {
+                minute = 0;
+            }
+			if (second == -1) {
+                second = 0;
+            }
+			if (year < (creationYear - 80)) {
+                year += 2000;
+            } else if (year < 100) {
+                year += 1900;
+            }
 			if (zone) {
 				if (zoneOffset >= 24 || zoneOffset <= -24) {
 					hour -= zoneOffset / 100;
 					minute -= zoneOffset % 100;
-				} else
-					hour -= zoneOffset;
+				} else {
+                    hour -= zoneOffset;
+                }
 				return UTC(year - 1900, month, date, hour, minute, second);
-			} else
-				return new Date(year - 1900, month, date, hour, minute, second)
-						.getTime();
+			}
+            return new Date(year - 1900, month, date, hour, minute, second)
+            		.getTime();
 		}
 		throw new IllegalArgumentException();
 	}
@@ -509,7 +550,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.DATE, day)
 	 */
-	public void setDate(int day) {
+	@Deprecated
+    public void setDate(int day) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.DATE, day);
 		milliseconds = cal.getTimeInMillis();
@@ -523,7 +565,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.HOUR_OF_DAY, hour)
 	 */
-	public void setHours(int hour) {
+	@Deprecated
+    public void setHours(int hour) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.HOUR_OF_DAY, hour);
 		milliseconds = cal.getTimeInMillis();
@@ -537,7 +580,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.MINUTE, minute)
 	 */
-	public void setMinutes(int minute) {
+	@Deprecated
+    public void setMinutes(int minute) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.MINUTE, minute);
 		milliseconds = cal.getTimeInMillis();
@@ -551,7 +595,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.MONTH, month)
 	 */
-	public void setMonth(int month) {
+	@Deprecated
+    public void setMonth(int month) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.MONTH, month);
 		milliseconds = cal.getTimeInMillis();
@@ -565,7 +610,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.SECOND, second)
 	 */
-	public void setSeconds(int second) {
+	@Deprecated
+    public void setSeconds(int second) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.SECOND, second);
 		milliseconds = cal.getTimeInMillis();
@@ -590,7 +636,8 @@
 	 * 
 	 * @deprecated use Calendar.set(Calendar.YEAR, year + 1900)
 	 */
-	public void setYear(int year) {
+	@Deprecated
+    public void setYear(int year) {
 		GregorianCalendar cal = new GregorianCalendar(milliseconds);
 		cal.set(Calendar.YEAR, year + 1900);
 		milliseconds = cal.getTimeInMillis();
@@ -604,7 +651,8 @@
 	 * 
 	 * @deprecated use DateFormat
 	 */
-	public String toGMTString() {
+	@Deprecated
+    public String toGMTString() {
 		SimpleDateFormat format1 = new SimpleDateFormat(
 				"d MMM ", Locale.US); //$NON-NLS-1$
 		SimpleDateFormat format2 = new SimpleDateFormat(
@@ -626,7 +674,8 @@
 	 * 
 	 * @deprecated use DateFormat
 	 */
-	public String toLocaleString() {
+	@Deprecated
+    public String toLocaleString() {
 		return DateFormat.getDateTimeInstance().format(this);
 	}
 
@@ -636,7 +685,8 @@
 	 * 
 	 * @return the string representation of this Date
 	 */
-	public String toString() {
+	@Override
+    public String toString() {
 		return new SimpleDateFormat("E MMM dd HH:mm:ss z ", Locale.US) //$NON-NLS-1$
 				.format(this) + 
                                 new GregorianCalendar(milliseconds).get(Calendar.YEAR);
@@ -664,7 +714,8 @@
 	 *	cal.set(year + 1900, month, day, hour, minute, second);
 	 * 	cal.getTime().getTime();</code>
 	 */
-	public static long UTC(int year, int month, int day, int hour, int minute,
+	@Deprecated
+    public static long UTC(int year, int month, int day, int hour, int minute,
 			int second) {
 		GregorianCalendar cal = new GregorianCalendar(false);
 		cal.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
@@ -673,22 +724,30 @@
 	}
 
 	private static int zone(String text) {
-		if (text.equals("EST")) //$NON-NLS-1$
-			return -5;
-		if (text.equals("EDT")) //$NON-NLS-1$
-			return -4;
-		if (text.equals("CST")) //$NON-NLS-1$
-			return -6;
-		if (text.equals("CDT")) //$NON-NLS-1$
-			return -5;
-		if (text.equals("MST")) //$NON-NLS-1$
-			return -7;
-		if (text.equals("MDT")) //$NON-NLS-1$
-			return -6;
-		if (text.equals("PST")) //$NON-NLS-1$
-			return -8;
-		if (text.equals("PDT")) //$NON-NLS-1$
-			return -7;
+		if (text.equals("EST")) {
+            return -5;
+        }
+		if (text.equals("EDT")) {
+            return -4;
+        }
+		if (text.equals("CST")) {
+            return -6;
+        }
+		if (text.equals("CDT")) {
+            return -5;
+        }
+		if (text.equals("MST")) {
+            return -7;
+        }
+		if (text.equals("MDT")) {
+            return -6;
+        }
+		if (text.equals("PST")) {
+            return -8;
+        }
+		if (text.equals("PDT")) {
+            return -7;
+        }
 		return 0;
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/DuplicateFormatFlagsException.java Tue Sep  5 21:01:21 2006
@@ -25,11 +25,10 @@
 	private String flags;
 
 	/**
-	 * Constructs a DuplicateFormatFlagsException which flags is specified.
-	 * 
-	 * @param f
-	 *            The format flags that contian a duplicate flag.
-	 */
+     * Constructs a DuplicateFormatFlagsException which flags is specified.
+     * 
+     * @param f The format flags that contain a duplicate flag.
+     */
 	public DuplicateFormatFlagsException(String f) {
 		if (null == f) {
 			throw new NullPointerException();
@@ -38,9 +37,9 @@
 	}
 
 	/**
-	 * Returns the format flags that contian a duplicate flag.
+	 * Returns the format flags that contain a duplicate flag.
 	 * 
-	 * @return The format flags that contian a duplicate flag.
+	 * @return The format flags that contain a duplicate flag.
 	 */
 	public String getFlags() {
 		return flags;
@@ -51,7 +50,8 @@
 	 * 
 	 * @return The message string of the DuplicateFormatFlagsException.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		StringBuilder buffer = new StringBuilder();
 		buffer.append("Flags of the DuplicateFormatFlagsException is'");
 		buffer.append(flags);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EventObject.java Tue Sep  5 21:01:21 2006
@@ -40,10 +40,11 @@
 	 *            the object which fired the event
 	 */
 	public EventObject(Object source) {
-		if (source != null)
-			this.source = source;
-		else
-			throw new IllegalArgumentException();
+		if (source != null) {
+            this.source = source;
+        } else {
+            throw new IllegalArgumentException();
+        }
 	}
 
 	/**
@@ -60,7 +61,8 @@
 	 * 
 	 * @return the string representation of this EventObject
 	 */
-	public String toString() {
-		return getClass().getName() + "[source=" + String.valueOf(source) + ']'; //$NON-NLS-1$
+	@Override
+    public String toString() {
+		return getClass().getName() + "[source=" + source + ']'; //$NON-NLS-1$
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java Tue Sep  5 21:01:21 2006
@@ -70,7 +70,8 @@
 	 * 
 	 * @return The message string of the FormatFlagsConversionMismatchException.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		StringBuilder buffer = new StringBuilder();
 		buffer.append("Mismatched Convertor =");
 		buffer.append(c);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formatter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formatter.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formatter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Formatter.java Tue Sep  5 21:01:21 2006
@@ -418,6 +418,7 @@
      * @throws FormatterClosedException
      *             If the formatter has been closed.
      */
+    @Override
     public String toString() {
         checkClosed();
         return out.toString();
@@ -1597,7 +1598,7 @@
             } else {
                 Date date = null;
                 if (arg instanceof Long) {
-                    date = new Date((Long) arg);
+                    date = new Date(((Long)arg).longValue());
                 } else if (arg instanceof Date) {
                     date = (Date) arg;
                 } else {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java Tue Sep  5 21:01:21 2006
@@ -48,11 +48,11 @@
 
 	private int threshold;
 
-	transient int firstSlot = 0;
+	transient int firstSlot;
 
 	transient int lastSlot = -1;
 
-	transient int modCount = 0;
+	transient int modCount;
 
 	private static final Enumeration<?> EMPTY_ENUMERATION = new Enumeration<Object>() {
         public boolean hasMoreElements() {
@@ -165,9 +165,8 @@
 					return type.get(lastEntry);
 				}
 				throw new NoSuchElementException();
-			} else {
-                throw new ConcurrentModificationException();
-            }
+			}
+            throw new ConcurrentModificationException();
 		}
 
 		public void remove() {
@@ -241,9 +240,8 @@
 				Object result = key ? entry.key : entry.value;
 				entry = entry.next;
 				return (E)result;
-			} else {
-                throw new NoSuchElementException();
-            }
+			}
+            throw new NoSuchElementException();
 		}
 	}
 
@@ -694,9 +692,8 @@
 			V result = entry.value;
 			entry.value = value;
 			return result;
-		} else {
-            throw new NullPointerException();
-        }
+		}
+        throw new NullPointerException();
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java Tue Sep  5 21:01:21 2006
@@ -53,7 +53,8 @@
 	 * 
 	 * @retun The message string of the IllegalFormatCodePointException.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		StringBuilder buffer = new StringBuilder();
 		buffer.append("Code point is ");
 		char[] chars = Character.toChars(c);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatConversionException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatConversionException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatConversionException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatConversionException.java Tue Sep  5 21:01:21 2006
@@ -70,7 +70,8 @@
 	 * 
 	 * @return The message string of the IllegalFormatConversionException.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		StringBuilder buffer = new StringBuilder();
 		buffer.append(c);
 		buffer.append(" is incompatible with ");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatFlagsException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatFlagsException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatFlagsException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatFlagsException.java Tue Sep  5 21:01:21 2006
@@ -54,9 +54,10 @@
 	/**
 	 * Return the message string of the IllegalFormatFlagsException.
 	 * 
-	 * @retun The message string of the IllegalFormatFlagsException.
+	 * @return The message string of the IllegalFormatFlagsException.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		StringBuilder buffer = new StringBuilder();
 		buffer.append("Flags = '");
 		buffer.append(flags);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatPrecisionException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatPrecisionException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatPrecisionException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatPrecisionException.java Tue Sep  5 21:01:21 2006
@@ -52,7 +52,8 @@
 	 * 
 	 * @return The message of the exception.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		return String.valueOf(p);
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatWidthException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatWidthException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatWidthException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IllegalFormatWidthException.java Tue Sep  5 21:01:21 2006
@@ -52,7 +52,8 @@
 	 * 
 	 * @return The message of the exception.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		return String.valueOf(w);
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/LinkedList.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/LinkedList.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/LinkedList.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/LinkedList.java Tue Sep  5 21:01:21 2006
@@ -110,12 +110,10 @@
 					lastLink = link = next;
 					pos++;
 					return link.data;
-				} else {
-                    throw new NoSuchElementException();
-                }
-			} else {
-                throw new ConcurrentModificationException();
-            }
+				}
+                throw new NoSuchElementException();
+			}
+            throw new ConcurrentModificationException();
 		}
 
 		public int nextIndex() {
@@ -129,12 +127,10 @@
 					link = link.previous;
 					pos--;
 					return lastLink.data;
-				} else {
-                    throw new NoSuchElementException();
-                }
-			} else {
-                throw new ConcurrentModificationException();
-            }
+				}
+                throw new NoSuchElementException();
+			}
+            throw new ConcurrentModificationException();
 		}
 
 		public int previousIndex() {
@@ -431,9 +427,8 @@
                 }
 			}
 			return link.data;
-		} else {
-            throw new IndexOutOfBoundsException();
-        }
+		}
+        throw new IndexOutOfBoundsException();
 	}
 
 	/**
@@ -581,9 +576,8 @@
 			size--;
 			modCount++;
 			return link.data;
-		} else {
-            throw new IndexOutOfBoundsException();
-        }
+		}
+        throw new IndexOutOfBoundsException();
 	}
 
 	@Override
@@ -627,9 +621,8 @@
 			size--;
 			modCount++;
 			return first.data;
-		} else {
-            throw new NoSuchElementException();
-        }
+		}
+        throw new NoSuchElementException();
 	}
 
 	/**
@@ -649,9 +642,8 @@
 			size--;
 			modCount++;
 			return last.data;
-		} else {
-            throw new NoSuchElementException();
-        }
+		}
+        throw new NoSuchElementException();
 	}
 
 	/**
@@ -683,9 +675,8 @@
 			E result = link.data;
 			link.data = object;
 			return result;
-		} else {
-            throw new IndexOutOfBoundsException();
-        }
+		}
+        throw new IndexOutOfBoundsException();
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListResourceBundle.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListResourceBundle.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListResourceBundle.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ListResourceBundle.java Tue Sep  5 21:01:21 2006
@@ -48,7 +48,8 @@
 	 * 
 	 * @return an Enumeration of the resource names
 	 */
-	public Enumeration<String> getKeys() {
+	@Override
+    public Enumeration<String> getKeys() {
 		if (table == null) {
             initializeTable();
         }
@@ -106,7 +107,8 @@
 	 *            the name of the resource
 	 * @return the resource object
 	 */
-	public final Object handleGetObject(String key) {
+	@Override
+    public final Object handleGetObject(String key) {
 		if (table == null) {
             initializeTable();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Tue Sep  5 21:01:21 2006
@@ -240,7 +240,8 @@
 	 * 
 	 * @see java.lang.Cloneable
 	 */
-	public Object clone() {
+	@Override
+    public Object clone() {
 		try {
 			return super.clone();
 		} catch (CloneNotSupportedException e) {
@@ -260,7 +261,8 @@
 	 * 
 	 * @see #hashCode
 	 */
-	public boolean equals(Object object) {
+	@Override
+    public boolean equals(Object object) {
 		if (object == this) {
             return true;
         }
@@ -676,7 +678,8 @@
 	 * 
 	 * @see #equals
 	 */
-	public synchronized int hashCode() {
+	@Override
+    public synchronized int hashCode() {
 		return countryCode.hashCode() + languageCode.hashCode()
 				+ variantCode.hashCode();
 	}
@@ -708,7 +711,8 @@
 	 * 
 	 * @return the string representation of this Locale
 	 */
-	public final String toString() {
+	@Override
+    public final String toString() {
 		StringBuilder result = new StringBuilder();
 		result.append(languageCode);
 		if (countryCode.length() > 0) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MapEntry.java Tue Sep  5 21:01:21 2006
@@ -37,7 +37,8 @@
 		value = theValue;
 	}
 
-	public Object clone() {
+	@Override
+    public Object clone() {
 		try {
 			return super.clone();
 		} catch (CloneNotSupportedException e) {
@@ -45,17 +46,19 @@
 		}
 	}
 
-	public boolean equals(Object object) {
-		if (this == object)
-			return true;
+	@Override
+    public boolean equals(Object object) {
+		if (this == object) {
+            return true;
+        }
 		if (object instanceof Map.Entry) {
 			Map.Entry<?, ?> entry = (Map.Entry<?, ?>) object;
 			return (key == null ? entry.getKey() == null : key.equals(entry
 					.getKey()))
 					&& (value == null ? entry.getValue() == null : value
 							.equals(entry.getValue()));
-		} else
-			return false;
+		}
+        return false;
 	}
 
 	public K getKey() {
@@ -66,7 +69,8 @@
 		return value;
 	}
 
-	public int hashCode() {
+	@Override
+    public int hashCode() {
 		return (key == null ? 0 : key.hashCode())
 				^ (value == null ? 0 : value.hashCode());
 	}
@@ -77,6 +81,7 @@
 		return result;
 	}
     
+    @Override
     public String toString() {
         return key + "=" + value;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MiniEnumSet.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MiniEnumSet.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MiniEnumSet.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MiniEnumSet.java Tue Sep  5 21:01:21 2006
@@ -23,14 +23,13 @@
  */
 @SuppressWarnings("serial")
 final class MiniEnumSet<E extends Enum<E>> extends EnumSet<E> {
+    private static final int MAX_ELEMENTS = 64;
     
-    private int size = 0;
+    private int size;
     
-    final private E[] enums;
-
-    static final private int MAX_ELEMENTS = 64;
+    private final E[] enums;    
     
-    private long bits = 0;
+    private long bits;
     
     MiniEnumSet(Class<E> elementType) {
         super(elementType);
@@ -39,12 +38,12 @@
     
     private class MiniEnumSetIterator implements Iterator<E> {
 
-        private long unProcessedBits = 0;
+        private long unProcessedBits;
 
         /*
          * Mask for current element.
          */
-        private long currentElementMask = 0;
+        private long currentElementMask;
 
         private boolean canProcess = true;
 
@@ -118,11 +117,11 @@
             return false;
         }
         if (collection instanceof EnumSet) {
-            EnumSet set = (EnumSet) collection;
+            EnumSet<?> set = (EnumSet)collection;
             if (!isValidType(set.elementClass)) {
                 throw new ClassCastException();
             }
-            MiniEnumSet miniSet = (MiniEnumSet) set;
+            MiniEnumSet<?> miniSet = (MiniEnumSet<?>) set;
             long oldBits = bits;
             bits |= miniSet.bits;
             size = Long.bitCount(bits);
@@ -139,7 +138,7 @@
         if (!isValidType(object.getClass())) {
             return false;
         }
-        Enum element = (Enum) object;
+        Enum<?> element = (Enum<?>) object;
         int ordinal = element.ordinal();
         return (bits & (1l << ordinal)) != 0;
     }
@@ -150,7 +149,7 @@
             return true;
         }
         if (collection instanceof MiniEnumSet) {
-            MiniEnumSet set = (MiniEnumSet) collection;
+            MiniEnumSet<?> set = (MiniEnumSet<?>) collection;
             return isValidType(set.elementClass ) && ((bits & set.bits) == set.bits);
         }
         return !(collection instanceof EnumSet) && super.containsAll(collection);  
@@ -202,7 +201,7 @@
         if (!contains(object)) {
             return false;
         }
-        Enum element = (Enum) object;
+        Enum<?> element = (Enum<?>) object;
         int ordinal = element.ordinal();
         bits -= (1l << ordinal);
         size--;
@@ -214,11 +213,11 @@
         if (!(object instanceof EnumSet)) {
             return super.equals(object);
         }
-        EnumSet<E> set =(EnumSet<E>)object; 
+        EnumSet<?> set =(EnumSet<?>)object; 
         if( !isValidType(set.elementClass) ) {
             return size == 0 && set.size() == 0;
         }
-        return bits == ((MiniEnumSet<E>)set).bits;
+        return bits == ((MiniEnumSet<?>)set).bits;
     }
     
     @Override

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatArgumentException.java Tue Sep  5 21:01:21 2006
@@ -15,10 +15,12 @@
 
 package java.util;
 
+import org.apache.harmony.luni.util.Msg;
+
 /**
  * The unchecked exception will be thrown out if there no corresponding argument
- * with the specified conversion or an argument index that refers to an
- * unexisting argument.
+ * with the specified conversion or an argument index that refers to a
+ * missing argument.
  */
 public class MissingFormatArgumentException extends IllegalFormatException {
 	private static final long serialVersionUID = 19190115L;
@@ -53,7 +55,8 @@
 	 * 
 	 * @return The message of the exception.
 	 */
-	public String getMessage() {
-        return org.apache.harmony.luni.util.Msg.getString("K0348", s);
+	@Override
+    public String getMessage() {
+        return Msg.getString("K0348", s);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/MissingFormatWidthException.java Tue Sep  5 21:01:21 2006
@@ -54,7 +54,8 @@
 	 * 
 	 * @return The message of the exception.
 	 */
-	public String getMessage() {
+	@Override
+    public String getMessage() {
 		return s;
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PriorityQueue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PriorityQueue.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PriorityQueue.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PriorityQueue.java Tue Sep  5 21:01:21 2006
@@ -41,7 +41,7 @@
 
     private static final int DEFAULT_CAPACITY_RATIO = 2;
 
-    private int size = 0;
+    private int size;
 
     private Comparator<? super E> comparator;
 
@@ -136,6 +136,7 @@
      * 
      * @return the iterator of the priority queue.
      */
+    @Override
     public Iterator<E> iterator() {
         return new PriorityIterator();
     }
@@ -146,6 +147,7 @@
      * 
      * @return the size of the priority queue.
      */
+    @Override
     public int size() {
         return size;
     }
@@ -153,6 +155,7 @@
     /**
      * Removes all the elements of the priority queue.
      */
+    @Override
     public void clear() {
         Arrays.fill(elements, null);
         size = 0;
@@ -220,6 +223,7 @@
      * @return true if the object is in the priority queue, false if the object
      *         is not in the priority queue.
      */
+    @Override
     @SuppressWarnings("unchecked")
     public boolean remove(Object o) {
         if (o == null) {
@@ -248,6 +252,7 @@
      *         queue.
      * @throws NullPointerExcepiton if the element is null.
      */
+    @Override
     public boolean add(E o) {
         return offer(o);
     }
@@ -331,9 +336,8 @@
     private int compare(E o1, E o2) {
         if (null != comparator) {
             return comparator.compare(o1, o2);
-        } else {
-            return ((Comparable<? super E>) o1).compareTo(o2);
         }
+        return ((Comparable<? super E>) o1).compareTo(o2);
     }
 
     private void siftUp(int childIndex) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java Tue Sep  5 21:01:21 2006
@@ -442,7 +442,8 @@
 	 * 
 	 * @deprecated Does not throw an IOException, use store()
 	 */
-	public void save(OutputStream out, String comment) {
+	@Deprecated
+    public void save(OutputStream out, String comment) {
 		try {
 			store(out, comment);
 		} catch (IOException e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyPermission.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyPermission.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyPermission.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/PropertyPermission.java Tue Sep  5 21:01:21 2006
@@ -51,15 +51,17 @@
 				" \t\n\r,"); //$NON-NLS-1$
 		while (tokenizer.hasMoreTokens()) {
 			String token = tokenizer.nextToken();
-			if (token.equals("read")) //$NON-NLS-1$
-				read = true;
-			else if (token.equals("write")) //$NON-NLS-1$
-				write = true;
-			else
-				throw new IllegalArgumentException();
+			if (token.equals("read")) {
+                read = true;
+            } else if (token.equals("write")) {
+                write = true;
+            } else {
+                throw new IllegalArgumentException();
+            }
 		}
-		if (!read && !write)
-			throw new IllegalArgumentException();
+		if (!read && !write) {
+            throw new IllegalArgumentException();
+        }
 	}
 
 	/**
@@ -74,7 +76,8 @@
 	 *         <code>false</code> if it is different from this object
 	 * @see #hashCode
 	 */
-	public boolean equals(Object o) {
+	@Override
+    public boolean equals(Object o) {
 		if (super.equals(o)) {
 			PropertyPermission pp = (PropertyPermission) o;
 			return read == pp.read && write == pp.write;
@@ -88,7 +91,8 @@
 	 * 
 	 * @return String the actions associated with the receiver.
 	 */
-	public String getActions() {
+	@Override
+    public String getActions() {
 		return read ? (write ? "read,write" : "read") : "write";  //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
 	}
 
@@ -101,7 +105,8 @@
 	 * 
 	 * @see #equals
 	 */
-	public int hashCode() {
+	@Override
+    public int hashCode() {
 		return super.hashCode();
 	}
 
@@ -113,7 +118,8 @@
 	 * @param permission
 	 *            java.security.Permission the permission to check
 	 */
-	public boolean implies(Permission permission) {
+	@Override
+    public boolean implies(Permission permission) {
 		if (super.implies(permission)) {
 			PropertyPermission pp = (PropertyPermission) permission;
 			return (read || !pp.read) && (write || !pp.write);
@@ -129,7 +135,8 @@
 	 * 
 	 * see java.security.BasicPermissionCollection
 	 */
-	public PermissionCollection newPermissionCollection() {
+	@Override
+    public PermissionCollection newPermissionCollection() {
 		return new PropertyPermissionCollection();
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java Tue Sep  5 21:01:21 2006
@@ -19,7 +19,7 @@
 import java.io.Serializable;
 
 /**
- * This class provides methods that generates pseudorandom number of different
+ * This class provides methods that generates pseudo-random numbers of different
  * types, such as int, long, double and float using either
  * 
  * @see Properties
@@ -75,12 +75,12 @@
 	}
 
 	/**
-	 * Answers a pseudorandom uniformly distributed <code>int</code> value of
+	 * Answers a pseudo-random uniformly distributed <code>int</code> value of
 	 * the number of bits specified by the argument <code>bits</code> as
 	 * described by Donald E. Knuth in <i>The Art of Computer Programming,
 	 * Volume 2: Seminumerical Algorithms</i>, section 3.2.1.
 	 * 
-	 * @return int a pseudorandom generated int number
+	 * @return int a pseudo-random generated int number
 	 * @param bits
 	 *            number of bits of the returned value
 	 * 
@@ -98,10 +98,10 @@
 	}
 
 	/**
-	 * Answers the next pseudorandom, uniformly distributed boolean value
+	 * Answers the next pseudo-random, uniformly distributed boolean value
 	 * generated by this generator.
 	 * 
-	 * @return boolean a pseudorandom, uniformly distributed boolean value
+	 * @return boolean a pseudo-random, uniformly distributed boolean value
 	 */
 	public boolean nextBoolean() {
 		return next(1) != 0;
@@ -117,15 +117,14 @@
 	 * @see #next
 	 */
 	public void nextBytes(byte[] buf) {
-		// for (int i = 0; i < buf.length; i++)
-		// buf[i] = (byte) next(8);
 		int rand = 0, count = 0, loop = 0;
 		while (count < buf.length) {
 			if (loop == 0) {
 				rand = nextInt();
 				loop = 3;
-			} else
-				loop--;
+			} else {
+                loop--;
+            }
 			buf[count++] = (byte) rand;
 			rand >>= 8;
 		}
@@ -156,7 +155,7 @@
 	}
 
 	/**
-	 * Pseudorandomly generates (approximately) a normally distributed
+	 * pseudo-randomly generates (approximately) a normally distributed
 	 * <code>double</code> value with mean 0.0 and a standard deviation value
 	 * of <code>1.0</code> using the <i>polar method<i> of G. E. P. Box, M.
 	 * E. Muller, and G. Marsaglia, as described by Donald E. Knuth in <i>The
@@ -205,8 +204,8 @@
 	}
 
 	/**
-	 * Returns to the caller a new pseudorandom integer value which is uniformly
-	 * distributed between 0 (inclusively) and the value of <cod>n</code>
+	 * Returns to the caller a new pseudo-random integer value which is uniformly
+	 * distributed between 0 (inclusively) and the value of <code>n</code>
 	 * (exclusively).
 	 * 
 	 * @return int
@@ -215,16 +214,17 @@
 	 */
 	public int nextInt(int n) {
 		if (n > 0) {
-			if ((n & -n) == n)
-				return (int) ((n * (long) next(31)) >> 31);
+			if ((n & -n) == n) {
+                return (int) ((n * (long) next(31)) >> 31);
+            }
 			int bits, val;
 			do {
 				bits = next(31);
 				val = bits % n;
 			} while (bits - val + (n - 1) < 0);
 			return val;
-		} else
-			throw new IllegalArgumentException();
+		}
+		throw new IllegalArgumentException();
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java Tue Sep  5 21:01:21 2006
@@ -44,11 +44,13 @@
 	private Locale locale;
 
 	static class MissingBundle extends ResourceBundle {
-		public Enumeration<String> getKeys() {
+		@Override
+        public Enumeration<String> getKeys() {
 			return null;
 		}
 
-		public Object handleGetObject(String name) {
+		@Override
+        public Object handleGetObject(String name) {
 			return null;
 		}
 	}
@@ -132,9 +134,8 @@
                 return bundle;
             }
 			throw new MissingResourceException(null, bundleName, ""); //$NON-NLS-1$
-		} else {
-            throw new NullPointerException();
-        }
+		}
+        throw new NullPointerException();
 	}
 
 	private static ResourceBundle getBundleImpl(String bundleName,
@@ -159,9 +160,8 @@
                 return bundle;
             }
 			throw new MissingResourceException(null, bundleName, ""); //$NON-NLS-1$
-		} else {
-            throw new NullPointerException();
-        }
+		}
+        throw new NullPointerException();
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Scanner.java Tue Sep  5 21:01:21 2006
@@ -1663,6 +1663,7 @@
      * 
      * @return a string to represent this scanner
      */
+    @Override
     public String toString() {
         StringBuilder stringBuilder = new StringBuilder();
         stringBuilder.append(this.getClass()).append(": ") //$NON-NLS-1$

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SimpleTimeZone.java Tue Sep  5 21:01:21 2006
@@ -15,12 +15,13 @@
 
 package java.util;
 
-
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamField;
 
+import org.apache.harmony.luni.util.Msg;
+
 /**
  * SimpleTimeZone represents a local time zone and its daylight savings time
  * rules for the gregorian calendar.
@@ -157,9 +158,9 @@
 			int startDay, int startDayOfWeek, int startTime, int endMonth,
 			int endDay, int endDayOfWeek, int endTime, int daylightSavings) {
 		this(offset, name);
-		if (daylightSavings <= 0)
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00e9", daylightSavings)); //$NON-NLS-1$
+		if (daylightSavings <= 0) {
+            throw new IllegalArgumentException(Msg.getString("K00e9", daylightSavings)); //$NON-NLS-1$
+        }
 		dstSavings = daylightSavings;
 
 		setStartRule(startMonth, startDay, startDayOfWeek, startTime);
@@ -223,10 +224,12 @@
 	 * 
 	 * @see java.lang.Cloneable
 	 */
-	public Object clone() {
+	@Override
+    public Object clone() {
 		SimpleTimeZone zone = (SimpleTimeZone) super.clone();
-		if (daylightSavings != null)
-			zone.daylightSavings = (GregorianCalendar) daylightSavings.clone();
+		if (daylightSavings != null) {
+            zone.daylightSavings = (GregorianCalendar) daylightSavings.clone();
+        }
 		return zone;
 	}
 
@@ -242,9 +245,11 @@
 	 * 
 	 * @see #hashCode
 	 */
-	public boolean equals(Object object) {
-		if (!(object instanceof SimpleTimeZone))
-			return false;
+	@Override
+    public boolean equals(Object object) {
+		if (!(object instanceof SimpleTimeZone)) {
+            return false;
+        }
 		SimpleTimeZone tz = (SimpleTimeZone) object;
 		return getID().equals(tz.getID())
 				&& rawOffset == tz.rawOffset
@@ -266,9 +271,11 @@
 	 * 
 	 * @return the daylight savings offset in milliseconds
 	 */
-	public int getDSTSavings() {
-		if (!useDaylight)
-			return 0;
+	@Override
+    public int getDSTSavings() {
+		if (!useDaylight) {
+            return 0;
+        }
 		return dstSavings;
 	}
 
@@ -292,24 +299,29 @@
 	 *            the time of day in milliseconds
 	 * @return the offset from GMT in milliseconds
 	 */
-	public int getOffset(int era, int year, int month, int day, int dayOfWeek,
+	@Override
+    public int getOffset(int era, int year, int month, int day, int dayOfWeek,
 			int time) {
-		if (era != GregorianCalendar.BC && era != GregorianCalendar.AD)
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00ea", era)); //$NON-NLS-1$
+		if (era != GregorianCalendar.BC && era != GregorianCalendar.AD) {
+            throw new IllegalArgumentException(Msg.getString("K00ea", era)); //$NON-NLS-1$
+        }
 		checkRange(month, dayOfWeek, time);
-		if (month != Calendar.FEBRUARY || day != 29 || !isLeapYear(year))
-			checkDay(month, day);
+		if (month != Calendar.FEBRUARY || day != 29 || !isLeapYear(year)) {
+            checkDay(month, day);
+        }
 
 		if (!useDaylightTime() || era != GregorianCalendar.AD
-				|| year < startYear)
-			return rawOffset;
+				|| year < startYear) {
+            return rawOffset;
+        }
 		if (endMonth < startMonth) {
-			if (month > endMonth && month < startMonth)
-				return rawOffset;
+			if (month > endMonth && month < startMonth) {
+                return rawOffset;
+            }
 		} else {
-			if (month < startMonth || month > endMonth)
-				return rawOffset;
+			if (month < startMonth || month > endMonth) {
+                return rawOffset;
+            }
 		}
 
 		int ruleDay = 0, daysInMonth, firstDayOfMonth = mod7(dayOfWeek - day);
@@ -324,8 +336,9 @@
 							+ (startDay - 1) * 7;
 				} else {
 					daysInMonth = GregorianCalendar.DaysInMonth[startMonth];
-					if (startMonth == Calendar.FEBRUARY && isLeapYear(year))
-						daysInMonth += 1;
+					if (startMonth == Calendar.FEBRUARY && isLeapYear(year)) {
+                        daysInMonth += 1;
+                    }
 					ruleDay = daysInMonth
 							+ 1
 							+ mod7(startDayOfWeek
@@ -342,12 +355,14 @@
 				ruleDay = startDay
 						+ mod7(startDayOfWeek
 								- (firstDayOfMonth + startDay - 1));
-				if (ruleDay != startDay)
-					ruleDay -= 7;
+				if (ruleDay != startDay) {
+                    ruleDay -= 7;
+                }
 				break;
 			}
-			if (ruleDay > day || ruleDay == day && time < startTime)
-				return rawOffset;
+			if (ruleDay > day || ruleDay == day && time < startTime) {
+                return rawOffset;
+            }
 		}
 
 		int ruleTime = endTime - dstSavings;
@@ -363,8 +378,9 @@
 							+ (endDay - 1) * 7;
 				} else {
 					daysInMonth = GregorianCalendar.DaysInMonth[endMonth];
-					if (endMonth == Calendar.FEBRUARY && isLeapYear(year))
-						daysInMonth++;
+					if (endMonth == Calendar.FEBRUARY && isLeapYear(year)) {
+                        daysInMonth++;
+                    }
 					ruleDay = daysInMonth
 							+ 1
 							+ mod7(endDayOfWeek
@@ -379,8 +395,9 @@
 			case DOW_LE_DOM_MODE:
 				ruleDay = endDay
 						+ mod7(endDayOfWeek - (firstDayOfMonth + endDay - 1));
-				if (ruleDay != endDay)
-					ruleDay -= 7;
+				if (ruleDay != endDay) {
+                    ruleDay -= 7;
+                }
 				break;
 			}
 
@@ -390,19 +407,23 @@
 				ruleTime = (ruleTime % 86400000) + 86400000;
 				ruleDay -= changeDays;
 				if (ruleDay <= 0) {
-					if (--ruleMonth < Calendar.JANUARY)
-						ruleMonth = Calendar.DECEMBER;
+					if (--ruleMonth < Calendar.JANUARY) {
+                        ruleMonth = Calendar.DECEMBER;
+                    }
 					ruleDay += GregorianCalendar.DaysInMonth[ruleMonth];
-					if (ruleMonth == Calendar.FEBRUARY && isLeapYear(year))
-						ruleDay++;
+					if (ruleMonth == Calendar.FEBRUARY && isLeapYear(year)) {
+                        ruleDay++;
+                    }
 				}
 			}
 
 			if (month == ruleMonth) {
-				if (ruleDay < day || ruleDay == day && time >= ruleTime)
-					return rawOffset;
-			} else if (nextMonth != ruleMonth)
-				return rawOffset;
+				if (ruleDay < day || ruleDay == day && time >= ruleTime) {
+                    return rawOffset;
+                }
+			} else if (nextMonth != ruleMonth) {
+                return rawOffset;
+            }
 		}
 		return rawOffset + dstSavings;
 	}
@@ -416,11 +437,14 @@
 	 *            the date in milliseconds since January 1, 1970 00:00:00 GMT
 	 * @return the offset from GMT in milliseconds
 	 */
-	public int getOffset(long time) {
-		if (!useDaylightTime())
-			return rawOffset;
-		if (daylightSavings == null)
-			daylightSavings = new GregorianCalendar(this);
+	@Override
+    public int getOffset(long time) {
+		if (!useDaylightTime()) {
+            return rawOffset;
+        }
+		if (daylightSavings == null) {
+            daylightSavings = new GregorianCalendar(this);
+        }
 		return daylightSavings.getOffset(time + rawOffset);
 	}
 
@@ -429,7 +453,8 @@
 	 * 
 	 * @return the offset from GMT of standard time in milliseconds
 	 */
-	public int getRawOffset() {
+	@Override
+    public int getRawOffset() {
 		return rawOffset;
 	}
 
@@ -441,12 +466,14 @@
 	 * 
 	 * @see #equals
 	 */
-	public synchronized int hashCode() {
+	@Override
+    public synchronized int hashCode() {
 		int hashCode = getID().hashCode() + rawOffset;
-		if (useDaylight)
-			hashCode += startYear + startMonth + startDay + startDayOfWeek
+		if (useDaylight) {
+            hashCode += startYear + startMonth + startDay + startDayOfWeek
 					+ startTime + startMode + endMonth + endDay + endDayOfWeek
 					+ endTime + endMode + dstSavings;
+        }
 		return hashCode;
 	}
 
@@ -459,14 +486,18 @@
 	 * @return true when the TimeZones have the same raw offset and daylight
 	 *         savings time rules, false otherwise
 	 */
-	public boolean hasSameRules(TimeZone zone) {
-		if (!(zone instanceof SimpleTimeZone))
-			return false;
+	@Override
+    public boolean hasSameRules(TimeZone zone) {
+		if (!(zone instanceof SimpleTimeZone)) {
+            return false;
+        }
 		SimpleTimeZone tz = (SimpleTimeZone) zone;
-		if (useDaylight != tz.useDaylight)
-			return false;
-		if (!useDaylight)
-			return rawOffset == tz.rawOffset;
+		if (useDaylight != tz.useDaylight) {
+            return false;
+        }
+		if (!useDaylight) {
+            return rawOffset == tz.rawOffset;
+        }
 		return rawOffset == tz.rawOffset && dstSavings == tz.dstSavings
 				&& startYear == tz.startYear && startMonth == tz.startMonth
 				&& startDay == tz.startDay && startMode == tz.startMode
@@ -485,21 +516,24 @@
 	 * @return true when the Date is in the daylight savings time period, false
 	 *         otherwise
 	 */
-	public boolean inDaylightTime(Date time) {
+	@Override
+    public boolean inDaylightTime(Date time) {
 		// check for null pointer
 		long millis = time.getTime();
-		if (!useDaylightTime())
-			return false;
-		if (daylightSavings == null)
-			daylightSavings = new GregorianCalendar(this);
+		if (!useDaylightTime()) {
+            return false;
+        }
+		if (daylightSavings == null) {
+            daylightSavings = new GregorianCalendar(this);
+        }
 		return daylightSavings.getOffset(millis + rawOffset) != rawOffset;
 	}
 
 	private boolean isLeapYear(int year) {
-		if (year > 1582)
-			return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
-		else
-			return year % 4 == 0;
+		if (year > 1582) {
+            return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
+        }
+        return year % 4 == 0;
 	}
 
 	private int mod7(int num1) {
@@ -514,56 +548,60 @@
 	 *            the daylight savings offset in milliseconds
 	 */
 	public void setDSTSavings(int milliseconds) {
-		if (milliseconds > 0)
-			dstSavings = milliseconds;
-		else
-			throw new IllegalArgumentException();
+		if (milliseconds > 0) {
+            dstSavings = milliseconds;
+        } else {
+            throw new IllegalArgumentException();
+        }
 	}
 
 	private void checkRange(int month, int dayOfWeek, int time) {
-		if (month < Calendar.JANUARY || month > Calendar.DECEMBER)
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00e5", month)); //$NON-NLS-1$
-		if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY)
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00e7", dayOfWeek)); //$NON-NLS-1$
-		if (time < 0 || time >= 24 * 3600000)
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00e8", time)); //$NON-NLS-1$
-	}
-
-	private void checkDay(int month, int day) {
-		if (day <= 0 || day > GregorianCalendar.DaysInMonth[month])
-			throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg.getString(
-					"K00e6", day)); //$NON-NLS-1$
-	}
+        if (month < Calendar.JANUARY || month > Calendar.DECEMBER) {
+            throw new IllegalArgumentException(Msg.getString("K00e5", month)); //$NON-NLS-1$
+        }
+        if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) {
+            throw new IllegalArgumentException(Msg.getString("K00e7", dayOfWeek)); //$NON-NLS-1$
+        }
+        if (time < 0 || time >= 24 * 3600000) {
+            throw new IllegalArgumentException(Msg.getString("K00e8", time)); //$NON-NLS-1$
+        }
+    }
+
+    private void checkDay(int month, int day) {
+        if (day <= 0 || day > GregorianCalendar.DaysInMonth[month]) {
+            throw new IllegalArgumentException(Msg.getString("K00e6", day)); //$NON-NLS-1$
+        }
+    }
 
 	private void setEndMode() {
-		if (endDayOfWeek == 0)
-			endMode = DOM_MODE;
-		else if (endDayOfWeek < 0) {
+		if (endDayOfWeek == 0) {
+            endMode = DOM_MODE;
+        } else if (endDayOfWeek < 0) {
 			endDayOfWeek = -endDayOfWeek;
 			if (endDay < 0) {
 				endDay = -endDay;
 				endMode = DOW_LE_DOM_MODE;
-			} else
-				endMode = DOW_GE_DOM_MODE;
-		} else
-			endMode = DOW_IN_MONTH_MODE;
+			} else {
+                endMode = DOW_GE_DOM_MODE;
+            }
+		} else {
+            endMode = DOW_IN_MONTH_MODE;
+        }
 		useDaylight = startDay != 0 && endDay != 0;
 		if (endDay != 0) {
 			checkRange(endMonth, endMode == DOM_MODE ? 1 : endDayOfWeek,
 					endTime);
-			if (endMode != DOW_IN_MONTH_MODE)
-				checkDay(endMonth, endDay);
-			else {
-				if (endDay < -5 || endDay > 5)
-					throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-							.getString("K00f8", endDay)); //$NON-NLS-1$
+			if (endMode != DOW_IN_MONTH_MODE) {
+                checkDay(endMonth, endDay);
+            } else {
+				if (endDay < -5 || endDay > 5) {
+                    throw new IllegalArgumentException(Msg.getString("K00f8", endDay)); //$NON-NLS-1$
+                }
 			}
 		}
-		if (endMode != DOM_MODE)
-			endDayOfWeek--;
+		if (endMode != DOM_MODE) {
+            endDayOfWeek--;
+        }
 	}
 
 	/**
@@ -640,36 +678,40 @@
 	 * @param offset
 	 *            the offset from GMT of standard time in milliseconds
 	 */
-	public void setRawOffset(int offset) {
+	@Override
+    public void setRawOffset(int offset) {
 		rawOffset = offset;
 	}
 
 	private void setStartMode() {
-		if (startDayOfWeek == 0)
-			startMode = DOM_MODE;
-		else if (startDayOfWeek < 0) {
+		if (startDayOfWeek == 0) {
+            startMode = DOM_MODE;
+        } else if (startDayOfWeek < 0) {
 			startDayOfWeek = -startDayOfWeek;
 			if (startDay < 0) {
 				startDay = -startDay;
 				startMode = DOW_LE_DOM_MODE;
-			} else
-				startMode = DOW_GE_DOM_MODE;
-		} else
-			startMode = DOW_IN_MONTH_MODE;
+			} else {
+                startMode = DOW_GE_DOM_MODE;
+            }
+		} else {
+            startMode = DOW_IN_MONTH_MODE;
+        }
 		useDaylight = startDay != 0 && endDay != 0;
 		if (startDay != 0) {
 			checkRange(startMonth, startMode == DOM_MODE ? 1 : startDayOfWeek,
 					startTime);
-			if (startMode != DOW_IN_MONTH_MODE)
-				checkDay(startMonth, startDay);
-			else {
-				if (startDay < -5 || startDay > 5)
-					throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
-							.getString("K00f8", startDay)); //$NON-NLS-1$
+			if (startMode != DOW_IN_MONTH_MODE) {
+                checkDay(startMonth, startDay);
+            } else {
+				if (startDay < -5 || startDay > 5) {
+                    throw new IllegalArgumentException(Msg.getString("K00f8", startDay)); //$NON-NLS-1$
+                }
 			}
 		}
-		if (startMode != DOM_MODE)
-			startDayOfWeek--;
+		if (startMode != DOM_MODE) {
+            startDayOfWeek--;
+        }
 	}
 
 	/**
@@ -757,7 +799,8 @@
 	 * 
 	 * @return the string representation of this SimpleTimeZone
 	 */
-	public String toString() {
+	@Override
+    public String toString() {
 		return getClass().getName()
 				+ "[id=" //$NON-NLS-1$
 				+ getID()
@@ -790,7 +833,8 @@
 	 * @return true if this time zone has a daylight savings time period, false
 	 *         otherwise
 	 */
-	public boolean useDaylightTime() {
+	@Override
+    public boolean useDaylightTime() {
 		return useDaylight;
 	}
 
@@ -821,15 +865,17 @@
 				cal.set(Calendar.MONTH, endMonth);
 				cal.set(Calendar.DATE, endDay);
 				sEndDay = cal.get(Calendar.DAY_OF_WEEK_IN_MONTH);
-				if (endMode == DOM_MODE)
-					sEndDayOfWeek = cal.getFirstDayOfWeek();
+				if (endMode == DOM_MODE) {
+                    sEndDayOfWeek = cal.getFirstDayOfWeek();
+                }
 			}
 			if (startMode != DOW_IN_MONTH_MODE) {
 				cal.set(Calendar.MONTH, startMonth);
 				cal.set(Calendar.DATE, startDay);
 				sStartDay = cal.get(Calendar.DAY_OF_WEEK_IN_MONTH);
-				if (startMode == DOM_MODE)
-					sStartDayOfWeek = cal.getFirstDayOfWeek();
+				if (startMode == DOM_MODE) {
+                    sStartDayOfWeek = cal.getFirstDayOfWeek();
+                }
 			}
 		}
 		ObjectOutputStream.PutField fields = stream.putFields();
@@ -890,12 +936,14 @@
 				if (length >= 4) {
 					startDay = values[0];
 					startDayOfWeek = values[1];
-					if (startMode != DOM_MODE)
-						startDayOfWeek--;
+					if (startMode != DOM_MODE) {
+                        startDayOfWeek--;
+                    }
 					endDay = values[2];
 					endDayOfWeek = values[3];
-					if (endMode != DOM_MODE)
-						endDayOfWeek--;
+					if (endMode != DOM_MODE) {
+                        endDayOfWeek--;
+                    }
 				}
 			}
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimeZone.java Tue Sep  5 21:01:21 2006
@@ -38,7 +38,7 @@
  * @see SimpleTimeZone
  */
 
-abstract public class TimeZone implements Serializable, Cloneable {
+public abstract class TimeZone implements Serializable, Cloneable {
 	private static final long serialVersionUID = 3581463369166924961L;
 
 	/**
@@ -93,7 +93,8 @@
 	 * 
 	 * @see java.lang.Cloneable
 	 */
-	public Object clone() {
+	@Override
+    public Object clone() {
 		try {
 			TimeZone zone = (TimeZone) super.clone();
 			return zone;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimerTask.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimerTask.java?view=diff&rev=440606&r1=440605&r2=440606
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimerTask.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TimerTask.java Tue Sep  5 21:01:21 2006
@@ -15,7 +15,6 @@
 
 package java.util;
 
-
 /**
  * The TimerTask class is represents a task to run at specified time. The task
  * may be run once or repeatedly.
@@ -25,9 +24,6 @@
  */
 public abstract class TimerTask implements Runnable {
 
-	/* The timer object which launches this task */
-	private Timer timer;
-
 	/* If timer was cancelled */
 	private boolean cancelled;
 
@@ -42,7 +38,7 @@
 	 * The time when task will be executed, or the time when task was launched
 	 * if this is task in progress.
 	 */
-	private long scheduledTime = 0;
+	private long scheduledTime;
 
 	/*
 	 * Method called from the Timer object when scheduling an event



Mime
View raw message