harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r586341 [2/2] - in /harmony/enhanced/classlib/branches/java6/modules/luni/src: main/java/java/lang/ main/java/java/util/ test/api/common/org/apache/harmony/luni/tests/java/util/
Date Fri, 19 Oct 2007 09:03:24 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Stack.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Stack.java?rev=586341&r1=586340&r2=586341&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Stack.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Stack.java
Fri Oct 19 02:03:23 2007
@@ -39,7 +39,7 @@
 	 * 
 	 * @return true if the stack is empty, false otherwise
 	 */
-	public boolean empty() {
+	public synchronized boolean empty() {
 		return elementCount == 0;
 	}
 
@@ -71,7 +71,7 @@
 	 */
 	@SuppressWarnings("unchecked")
     public synchronized E pop() {
-		if(elementCount == 0){
+        if(elementCount == 0){
             throw new EmptyStackException();
         }
 		final int index = --elementCount;
@@ -80,7 +80,7 @@
         modCount++;
 		return obj;
 	}
-
+    
 	/**
 	 * Pushes the object from the parameter onto the top of the stack.
 	 * 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/UnknownFormatConversionException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/UnknownFormatConversionException.java?rev=586341&r1=586340&r2=586341&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/UnknownFormatConversionException.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/UnknownFormatConversionException.java
Fri Oct 19 02:03:23 2007
@@ -36,6 +36,9 @@
 	 *            The unknown format conversion
 	 */
 	public UnknownFormatConversionException(String s) {
+		if( null == s ) {
+			throw new NullPointerException();
+		}
 		this.s = s;
 	}
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/UnknownFormatConversionExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/UnknownFormatConversionExceptionTest.java?rev=586341&r1=586340&r2=586341&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/UnknownFormatConversionExceptionTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/UnknownFormatConversionExceptionTest.java
Fri Oct 19 02:03:23 2007
@@ -34,8 +34,8 @@
         // to spec.
         try {
             new UnknownFormatConversionException(null);
+            fail("should throw NullPointerExcepiton");
         } catch (NullPointerException e) {
-            fail("should not throw NullPointerExcepiton");
         }
     }
 



Mime
View raw message