-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
Name: aaC67449 Date: 06/03/98
sun.awt.AppContext.get() and put(...) some times works incorrectly (See example)
To fix this bug add something like this two lines to AppContext.java:
AppContext,205:
public synchronized Object put(Object key, Object value) {
if (key == lastKey ) // <--- this two lines
lastValue = value; // change lastValue if needed
return table.put(key, value);
}
------------------Example-----------------------------------
import sun.awt.AppContext;
public class Test {
public static void main(String argv[]) {
String key="--test key--";
AppContext c = AppContext.getAppContext();
c.get(key);
c.put(key,"Failed");
c.get(key);
c.put(key,"Passed");
System.out.println(c.get(key));
}
}
-------------------Output------------------------------------
Failed
======================================================================