harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r478162 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
Date Wed, 22 Nov 2006 13:58:36 GMT
Author: apetrenko
Date: Wed Nov 22 05:58:35 2006
New Revision: 478162

URL: http://svn.apache.org/viewvc?view=rev&rev=478162
Log:
Patch for HARMONY-2118 "[classlib][swing][test] unit test fails: j.s.text.DefaultEditorKitTest"
and HARMONY-2119 "[classlib][swing] Resolve warnings in j.s.t.DefaultEditorKit"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java?view=diff&rev=478162&r1=478161&r2=478162
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
Wed Nov 22 05:58:35 2006
@@ -32,7 +32,7 @@
 
 import org.apache.harmony.awt.text.ActionSet;
 
-
+@SuppressWarnings("serial")
 public class DefaultEditorKit extends EditorKit {
     private static class KitAction extends TextAction {
         public KitAction(final String name) {
@@ -294,34 +294,41 @@
      */
     private static Action[] actions;
 
+    @Override
     public Caret createCaret() {
         return null;
     }
 
+    @Override
     public Document createDefaultDocument() {
         return new PlainDocument();
     }
 
+    @Override
     public Action[] getActions() {
         if (actions == null) {
             initActions();
         }
-        return (Action[])actions.clone();
+        return actions.clone();
     }
 
+    @Override
     public String getContentType() {
         return CONTENT_TYPE;
     }
 
+    @Override
     public ViewFactory getViewFactory() {
         return null;
     }
 
+    @Override
     public void read(final InputStream in, final Document doc, final int pos)
             throws IOException, BadLocationException {
         read(new InputStreamReader(in), doc, pos);
     }
 
+    @Override
     public void read(final Reader in, final Document doc, final int pos)
             throws IOException, BadLocationException {
         if (!in.ready()) {
@@ -351,12 +358,14 @@
         }
     }
 
+    @Override
     public void write(final OutputStream out, final Document doc,
             final int pos, final int len) throws IOException,
             BadLocationException {
         write(new OutputStreamWriter(out), doc, pos, len);
     }
 
+    @Override
     public void write(final Writer out, final Document doc, final int pos,
             final int len) throws IOException, BadLocationException {
         String writeStr = doc.getText(pos, len);
@@ -366,6 +375,7 @@
                     .getProperty(EndOfLineStringProperty));
         }
         out.write(writeStr);
+        out.flush();
     }
 
     private String checkDelimiters(final String str) {



Mime
View raw message