geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r158703 - in geronimo/trunk/specs/activation/src: java/javax/activation/ActivationDataFlavor.java test/javax/activation/ActivationDataFlavorTest.java
Date Wed, 23 Mar 2005 01:49:59 GMT
Author: jboynes
Date: Tue Mar 22 17:49:58 2005
New Revision: 158703

URL: http://svn.apache.org/viewcvs?view=rev&rev=158703
Log:
cannot use isMimeTypeEqual() from superclass as we are hiding mimeType

Modified:
    geronimo/trunk/specs/activation/src/java/javax/activation/ActivationDataFlavor.java
    geronimo/trunk/specs/activation/src/test/javax/activation/ActivationDataFlavorTest.java

Modified: geronimo/trunk/specs/activation/src/java/javax/activation/ActivationDataFlavor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/specs/activation/src/java/javax/activation/ActivationDataFlavor.java?view=diff&r1=158702&r2=158703
==============================================================================
--- geronimo/trunk/specs/activation/src/java/javax/activation/ActivationDataFlavor.java (original)
+++ geronimo/trunk/specs/activation/src/java/javax/activation/ActivationDataFlavor.java Tue
Mar 22 17:49:58 2005
@@ -63,7 +63,7 @@
     }
 
     public boolean equals(DataFlavor dataFlavor) {
-        return this.isMimeTypeEqual(dataFlavor) && representationClass == dataFlavor.getRepresentationClass();
+        return this.isMimeTypeEqual(dataFlavor.getMimeType()) && representationClass
== dataFlavor.getRepresentationClass();
     }
 
     public boolean isMimeTypeEqual(String mimeType) {

Modified: geronimo/trunk/specs/activation/src/test/javax/activation/ActivationDataFlavorTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/specs/activation/src/test/javax/activation/ActivationDataFlavorTest.java?view=diff&r1=158702&r2=158703
==============================================================================
--- geronimo/trunk/specs/activation/src/test/javax/activation/ActivationDataFlavorTest.java
(original)
+++ geronimo/trunk/specs/activation/src/test/javax/activation/ActivationDataFlavorTest.java
Tue Mar 22 17:49:58 2005
@@ -23,6 +23,7 @@
 package javax.activation;
 
 import java.io.InputStream;
+import java.awt.datatransfer.DataFlavor;
 
 import junit.framework.TestCase;
 
@@ -49,5 +50,11 @@
         assertEquals("Name 2", adf.getHumanPresentableName());
         adf = new ActivationDataFlavor("text/html", null);
         assertNull(adf.getHumanPresentableName());
+    }
+
+    public void testEquals() {
+        ActivationDataFlavor adf1 = new ActivationDataFlavor("text/plain", "text/plain");
+        DataFlavor adf2 = new DataFlavor("text/plain", "text/plain");
+        assertTrue(adf1.equals(adf2));
     }
 }



Mime
View raw message