harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r549750 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/io/ java/net/ java/util/ org/apache/harmony/luni/platform/ org/apache/harmony/luni/util/
Date Fri, 22 Jun 2007 08:19:30 GMT
Author: tonywu
Date: Fri Jun 22 01:19:29 2007
New Revision: 549750

URL: http://svn.apache.org/viewvc?view=rev&rev=549750
Log:
clean up compiler warning, no functionality modified.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ProxySelectorImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EnumMap.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HugeEnumSet.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Fri Jun 22 01:19:29 2007
@@ -28,7 +28,6 @@
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Hashtable;
-import java.util.IdentityHashMap;
 import java.util.Iterator;
 
 import org.apache.harmony.kernel.vm.VM;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
Fri Jun 22 01:19:29 2007
@@ -20,11 +20,8 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
-import java.security.AccessController;
 import java.util.IdentityHashMap;
 
-import org.apache.harmony.luni.util.PriviAction;
-
 /**
  * An ObjectOutputStream can be used to save Java objects into a stream where
  * the objects can be loaded later with an ObjectInputStream. Primitive data
@@ -1297,7 +1294,6 @@
 
         // See if the object has a writeObject method. If so, run it
         boolean executed = false;
-        Class<?> targetClass = classDesc.forClass();
         try {
             if (classDesc.hasMethodWriteObject()){
                 final Method method = classDesc.getMethodWriteObject();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ProxySelectorImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ProxySelectorImpl.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ProxySelectorImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/ProxySelectorImpl.java
Fri Jun 22 01:19:29 2007
@@ -31,6 +31,7 @@
 /**
  * Default implementation for ProxySelector
  */
+@SuppressWarnings("unchecked")
 class ProxySelectorImpl extends ProxySelector {
 
     private static final int HTTP_PROXY_PORT = 80;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
Fri Jun 22 01:19:29 2007
@@ -17,16 +17,16 @@
 
 package java.net;
 
+import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FilePermission;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.io.BufferedReader;
 import java.io.InputStreamReader;
-import java.io.FileNotFoundException;
+import java.io.UnsupportedEncodingException;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.CodeSource;
@@ -38,15 +38,14 @@
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
-import java.util.List;
 import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
-import org.apache.harmony.luni.util.InvalidJarIndexException;
 import org.apache.harmony.luni.util.Msg;
 
 /**

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EnumMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EnumMap.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EnumMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/EnumMap.java Fri
Jun 22 01:19:29 2007
@@ -52,6 +52,7 @@
             ordinal = ((Enum) theKey).ordinal();
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public boolean equals(Object object) {
             if (!enumMap.hasMapping[ordinal]) {
@@ -78,18 +79,21 @@
                             : enumMap.values[ordinal].hashCode());
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public KT getKey() {
             checkEntryStatus();
             return (KT) enumMap.keys[ordinal];
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public VT getValue() {
             checkEntryStatus();
             return (VT) enumMap.values[ordinal];
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public VT setValue(VT value) {
             checkEntryStatus();
@@ -280,6 +284,7 @@
             super(value, em);
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public E next() {
             if (!hasNext()) {
@@ -349,6 +354,7 @@
             return toArray(entryArray);
         }
 
+        @SuppressWarnings("unchecked")
         @Override
         public Object[] toArray(Object[] array) {
             int size = enumMap.size();
@@ -411,6 +417,7 @@
      * @throws NullPointerException
      *             if the map is null
      */
+    @SuppressWarnings("unchecked")
     public EnumMap(Map<K, ? extends V> map) {
         if (map instanceof EnumMap) {
             initialization((EnumMap<K, V>) map);
@@ -445,6 +452,7 @@
      * 
      * @return a shallow copy of this map
      */
+    @SuppressWarnings("unchecked")
     @Override
     public EnumMap<K, V> clone() {
         try {
@@ -524,6 +532,7 @@
      *            the object
      * @return true if this EnumMap is equal to the given object.
      */
+    @SuppressWarnings("unchecked")
     @Override
     public boolean equals(Object object) {
         if (this == object) {
@@ -662,6 +671,7 @@
         return valuesCollection;
     }
 
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream stream) throws IOException,
             ClassNotFoundException {
         stream.defaultReadObject();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HugeEnumSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HugeEnumSet.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HugeEnumSet.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HugeEnumSet.java
Fri Jun 22 01:19:29 2007
@@ -176,6 +176,7 @@
         }
     }
     
+    @SuppressWarnings("unchecked")
     @Override
     public boolean contains(Object object) {
         if (null == object) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Stack.java Fri Jun
22 01:19:29 2007
@@ -51,7 +51,8 @@
 	 *                when empty() is true
 	 * @see #pop
 	 */
-	public synchronized E peek() {
+	@SuppressWarnings("unchecked")
+    public synchronized E peek() {
 		try {
 			return (E)elementData[elementCount - 1];
 		} catch (IndexOutOfBoundsException e) {
@@ -68,7 +69,8 @@
 	 * @see #peek
 	 * @see #push
 	 */
-	public synchronized E pop() {
+	@SuppressWarnings("unchecked")
+    public synchronized E pop() {
 		try {
 			int index = elementCount - 1;
 			E obj = (E)elementData[index];

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
Fri Jun 22 01:19:29 2007
@@ -25,7 +25,6 @@
 import java.net.SocketImpl;
 import java.net.UnknownHostException;
 import java.nio.channels.Channel;
-import java.nio.channels.SelectableChannel;
 
 /*
  * The interface for network methods.

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
Fri Jun 22 01:19:29 2007
@@ -25,7 +25,6 @@
 import java.net.SocketImpl;
 import java.net.UnknownHostException;
 import java.nio.channels.Channel;
-import java.nio.channels.SelectableChannel;
 
 /*
  * 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
Fri Jun 22 01:19:29 2007
@@ -17,8 +17,6 @@
 
 package org.apache.harmony.luni.util;
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 /**
  * Used to parse a string and return either a single or double precision

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java?view=diff&rev=549750&r1=549749&r2=549750
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
Fri Jun 22 01:19:29 2007
@@ -69,6 +69,7 @@
      * @param initialCapacity
      * @param initialLoadFactor
      */
+    @SuppressWarnings("unchecked")
     public TwoKeyHashMap(int initialCapacity, float initialLoadFactor) {
          if (initialCapacity < 0) {
             throw new IllegalArgumentException("initialCapacity should be >= 0");
@@ -174,6 +175,7 @@
      * Rehash the map
      *
      */
+    @SuppressWarnings("unchecked")
     void rehash() {
         int newArrSize = (arrSize + 1) * 2 + 1;
         if (newArrSize < 0) {



Mime
View raw message