-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
None
-
generic
-
generic
Problem description:
====================
Specification for javax.smartcardio.CardPermission.equals(Object obj) is insufficient
for writing conformance tests.
The javadoc for method equals of the javax.smartcardio.CardPermission class
states as follows:
---Excerpt-from-spec---
public boolean equals(Object obj)
Compares the specified object with this CardPermission for equality.
Specified by:
equals in class Permission
Parameters:
obj - the object to be compared for equality with this CardPermission
Returns:
true if the specified object is equal to this CardPermission
---End-of-Excerpt-from-spec---
However, it's not clear what does it assume under "equality".
Note that specification for java.security.Permission.equals(Object obj)
states as follows:
---Excerpt-from-spec---
public abstract boolean equals(Object obj)
Checks two Permission objects for equality.
Do not use the equals method for making access control decisions; use the implies method.
Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if both Permission objects are equivalent.
---End-of-Excerpt-from-spec---
That is, neither javadoc for javax.smartcardio.CardPermission nor
javadoc for java.security.Permission (as a spec for parent class
which specified behaviour of method, as javadoc for
javax.smartcardio.CardPermission.equals mentioned)
does NOT define exact meaning of "equality" or "equvivalent".
The specification should define clear when certain object is
equivalent to CardPermission object. As example of such specification
please look spec for java.io.FilePermission.equals(Object obj)
====================
Specification for javax.smartcardio.CardPermission.equals(Object obj) is insufficient
for writing conformance tests.
The javadoc for method equals of the javax.smartcardio.CardPermission class
states as follows:
---Excerpt-from-spec---
public boolean equals(Object obj)
Compares the specified object with this CardPermission for equality.
Specified by:
equals in class Permission
Parameters:
obj - the object to be compared for equality with this CardPermission
Returns:
true if the specified object is equal to this CardPermission
---End-of-Excerpt-from-spec---
However, it's not clear what does it assume under "equality".
Note that specification for java.security.Permission.equals(Object obj)
states as follows:
---Excerpt-from-spec---
public abstract boolean equals(Object obj)
Checks two Permission objects for equality.
Do not use the equals method for making access control decisions; use the implies method.
Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if both Permission objects are equivalent.
---End-of-Excerpt-from-spec---
That is, neither javadoc for javax.smartcardio.CardPermission nor
javadoc for java.security.Permission (as a spec for parent class
which specified behaviour of method, as javadoc for
javax.smartcardio.CardPermission.equals mentioned)
does NOT define exact meaning of "equality" or "equvivalent".
The specification should define clear when certain object is
equivalent to CardPermission object. As example of such specification
please look spec for java.io.FilePermission.equals(Object obj)
- duplicates
-
JDK-6445367 (smartcardio) Changes for JSR 268 Public Review
-
- Resolved
-