You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/11/20 12:56:36 UTC

svn commit: r477155 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util: FormattableFlags.java Stack.java Vector.java

Author: pyang
Date: Mon Nov 20 03:56:35 2006
New Revision: 477155

URL: http://svn.apache.org/viewvc?view=rev&rev=477155
Log:
fix API signature according to JavaDoc and JAPI reverse report on Harmony and RI

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormattableFlags.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormattableFlags.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormattableFlags.java?view=diff&rev=477155&r1=477154&r2=477155
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormattableFlags.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/FormattableFlags.java Mon Nov 20 03:56:35 2006
@@ -22,6 +22,11 @@
  */
 
 public class FormattableFlags {
+    
+    private FormattableFlags(){
+        //prevent this class to be instantialized
+    }
+    
     /**
      * Denotes the output to be left-justified. In order to fill the minimum
      * width requirement, spaces('\u0020') will be appended at the end of the

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java?view=diff&rev=477155&r1=477154&r2=477155
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java Mon Nov 20 03:56:35 2006
@@ -53,7 +53,7 @@
 	 */
 	public synchronized E peek() {
 		try {
-			return elementData[elementCount - 1];
+			return (E)elementData[elementCount - 1];
 		} catch (IndexOutOfBoundsException e) {
 			throw new EmptyStackException();
 		}
@@ -71,7 +71,7 @@
 	public synchronized E pop() {
 		try {
 			int index = elementCount - 1;
-			E obj = elementData[index];
+			E obj = (E)elementData[index];
 			removeElementAt(index);
 			return obj;
 		} catch (IndexOutOfBoundsException e) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java?view=diff&rev=477155&r1=477154&r2=477155
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Vector.java Mon Nov 20 03:56:35 2006
@@ -52,7 +52,7 @@
 	/**
 	 * The elements of the vector.
 	 */
-	protected E[] elementData;
+	protected Object[] elementData;
 
 	/**
 	 * How many elements should be added to the vector when it is detected that
@@ -323,7 +323,7 @@
 	 */
 	public synchronized E elementAt(int location) {
 		if (location < elementCount) {
-			return elementData[location];
+			return (E)elementData[location];
 		}
 		throw new ArrayIndexOutOfBoundsException(location);
 	}
@@ -348,7 +348,7 @@
 			public E nextElement() {
 				synchronized (Vector.this) {
 					if (pos < elementCount) {
-						return elementData[pos++];
+						return (E)elementData[pos++];
 					}
 				}
 				throw new NoSuchElementException();
@@ -425,7 +425,7 @@
 	 */
 	public synchronized E firstElement() {
 		if (elementCount > 0) {
-			return elementData[0];
+			return (E)elementData[0];
 		}
 		throw new NoSuchElementException();
 	}
@@ -627,7 +627,7 @@
 	 */
 	public synchronized E lastElement() {
 		try {
-			return elementData[elementCount - 1];
+			return (E)elementData[elementCount - 1];
 		} catch (IndexOutOfBoundsException e) {
 			throw new NoSuchElementException();
 		}
@@ -699,7 +699,7 @@
 	@Override
     public synchronized E remove(int location) {
 		if (location < elementCount) {
-			E result = elementData[location];
+			E result = (E)elementData[location];
 			elementCount--;
 			int size = elementCount - location;
 			if (size > 0) {
@@ -872,7 +872,7 @@
 	@Override
     public synchronized E set(int location, E object) {
 		if (location < elementCount) {
-			E result = elementData[location];
+			E result = (E)elementData[location];
 			elementData[location] = object;
 			return result;
 		}