harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r496830 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/text/AbstractDocument.java test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java
Date Tue, 16 Jan 2007 19:35:38 GMT
Author: hindessm
Date: Tue Jan 16 11:35:37 2007
New Revision: 496830

URL: http://svn.apache.org/viewvc?view=rev&rev=496830
Log:
Reverting HARMONY-2777 until test failure is resolved.

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java?view=diff&rev=496830&r1=496829&r2=496830
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
Tue Jan 16 11:35:37 2007
@@ -401,9 +401,6 @@
 
         @Override
         public int getEndOffset() {
-            if (elements.length == 0) {
-                throw new NullPointerException();
-            }
             return elements[elements.length - 1].getEndOffset();
         }
 
@@ -415,9 +412,6 @@
 
         @Override
         public int getStartOffset() {
-            if (elements.length == 0) {
-                throw new NullPointerException();
-            }
             return elements[0].getStartOffset();
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java?view=diff&rev=496830&r1=496829&r2=496830
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/AbstractDocument_BranchElementTest.java
Tue Jan 16 11:35:37 2007
@@ -243,31 +243,9 @@
         assertEquals(0, par.getStartOffset());
     }
 
-    // Regression for HARMONY-2777
-    public void testGetStartOffsetNoChildren() {
-        par = doc.new BranchElement(null, null);
-        try {
-            par.getStartOffset();
-            fail("NullPointerException is expected");
-        } catch (NullPointerException e) {
-            // expected
-        }
-    }
-
     public void testGetEndOffset() {
         assertEquals(15, bidi.getEndOffset());
         assertEquals(15, par.getEndOffset());
-    }
-
-    // Regression for HARMONY-2777
-    public void testGetEndOffsetNoChildren() {
-        par = doc.new BranchElement(null, null);
-        try {
-            par.getEndOffset();
-            fail("NullPointerException is expected");
-        } catch (NullPointerException e) {
-            // expected
-        }
     }
 
     public void testGetElementCount() {



Mime
View raw message