harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r552907 - in /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common: org/apache/harmony/luni/tests/java/io/ tests/api/java/io/
Date Tue, 03 Jul 2007 16:52:16 GMT
Author: tonywu
Date: Tue Jul  3 09:52:07 2007
New Revision: 552907

URL: http://svn.apache.org/viewvc?view=rev&rev=552907
Log:
clean up compiler warnings in io module, no functional change.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ByteArrayOutputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/InputStreamReaderTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/LineNumberInputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/NotActiveExceptionTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectOutputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -84,7 +84,8 @@
 		SerializationTest.verifySelf(longString);
 	}
 	
-	private static class LongString implements Serializable{
+	@SuppressWarnings("serial")
+    private static class LongString implements Serializable{
 		String lString;
 		
 		public LongString() {
@@ -160,6 +161,7 @@
             super(in);
         }
 
+        @SuppressWarnings("unchecked")
         protected Class resolveClass(ObjectStreamClass desc)
                 throws IOException, ClassNotFoundException {
             if (desc.getName().endsWith("ObjectInputStreamTest$TestClass1")) {
@@ -196,7 +198,7 @@
         ois = new TestObjectInputStream(bais);
 
         try {
-            TestClass2 to2 = (TestClass2) ois.readObject();
+            ois.readObject();
 
             fail("Should throw InvalidClassException");
         } catch (InvalidClassException ice) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ByteArrayOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ByteArrayOutputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ByteArrayOutputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ByteArrayOutputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -164,7 +164,8 @@
 	/**
 	 * @tests java.io.ByteArrayOutputStream#toString(int)
 	 */
-	public void test_toStringI() {
+	@SuppressWarnings("deprecation")
+    public void test_toStringI() {
 		// Test for method java.lang.String
 		// java.io.ByteArrayOutputStream.toString(int)
 		java.io.ByteArrayOutputStream bos = null;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -457,7 +457,8 @@
 	/**
 	 * @tests java.io.DataInputStream#readLine()
 	 */
-	public void test_readLine() {
+	@SuppressWarnings("deprecation")
+    public void test_readLine() {
 		// Test for method java.lang.String java.io.DataInputStream.readLine()
 		try {
 			os.writeBytes("Hello");

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/InputStreamReaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/InputStreamReaderTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/InputStreamReaderTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/InputStreamReaderTest.java
Tue Jul  3 09:52:07 2007
@@ -25,7 +25,6 @@
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
-import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CodingErrorAction;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/LineNumberInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/LineNumberInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/LineNumberInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/LineNumberInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -21,13 +21,14 @@
 import java.io.IOException;
 import java.io.LineNumberInputStream;
 
+@SuppressWarnings("deprecation")
 public class LineNumberInputStreamTest extends junit.framework.TestCase {
 
 	String text = "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171\n172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191\n192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\n212\n213\n214\n215\n216
 \n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231\n232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251\n252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271\n272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291\n292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311\n312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331\n332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351\n352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371\n372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391\n392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411\n412\n413\n41
 4\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431\n432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451\n452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471\n472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491\n492\n493\n494\n495\n496\n497\n498\n499\n500\n501";
 
 	String dosText = "0\r\n1\r\n2";
 
-	LineNumberInputStream lnis;
+    LineNumberInputStream lnis;
 
 	LineNumberInputStream lnis2;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/NotActiveExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/NotActiveExceptionTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/NotActiveExceptionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/NotActiveExceptionTest.java
Tue Jul  3 09:52:07 2007
@@ -17,9 +17,7 @@
 
 package tests.api.java.io;
 
-import java.io.ByteArrayOutputStream;
 import java.io.NotActiveException;
-import java.io.ObjectOutputStream;
 
 public class NotActiveExceptionTest extends junit.framework.TestCase {
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -40,10 +40,10 @@
 import java.util.Hashtable;
 import java.util.Vector;
 
-import org.apache.harmony.luni.tests.java.lang.ClassTest;
 import org.apache.harmony.testframework.serialization.SerializationTest;
 import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
+@SuppressWarnings("serial")
 public class ObjectInputStreamTest extends junit.framework.TestCase implements
         Serializable {
 
@@ -408,6 +408,7 @@
     /**
      * @tests java.io.ObjectInputStream#readLine()
      */
+    @SuppressWarnings("deprecation")
     public void test_readLine() throws IOException {
         // Test for method java.lang.String java.io.ObjectInputStream.readLine()
         oos.writeBytes("HelloWorld\nSecondLine");
@@ -747,6 +748,7 @@
             super(in);
         }
 
+        @SuppressWarnings("unchecked")
         protected Class resolveClass(ObjectStreamClass desc)
                 throws IOException, ClassNotFoundException {
             if (desc.getName().equals(
@@ -947,6 +949,7 @@
     }
     
     private static class RegisterValidationClass implements Serializable {
+        @SuppressWarnings("unused")
         private A a = new A();
         private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
{
             stream.defaultReadObject();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectOutputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectOutputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectOutputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -39,6 +39,7 @@
 import java.security.Permission;
 import java.util.Arrays;
 
+@SuppressWarnings( { "unused", "serial" })
 public class ObjectOutputStreamTest extends junit.framework.TestCase implements
 		Serializable {
 
@@ -100,7 +101,7 @@
 		}
 	}
 
-	private static class SerializationTestSubclass1 extends SerializationTest
+    private static class SerializationTestSubclass1 extends SerializationTest
 			implements Serializable {
 		String aString = INIT_STR_VALUE;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java
Tue Jul  3 09:52:07 2007
@@ -19,8 +19,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.NotActiveException;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -270,7 +270,7 @@
 
             public void run() {
                 try {
-                    int one = pis.read();
+                    pis.read();
                     pass = true;
                 } catch (IOException e) {}
             }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java?view=diff&rev=552907&r1=552906&r2=552907
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java
Tue Jul  3 09:52:07 2007
@@ -61,7 +61,8 @@
 	/**
 	 * @tests java.io.SequenceInputStream#SequenceInputStream(java.util.Enumeration)
 	 */
-	public void test_ConstructorLjava_util_Enumeration() {
+	@SuppressWarnings("unchecked")
+    public void test_ConstructorLjava_util_Enumeration() {
 		// Test for method java.io.SequenceInputStream(java.util.Enumeration)
 		class StreamEnumerator implements Enumeration {
 			InputStream streams[] = new InputStream[2];



Mime
View raw message