You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ap...@apache.org on 2006/11/22 14:59:48 UTC
svn commit: r478163 -
/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/DefaultEditorKitTest.java
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;
- }
}
}