harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r556012 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/text/html/parser/ParserDelegator.java test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
Date Fri, 13 Jul 2007 14:24:46 GMT
Author: ayza
Date: Fri Jul 13 07:24:44 2007
New Revision: 556012

URL: http://svn.apache.org/viewvc?view=rev&rev=556012
Log:
Applying patch from HARMONY-4008 ([classlib][swing] UnsupportedOperationException in HTMLEditorKit)

Added:
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java?view=diff&rev=556012&r1=556011&r2=556012
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java
Fri Jul 13 07:24:44 2007
@@ -109,10 +109,9 @@
             String oldName = dtd.name;
             // gets the location of the harcoded file that is located in the
             // classpath ...
-            URL bdtdURL = ParserDelegator.class.getResource(name + ".bdtd");
             // fills the DTD ...
             dtd.read(new DataInputStream(
-                    new FileInputStream(new File(bdtdURL.toURI()))));
+                    ParserDelegator.class.getResourceAsStream(name + ".bdtd")));
             dtd.name = oldName;
             DTD.putDTDHash(name, dtd);
         } catch (Exception e) {

Added: 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=auto&rev=556012
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
Fri Jul 13 07:24:44 2007
@@ -0,0 +1,33 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package javax.swing.text.html.parser;
+
+import javax.swing.JEditorPane;
+
+import junit.framework.TestCase;
+
+public class ParserDelegatorTest extends TestCase {
+
+    /**
+     * Regression for HARMONY-4008
+     */
+    public void testHarmony4008() {
+        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$
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ParserDelegatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message