Alex Tugarev
2004-09-26 15:02:21 UTC
Hallo Group,
hier ein Codefragment:
Dictionary di = getDocumentProperties();
di.put("abc", "123");
Jetzt in Java 1.5.0 bekomme ich in der zweiten Zeile die Warnung:
Unsafe type operation: Should not invoke the method put(K, V) of raw type
Dictionary. References to generic type Dictionary<K,V> should be
parameterized
Leider werde ich aus der Dokumentation seit Tagen nicht schlauer:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Dictionary.html
Was bedeutet die Warnung, und was bedeutet der Hinweis in der Dokumentation
"NOTE: This class is obsolete. New implementations should implement the Map
interface, rather than extending this class."?
Mit freundlichen Grüßen
Alex Tugarev
hier ein Codefragment:
Dictionary di = getDocumentProperties();
di.put("abc", "123");
Jetzt in Java 1.5.0 bekomme ich in der zweiten Zeile die Warnung:
Unsafe type operation: Should not invoke the method put(K, V) of raw type
Dictionary. References to generic type Dictionary<K,V> should be
parameterized
Leider werde ich aus der Dokumentation seit Tagen nicht schlauer:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Dictionary.html
Was bedeutet die Warnung, und was bedeutet der Hinweis in der Dokumentation
"NOTE: This class is obsolete. New implementations should implement the Map
interface, rather than extending this class."?
Mit freundlichen Grüßen
Alex Tugarev