harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495568 - in /harmony/enhanced/classlib/trunk/modules/awt/src: main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
Date Fri, 12 Jan 2007 13:34:50 GMT
Author: hindessm
Date: Fri Jan 12 05:34:49 2007
New Revision: 495568

URL: http://svn.apache.org/viewvc?view=rev&rev=495568
Log:
Applied patch from "[#HARMONY-2065] [classlib][awt] UnsupportedFlavorException
throws unexpected NPE".  Modified test slightly to let junit handle the
unexpected exception case.

Added:
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java?view=diff&rev=495568&r1=495567&r2=495568
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/UnsupportedFlavorException.java
Fri Jan 12 05:34:49 2007
@@ -21,6 +21,6 @@
     private static final long serialVersionUID = 5383814944251665601L;
 
     public UnsupportedFlavorException(DataFlavor flavor) {
-        super("flavor = " + flavor.toString()); //$NON-NLS-1$
+        super("flavor = " + String.valueOf(flavor)); //$NON-NLS-1$
     }
 }

Added: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java?view=auto&rev=495568
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
Fri Jan 12 05:34:49 2007
@@ -0,0 +1,15 @@
+package java.awt.datatransfer;
+
+import junit.framework.TestCase;
+
+public class UnsupportedFlavorExceptionTest extends TestCase {
+
+    /**
+     * Test method for
+     * {@link java.awt.datatransfer.UnsupportedFlavorException#UnsupportedFlavorException(java.awt.datatransfer.DataFlavor)}.
+     */
+    public void testUnsupportedFlavorException() throws NullPointerException {
+        // Regression test for HARMONY-2065
+        new UnsupportedFlavorException(null);
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/UnsupportedFlavorExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message