-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
b42
-
generic
-
generic
-
Verified
Name: iaR10016 Date: 02/25/2004
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.5.0-b39, JDK1.5.0-b38, JDK1.4.2-b28
JCK : JCK1.5-runtime (b12a)
Platform[s] : all
switch/Mode : default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Falling test :
api/java_lang/reflect/ReflectPermission/index.html#ReflectPermission [ReflectPermission1001, ReflectPermission1002]
JCK1.5-runtime api/java_lang/reflect/ReflectPermission/index.html#ReflectPermission test
fails using JDK1.5.0-b39 on all platforms with "java.lang.IllegalArgumentException: name can't be empty"
exception.
This test was excluded in JCK1.4a and it is in the latest JCK1.5 known failure list because of the
Specification bug 4274149 marked as integrated in JDK1.5.0-b28.
However, it seems like the bug 4274149 was not fully integrated: bug 4269279 (a duplicate of #4274149)
is still reproducible in the latest tiger builds, ReflectPermission class API Specification still does not specify
ReflectPermission constructors behavior if "name" parameter is null:
...
public ReflectPermission(String name)
Constructs a ReflectPermission with the specified name.
Parameters:
name - the name of the ReflectPermission
public ReflectPermission(String name, String actions)
Constructs a ReflectPermission with the specified name and actions. The actions should be null; they are ignored.
Parameters:
name - the name of the ReflectPermission
actions - should be null.
...
Please, see bugs 4269279, 4274149 for more details.
Test source location:
=====================
/java/re/jck/1.5/promoted/beta/b12a/binaries/JCK-runtime-15/tests/api/java_lang/reflect/ReflectPermission/ReflectPermissionTests.java
jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b39/jck15/sparc/sol10_sparc_cde_client_d64_esa_linux-8/workDir/api/java_lang/reflect/ReflectPermission/index_ReflectPermission.jtr
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
#Paths in Java Software:
JDK="/java/re/jdk/1.5.0/promoted/all/b39/binaries/solaris-sparc"
JCK="/java/re/jck/1.5/promoted/beta/b12a/binaries/JCK-runtime-15"
#Alternative paths outside Java Software
#JDK="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b39/binaries/solaris-sparc"
#JCK="/net/koori.sfbay/onestop/jck/1.5/promoted/beta/b12a/binaries/JCK-runtime-15"
#Alternative paths for the NSK site:
#JCK="/net/linux-15/export/home/java/jck1.5/JCK-runtime-15"
#JDK="/net/linux-15/export/home/java/jdk1.5.0/sparc"
export CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
echo `cat $JCK/build.txt | grep JCK_VERSION` `cat $JCK/build.txt | grep JCK_BUILD`
$JDK/bin/java -showversion javasoft.sqe.tests.api.java.lang.reflect.ReflectPermission.ReflectPermissionTests -TestCaseID ReflectPermission1001 ReflectPermission1002
--- script end ---
Test output:
============
JCK_VERSION=1.5 JCK_BUILD_ID=b12a
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b39)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b39, mixed mode)
java.lang.IllegalArgumentException: name can't be empty
at java.security.BasicPermission.init(BasicPermission.java:87)
at java.security.BasicPermission.<init>(BasicPermission.java:120)
at java.lang.reflect.ReflectPermission.<init>(ReflectPermission.java:62)
at javasoft.sqe.tests.api.java.lang.reflect.ReflectPermission.ReflectPermissionTests.ReflectPermission1001(ReflectPermissionTests.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
at javasoft.sqe.tests.api.java.lang.reflect.ReflectPermission.ReflectPermissionTests.main(ReflectPermissionTests.java:24)
ReflectPermission1001: Failed. Test case throws exception: java.lang.IllegalArgumentException: name can't be empty
java.lang.IllegalArgumentException: name can't be empty
at java.security.BasicPermission.init(BasicPermission.java:87)
at java.security.BasicPermission.<init>(BasicPermission.java:138)
at java.lang.reflect.ReflectPermission.<init>(ReflectPermission.java:73)
at javasoft.sqe.tests.api.java.lang.reflect.ReflectPermission.ReflectPermissionTests.ReflectPermission1002(ReflectPermissionTests.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
at javasoft.sqe.tests.api.java.lang.reflect.ReflectPermission.ReflectPermissionTests.main(ReflectPermissionTests.java:24)
ReflectPermission1002: Failed. Test case throws exception: java.lang.IllegalArgumentException: name can't be empty
STATUS:Failed.test cases: 2; all failed; first test case failure: ReflectPermission1001
Specific machine info:
======================
Hostname: linux-16
OS: Windows XP Pro
Hostname: linux-22
OS: RedHat Linux 9.0 (GNOME)
Hostname: linux-4
OS: Turbo Linux 7.0 (GNOME)
Hostname: linux-8
OS: Solaris 10 (sparc) (CDE)
======================================================================
- relates to
-
JDK-4274149 SPEC: AudioPermission throws undocumented IllegalArgumentException
- Resolved
-
JDK-4269279 java.security.BasicPermission subclasses throw undocumented exception
- Closed