harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r561258 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/text/html/HTMLEditorKit.java test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
Date Tue, 31 Jul 2007 08:10:45 GMT
Author: apetrenko
Date: Tue Jul 31 01:10:44 2007
New Revision: 561258

URL: http://svn.apache.org/viewvc?view=rev&rev=561258
Log:
Patch for HARMONY-4570 "[classlib][swing][html] HTMLEditorKit throws exception on unknown
tag"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java?view=diff&rev=561258&r1=561257&r2=561258
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
Tue Jul 31 01:10:44 2007
@@ -145,10 +145,10 @@
                 return new HeadTagView(elem);
             }
 
-            // TODO: uncomment the next line and remove throw
-            // when all tags are supported
-//            return new LabelView(elem);
-            throw new UnsupportedOperationException(Messages.getString("swing.9F") + tag);
//$NON-NLS-1$
+
+            // HARMONY-4570
+            // We should not throw exception on uknown tag
+            return new InlineView(elem);
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java?view=diff&rev=561258&r1=561257&r2=561258
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
Tue Jul 31 01:10:44 2007
@@ -30,4 +30,11 @@
         new JEditorPane("text/html", "<html><body><table><tr><td>Hello
world!" //$NON-NLS-1$//$NON-NLS-2$
                 + "</td></tr></table></body></html>"); //$NON-NLS-1$
     }
+
+    /**
+     * Regression for HARMONY-4570
+     */
+    public void testHarmony4570() {
+        new JEditorPane("text/html", "<html><body><wrong></wrong</body></html>");
//$NON-NLS-1$//$NON-NLS-2$
+    }
 }



Mime
View raw message