-
Enhancement
-
Resolution: Won't Fix
-
P3
-
None
-
1.1.1, 1.2.0
-
x86
-
windows_95
Name: sgC58550 Date: 06/25/97
This is in the context of an application
Take an instance of java.utils.Properties class, insert an
Object other than java.lang.String. After this has been
accomplihed attempt to use
java.utils.Properties.save(OutputStream,String) a
ClassCastError is given with out much reason. The output only
has the header and property name followed by an =.
public static void main(String args[]) {
try {
Properties myProps = new Properties();
myProps.put("One",new Integer(1));
FileOutputStream os = new FileOutputStream("outprops");
myProps.save(os,"My Props");
os.flush();
os.close();
}catch(Exception ex) {
ex.printStackTrace();
Sytem.exit(1);
}
System.exit(0);
}
company - , email - ###@###.###
======================================================================
- relates to
-
JDK-4176094 Incompatible changes in java.util Properties and Hashtable
-
- Closed
-
-
JDK-8157123 java.util.Properties class is violating the Liskov's Substitution Principle (LSP)
-
- Closed
-