harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r499330 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/text/StyleConstants.java test/api/java/common/javax/swing/text/ComponentViewTest.java test/api/java/common/javax/swing/text/StyleConstantsTest.java
Date Wed, 24 Jan 2007 09:59:22 GMT
Author: hindessm
Date: Wed Jan 24 01:59:15 2007
New Revision: 499330

URL: http://svn.apache.org/viewvc?view=rev&rev=499330
Log:
Reverting all HARMONY-1767 patches.

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleConstants.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/ComponentViewTest.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleConstants.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleConstants.java?view=diff&rev=499330&r1=499329&r2=499330
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleConstants.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/StyleConstants.java
Wed Jan 24 01:59:15 2007
@@ -200,7 +200,7 @@
     }
 
     public static Component getComponent(final AttributeSet a) {
-        return (a == null ? null : (Component) a.getAttribute(ComponentAttribute));
+        return (Component)a.getAttribute(ComponentAttribute);
     }
 
     public static void setForeground(final MutableAttributeSet a,

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/ComponentViewTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/ComponentViewTest.java?view=diff&rev=499330&r1=499329&r2=499330
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/ComponentViewTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/ComponentViewTest.java
Wed Jan 24 01:59:15 2007
@@ -33,10 +33,6 @@
 import javax.swing.JTextArea;
 import javax.swing.JTextPane;
 import javax.swing.SwingTestCase;
-import javax.swing.text.Element;
-import javax.swing.text.PlainDocument;
-import javax.swing.text.PlainView;
-
 
 public class ComponentViewTest extends SwingTestCase {
     StyledDocument document;
@@ -653,47 +649,6 @@
         }
     }
 
-    public void testSetParent_View() {
-        // Regression test for HARMONY-1767 
-        PlainDocument doc = new PlainDocument();
-        Element e = doc.getDefaultRootElement();
-        ComponentView obj = new ComponentView(new TestElement());
-        obj.setParent(new PlainView(e));
-    }  
-
-    private class TestElement implements Element {
-        public boolean isLeaf() {
-            return false;
-        }
-        public Element getElement(int index) {
-            return null;
-        }
-        public int getElementCount() {
-            return 0;
-        }
-        public int getElementIndex(int offset) {
-            return 0;
-        }
-        public int getEndOffset() {
-            return 0;
-        }       
-        public int getStartOffset() {
-            return 0;
-        }       
-        public AttributeSet getAttributes() {
-            return null;
-        }
-        public String getName() {
-            return "AA";
-        }
-        public Element getParentElement() {
-            return null;
-        }
-        public Document getDocument() {
-            return null;
-        }
-    }
-
     private void checkBounds(final int x, final int y, final int height, final Shape box)
{
         Rectangle bounds = box.getBounds();
         assertEquals(x, bounds.x);
@@ -733,4 +688,4 @@
             assertEquals(position, componentElement.getStartOffset());
         }
     }
-}
+}
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java?view=diff&rev=499330&r1=499329&r2=499330
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java
Wed Jan 24 01:59:15 2007
@@ -434,11 +434,6 @@
         assertEquals(val, StyleConstants.getComponent(attr));
     }
 
-    public void testGetComponent_Null() {
-        // Regression test for HARMONY-1767
-        assertNull(StyleConstants.getComponent(null));
-    }
-
     public void testSetComponent() {
         attr.removeAttributes(attr);
         Component val = new JLabel("test component");



Mime
View raw message