harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r478163 - /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java
Date Wed, 22 Nov 2006 13:59:48 GMT
Author: apetrenko
Date: Wed Nov 22 05:59:47 2006
New Revision: 478163

URL: http://svn.apache.org/viewvc?view=rev&rev=478163
Log:
Patch for HARMONY-2121 "[classlib][swing] Resolve warnings in j.s.t.DefaultEditorKitTest"

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java?view=diff&rev=478163&r1=478162&r2=478163
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java
Wed Nov 22 05:59:47 2006
@@ -36,6 +36,7 @@
 
 public class DefaultEditorKitTest extends EditorKitTest {
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -129,6 +130,7 @@
         inFile.close();
 
         testExceptionalCase(new BadLocationCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 kit.read(new ByteArrayInputStream(outFile.toByteArray()), doc, 1000);
             }
@@ -160,6 +162,7 @@
         inFile.close();
 
         testExceptionalCase(new BadLocationCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 kit.read(new InputStreamReader(new ByteArrayInputStream(outFile.toByteArray())),
doc, 1000);
             }
@@ -189,6 +192,7 @@
                      strRead);
 
         testExceptionalCase(new BadLocationCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 kit.write(outputStream, doc, 0, 1000);
             }
@@ -218,6 +222,7 @@
                      strRead);
 
         testExceptionalCase(new BadLocationCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 kit.write(new OutputStreamWriter(outputStream), doc, 0, 1000);
             }
@@ -232,10 +237,12 @@
         final Marker flushMarker = new Marker();
         final Marker closeMarker = new Marker();
         StringWriter writer = new StringWriter() {
+            @Override
             public void close() throws IOException {
                 closeMarker.setOccurred();
                 super.close();
             }
+            @Override
             public void flush() {
                 flushMarker.setOccurred();
                 super.flush();
@@ -255,10 +262,12 @@
         final Marker flushMarker = new Marker();
         final Marker closeMarker = new Marker();
         OutputStream stream = new ByteArrayOutputStream() {
+            @Override
             public void close() throws IOException {
                 closeMarker.setOccurred();
                 super.close();
             }
+            @Override
             public void flush() throws IOException {
                 flushMarker.setOccurred();
                 super.flush();
@@ -393,12 +402,5 @@
                               final int length) throws Exception {
         kit.write(outputStream, doc, pos, length);
         outputStream.close();
-    }
-
-
-    private abstract class BadLocationCase extends ExceptionalCase {
-        public Class expectedExceptionClass() {
-            return BadLocationException.class;
-        }
     }
 }



Mime
View raw message