-
Bug
-
Resolution: Fixed
-
P4
-
6
-
None
-
b27
-
generic
-
generic
--------------------------
--- ObjectName(String) ---
--------------------------
----------------------------------------------
Accepted but should be rejected (key is empty)
----------------------------------------------
ObjectName = d:=v
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName = d:k=
javax.management.MalformedObjectNameException: Unterminated key property part
at javax.management.ObjectName.construct(ObjectName.java:465)
at javax.management.ObjectName.<init>(ObjectName.java:1302)
at NullEmptyKeyValue.createObjectName(NullEmptyKeyValue.java:11)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:56)
----------------------------------------
--- ObjectName(String,String,String) ---
----------------------------------------
----------------------------------------------
Should throw NullPointerException instead of MalformedObjectNameException
----------------------------------------------
ObjectName.Domain = d
ObjectName.Key = k
ObjectName.Value = null
javax.management.MalformedObjectNameException: Invalid value (null)
at javax.management.ObjectName.checkValue(ObjectName.java:888)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1324)
at NullEmptyKeyValue.createObjectName2(NullEmptyKeyValue.java:27)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:64)
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName.Domain = d
ObjectName.Key = k
ObjectName.Value =
javax.management.MalformedObjectNameException: Invalid value (empty)
at javax.management.ObjectName.checkValue(ObjectName.java:892)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1324)
at NullEmptyKeyValue.createObjectName2(NullEmptyKeyValue.java:27)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:65)
------------------------------------
--- ObjectName(String,Hashtable) ---
------------------------------------
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName.Domain = d
ObjectName.Hashtable = {k=}
javax.management.MalformedObjectNameException: Invalid value (empty)
at javax.management.ObjectName.checkValue(ObjectName.java:892)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1345)
at NullEmptyKeyValue.createObjectName3(NullEmptyKeyValue.java:42)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:78)
###@###.### 2005-2-16 10:05:52 GMT
--- ObjectName(String) ---
--------------------------
----------------------------------------------
Accepted but should be rejected (key is empty)
----------------------------------------------
ObjectName = d:=v
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName = d:k=
javax.management.MalformedObjectNameException: Unterminated key property part
at javax.management.ObjectName.construct(ObjectName.java:465)
at javax.management.ObjectName.<init>(ObjectName.java:1302)
at NullEmptyKeyValue.createObjectName(NullEmptyKeyValue.java:11)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:56)
----------------------------------------
--- ObjectName(String,String,String) ---
----------------------------------------
----------------------------------------------
Should throw NullPointerException instead of MalformedObjectNameException
----------------------------------------------
ObjectName.Domain = d
ObjectName.Key = k
ObjectName.Value = null
javax.management.MalformedObjectNameException: Invalid value (null)
at javax.management.ObjectName.checkValue(ObjectName.java:888)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1324)
at NullEmptyKeyValue.createObjectName2(NullEmptyKeyValue.java:27)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:64)
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName.Domain = d
ObjectName.Key = k
ObjectName.Value =
javax.management.MalformedObjectNameException: Invalid value (empty)
at javax.management.ObjectName.checkValue(ObjectName.java:892)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1324)
at NullEmptyKeyValue.createObjectName2(NullEmptyKeyValue.java:27)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:65)
------------------------------------
--- ObjectName(String,Hashtable) ---
------------------------------------
----------------------------------------------
Rejected but should be accepted (value can be empty)
----------------------------------------------
ObjectName.Domain = d
ObjectName.Hashtable = {k=}
javax.management.MalformedObjectNameException: Invalid value (empty)
at javax.management.ObjectName.checkValue(ObjectName.java:892)
at javax.management.ObjectName.construct(ObjectName.java:630)
at javax.management.ObjectName.<init>(ObjectName.java:1345)
at NullEmptyKeyValue.createObjectName3(NullEmptyKeyValue.java:42)
at NullEmptyKeyValue.main(NullEmptyKeyValue.java:78)
###@###.### 2005-2-16 10:05:52 GMT
- relates to
-
JDK-6241824 REGRESSION: JCK1.5a-/api/javax_management/foundation/objectname[Constructor tests failed]
-
- Closed
-
-
JDK-6957055 Can't get MalformedObjectNameException
-
- Closed
-