classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Fixed two minor bugs in javax.swing.text


From: Roman Kennke
Subject: [cp-patches] FYI: Fixed two minor bugs in javax.swing.text
Date: Fri, 29 Jul 2005 15:03:25 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

My new code had two bugs that are fixed by this patch.

2005-07-29  Roman Kennke  <address@hidden>

        * javax/swing/text/DefaultStyledDocument.java
        (split): Moved throw statement into proper else clause.
        * javax/swing/text/StyledEditorKit.java
        (StyledViewFactory.create): Return the actual view instead of null.

/Roman
Index: javax/swing/text/DefaultStyledDocument.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v
retrieving revision 1.4
diff -u -r1.4 DefaultStyledDocument.java
--- javax/swing/text/DefaultStyledDocument.java 29 Jul 2005 10:47:16 -0000      
1.4
+++ javax/swing/text/DefaultStyledDocument.java 29 Jul 2005 13:01:02 -0000
@@ -135,11 +135,11 @@
                  int index = par.getElementIndex(startOffset);
                  par.replace(index, 1, new Element[]{ child1, child2 });
                }
-           }
-         else
-           throw new AssertionError("paragraph elements are expected to be "
-                                    + "instances of "
+              else
+                throw new AssertionError("paragraph elements are expected to "
+                                         + "be instances of "
                          + "javax.swing.text.AbstractDocument.BranchElement");
+           }
        }
       else
        throw new AssertionError("content elements are expected to be "
Index: javax/swing/text/StyledEditorKit.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/StyledEditorKit.java,v
retrieving revision 1.9
diff -u -r1.9 StyledEditorKit.java
--- javax/swing/text/StyledEditorKit.java       29 Jul 2005 09:56:10 -0000      
1.9
+++ javax/swing/text/StyledEditorKit.java       29 Jul 2005 13:01:02 -0000
@@ -441,7 +441,7 @@
       else if (name.equals(StyleConstants.IconElementName))
        view = new IconView(element);
 
-      return null;
+      return view;
     }
   }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]