-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
ladybird
-
sparc
-
solaris_8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2037576 | 1.4.0 | David Mendenhall | P3 | Resolved | Fixed | beta |
I use the following test:
----------------------------------------------------------------------------
import java.awt.Toolkit;
public class Test {
public static void main(String[] args) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(null, null);
}
}
-----------------------------------------------------------------------------
To test the following builds:
Solaris:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, green threads, sunwjit)
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Classic VM (build 1.3.0-C, native threads, nojit)
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b35)
Java HotSpot(TM) Client VM (build 1.4beta-B35, mixed mode)
Win32:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b35)
Java HotSpot(TM) Client VM (build B32, mixed mode)
Here are the results of testing:
Win32 Solaris
1.2.2 NPE no NPE
1.3 NPE NPE
1.4 NPE no NPE
On Solaris NPE is introduced with the fix for 4285236 and then
eliminated with Roger's rewrite for 4289735. Currently it doesn't
throw NPE when setting null contents, but it throws NPE when the
contents is requested by another application after that.
The Solaris behavior should be changed to throw an NPE just like Windows does.
----------------------------------------------------------------------------
import java.awt.Toolkit;
public class Test {
public static void main(String[] args) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(null, null);
}
}
-----------------------------------------------------------------------------
To test the following builds:
Solaris:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, green threads, sunwjit)
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Classic VM (build 1.3.0-C, native threads, nojit)
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b35)
Java HotSpot(TM) Client VM (build 1.4beta-B35, mixed mode)
Win32:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b35)
Java HotSpot(TM) Client VM (build B32, mixed mode)
Here are the results of testing:
Win32 Solaris
1.2.2 NPE no NPE
1.3 NPE NPE
1.4 NPE no NPE
On Solaris NPE is introduced with the fix for 4285236 and then
eliminated with Roger's rewrite for 4289735. Currently it doesn't
throw NPE when setting null contents, but it throws NPE when the
contents is requested by another application after that.
The Solaris behavior should be changed to throw an NPE just like Windows does.
- backported by
-
JDK-2037576 Solaris: Toolkit.getSystemClipboard().setContents(null, null) should throw NPE
-
- Resolved
-