[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Java warnings
From: |
Simon Josefsson |
Subject: |
Java warnings |
Date: |
Thu, 20 Dec 2007 12:34:15 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
Hi Oliver.
I noticed some warnings when building the java port of libidn that I
hadn't seen before. Probably these are because of improvements in gcj.
Do you know if these warnings can be fixed? A patch would be highly
appreciated.. :)
Thanks,
/Simon
make[3]: Entering directory `/home/jas/src/libidn/java/gnu/inet/encoding'
CLASSPATH=../../../../java:./../../../../java:$CLASSPATH gcj -C -d
../../../../java CombiningClass.java Composition.java DecompositionKeys.java
DecompositionMappings.java IDNA.java IDNAException.java NFKC.java Punycode.java
PunycodeException.java RFC3454.java Stringprep.java StringprepException.java
IDNAException.java:26: warning: The serializable class IDNAException does not
declare a static final serialVersionUID field of type long
public class IDNAException
^^^^^^^^^^^^^
PunycodeException.java:26: warning: The serializable class PunycodeException
does not declare a static final serialVersionUID field of type long
public class PunycodeException
^^^^^^^^^^^^^^^^^
StringprepException.java:26: warning: The serializable class
StringprepException does not declare a static final serialVersionUID field of
type long
public class StringprepException
^^^^^^^^^^^^^^^^^^^
3 problems (3 warnings)
echo timestamp > classdist_noinst.stamp
make[3]: Leaving directory `/home/jas/src/libidn/java/gnu/inet/encoding'
make[3]: Entering directory `/home/jas/src/libidn/java/gnu/inet'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/jas/src/libidn/java/gnu/inet'
make[2]: Leaving directory `/home/jas/src/libidn/java/gnu/inet'
make[2]: Entering directory `/home/jas/src/libidn/java/gnu'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/jas/src/libidn/java/gnu'
make[1]: Leaving directory `/home/jas/src/libidn/java/gnu'
Making all in .
make[1]: Entering directory `/home/jas/src/libidn/java'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/jas/src/libidn/java'
Making all in misc
make[1]: Entering directory `/home/jas/src/libidn/java/misc'
CLASSPATH=../../java/misc:./../../java/misc:$CLASSPATH gcj -C -d
../../java/misc -classpath ../../java/libidn-1.4.jar:../../java/libidn-1.4.jar
GenerateRFC3454.java GenerateNFKC.java TestIDNA.java TestNFKC.java
GenerateRFC3454.java:28: warning: The import java.io.IOException is never used
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
GenerateRFC3454.java:31: warning: The import java.util.regex.Pattern is never
used
import java.util.regex.Pattern;
^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:28: warning: The import java.io.IOException is never used
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:34: warning: The import java.util.StringTokenizer is never
used
import java.util.StringTokenizer;
^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:35: warning: The import java.util.regex.Pattern is never used
import java.util.regex.Pattern;
^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:106: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
static String decompose(String in, TreeMap mappings)
^^^^^^^
GenerateNFKC.java:144: warning: TreeSet is a raw type. References to generic
type TreeSet<T> should be parameterized
TreeSet exclusions = new TreeSet();
^^^^^^^
GenerateNFKC.java:144: warning: TreeSet is a raw type. References to generic
type TreeSet<T> should be parameterized
TreeSet exclusions = new TreeSet();
^^^^^^^
GenerateNFKC.java:154: warning: Type safety: The method add(Object) belongs to
the raw type TreeSet. References to generic type TreeSet<T> should be
parameterized
exclusions.add(line);
^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:163: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap canonical = new TreeMap();
^^^^^^^
GenerateNFKC.java:163: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap canonical = new TreeMap();
^^^^^^^
GenerateNFKC.java:164: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap compatibility = new TreeMap();
^^^^^^^
GenerateNFKC.java:164: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap compatibility = new TreeMap();
^^^^^^^
GenerateNFKC.java:165: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap combiningClasses = new TreeMap();
^^^^^^^
GenerateNFKC.java:165: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap combiningClasses = new TreeMap();
^^^^^^^
GenerateNFKC.java:182: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
compatibility.put(f[0], stripCompatibilityTag(f[5]));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:184: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
compatibility.put(f[0], f[5]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:186: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
canonical.put(f[0], f[5]);
^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:191: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
combiningClasses.put(new Integer(Integer.parseInt(f[0], 16)), f[3]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:205: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = compatibility.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:213: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
compatibility.put(k, d);
^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:223: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap compatibilityKeys = new TreeMap();
^^^^^^^
GenerateNFKC.java:223: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap compatibilityKeys = new TreeMap();
^^^^^^^
GenerateNFKC.java:224: warning: ArrayList is a raw type. References to generic
type ArrayList<E> should be parameterized
ArrayList compatibilityMappings = new ArrayList();
^^^^^^^^^
GenerateNFKC.java:224: warning: ArrayList is a raw type. References to generic
type ArrayList<E> should be parameterized
ArrayList compatibilityMappings = new ArrayList();
^^^^^^^^^
GenerateNFKC.java:227: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = compatibility.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:235: warning: Type safety: The method add(Object) belongs to
the raw type ArrayList. References to generic type ArrayList<E> should be
parameterized
compatibilityMappings.add(v);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:237: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
compatibilityKeys.put(k, new Integer(index));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:242: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap firstMap = new TreeMap();
^^^^^^^
GenerateNFKC.java:242: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap firstMap = new TreeMap();
^^^^^^^
GenerateNFKC.java:243: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap secondMap = new TreeMap();
^^^^^^^
GenerateNFKC.java:243: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap secondMap = new TreeMap();
^^^^^^^
GenerateNFKC.java:246: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = canonical.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:267: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
firstMap.put(s[0], new Integer(c.intValue()+1));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:269: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
firstMap.put(s[0], new Integer(1));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:274: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
secondMap.put(s[1], new Integer(c.intValue()+1));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:276: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
secondMap.put(s[1], new Integer(1));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:285: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap singleFirstComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:285: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap singleFirstComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:286: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap singleSecondComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:286: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap singleSecondComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:287: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap complexComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:287: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap complexComposition = new TreeMap();
^^^^^^^
GenerateNFKC.java:291: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = canonical.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:303: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
singleFirstComposition.put(s[0], new String[] { s[1], k });
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:306: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
singleSecondComposition.put(s[1], new String[] { s[0], k });
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:310: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = (TreeMap) complexComposition.get(s[0]);
^^^^^^^
GenerateNFKC.java:310: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = (TreeMap) complexComposition.get(s[0]);
^^^^^^^
GenerateNFKC.java:315: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
m.put(s[1], k);
^^^^^^^^^^^^^^
GenerateNFKC.java:317: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = new TreeMap();
^^^^^^^
GenerateNFKC.java:317: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = new TreeMap();
^^^^^^^
GenerateNFKC.java:318: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
m.put(s[1], k);
^^^^^^^^^^^^^^
GenerateNFKC.java:319: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
complexComposition.put(s[0], m);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:394: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = compatibilityKeys.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:415: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i = compatibilityMappings.iterator();
^^^^^^^^
GenerateNFKC.java:436: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i;
^^^^^^^^
GenerateNFKC.java:439: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap indices = new TreeMap();
^^^^^^^
GenerateNFKC.java:439: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap indices = new TreeMap();
^^^^^^^
GenerateNFKC.java:444: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
indices.put(new Integer(Integer.parseInt(s0, 16)), new Integer(index));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:454: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = (TreeMap) complexComposition.get(s0);
^^^^^^^
GenerateNFKC.java:454: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap m = (TreeMap) complexComposition.get(s0);
^^^^^^^
GenerateNFKC.java:456: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap line = new TreeMap();
^^^^^^^
GenerateNFKC.java:456: warning: TreeMap is a raw type. References to generic
type TreeMap<K,V> should be parameterized
TreeMap line = new TreeMap();
^^^^^^^
GenerateNFKC.java:459: warning: Iterator is a raw type. References to generic
type Iterator<E> should be parameterized
Iterator i2 = m.keySet().iterator();
^^^^^^^^
GenerateNFKC.java:467: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
indices.put(s1i, new Integer(index));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:470: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
line.put(indices.get(s1i), k);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:500: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
indices.put(new Integer(Integer.parseInt(k, 16)), new Integer(index));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GenerateNFKC.java:514: warning: Type safety: The method put(Object, Object)
belongs to the raw type TreeMap. References to generic type TreeMap<K,V> should
be parameterized
indices.put(new Integer(Integer.parseInt(k, 16)), new Integer(index));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TestIDNA.java:30: warning: The import java.io.InputStreamReader is never used
import java.io.InputStreamReader;
^^^^^^^^^^^^^^^^^^^^^^^^^
TestIDNA.java:31: warning: The import java.io.IOException is never used
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
TestIDNA.java:32: warning: The import java.io.PrintStream is never used
import java.io.PrintStream;
^^^^^^^^^^^^^^^^^^^
TestNFKC.java:29: warning: The import java.io.FileWriter is never used
import java.io.FileWriter;
^^^^^^^^^^^^^^^^^^
TestNFKC.java:30: warning: The import java.io.IOException is never used
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
TestNFKC.java:31: warning: The import java.io.PrintWriter is never used
import java.io.PrintWriter;
^^^^^^^^^^^^^^^^^^^
TestNFKC.java:32: warning: The import java.util.ArrayList is never used
import java.util.ArrayList;
^^^^^^^^^^^^^^^^^^^
TestNFKC.java:33: warning: The import java.util.TreeMap is never used
import java.util.TreeMap;
^^^^^^^^^^^^^^^^^
TestNFKC.java:34: warning: The import java.util.TreeSet is never used
import java.util.TreeSet;
^^^^^^^^^^^^^^^^^
TestNFKC.java:35: warning: The import java.util.Iterator is never used
import java.util.Iterator;
^^^^^^^^^^^^^^^^^^
TestNFKC.java:36: warning: The import java.util.StringTokenizer is never used
import java.util.StringTokenizer;
^^^^^^^^^^^^^^^^^^^^^^^^^
TestNFKC.java:37: warning: The import java.util.regex.Pattern is never used
import java.util.regex.Pattern;
^^^^^^^^^^^^^^^^^^^^^^^
80 problems (80 warnings)
echo timestamp > classdist_noinst.stamp
make[1]: Leaving directory `/home/jas/src/libidn/java/misc'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Java warnings,
Simon Josefsson <=