You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sian January (JIRA)" <ji...@apache.org> on 2007/01/17 12:44:28 UTC
[jira] Created: (HARMONY-3015) [classlib] [security] Fixes for some
minor bugs in the security module found by FindBugs
[classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
----------------------------------------------------------------------------------------
Key: HARMONY-3015
URL: https://issues.apache.org/jira/browse/HARMONY-3015
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Sian January
Priority: Minor
Attachments: exclusionFilter.xml.patch, security.patch
I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-3015) [classlib] [security] Fixes for some
minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January updated HARMONY-3015:
----------------------------------
Attachment: security.patch
exclusionFilter.xml.patch
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, security.patch
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465734 ]
Sian January commented on HARMONY-3015:
---------------------------------------
I have attached two updated patches incorporating both of Alexey's comments.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-3015) [classlib] [security] Fixes for some
minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov closed HARMONY-3015.
------------------------------------
Great. Looks like we may finally close this issue.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484467 ]
Alexei Zakharov commented on HARMONY-3015:
------------------------------------------
Sian, I've started to review your security.patch2 but found too many odd changes and stopped. For example I didn't understand the logic in fixes for first four files:
javax.security.cert.CollectionCertStoreParameters
javax.security.cert.LDAPCertStoreParameters
javax.security.cert.X509CertSelector
javax.security.cert.X509CrlSelector
Why clone() is fixed in such a strange way? IMO it will start throwing CloneNotSupportedException, isn't it? Did I miss something?
As far as I understand the patch was generated automatically. Could you please review it manually and filter out some stuff? Thanks!
Alexei
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498804 ]
Alexei Zakharov commented on HARMONY-3015:
------------------------------------------
Issue closed.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465666 ]
Alexey Varlamov commented on HARMONY-3015:
------------------------------------------
Actual fixes look good, except the following:
--- src/main/java/common/java/security/BasicPermission.java (revision 494820)
+++ src/main/java/common/java/security/BasicPermission.java (working copy)
@@ -140,7 +140,7 @@
* It is assumed that names cannot be null or empty.
*/
static boolean nameImplies(String thisName, String thatName) {
- if (thisName == thatName) {
+ if (thisName.equals(thatName)) {
return true;
}
int end = thisName.length();
The "==" operator is used deliberately, to check fastpath.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, security.patch
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465663 ]
Alexey Varlamov commented on HARMONY-3015:
------------------------------------------
Sian,
I think this justification is void:
<!-- Need to use keySet iterator as both key and value are used -->
Because entrySet interator gives both key and value, too.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, security.patch
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487766 ]
Sian January commented on HARMONY-3015:
---------------------------------------
Hi Alexei,
Thanks for looking at this patch. I just wanted to explain the clone() fixes. The methods are fixed so that super.clone() is always called. This means that the clone() method on Object is always called, so the cloned object will always be of the correct type. If LDAPCertStoreParameters.clone() just returns a new LDAPCertStoreParameters then any subtypes that call super.clone() will return an object of the wrong type. It's also explained here - http://findbugs.sourceforge.net/bugDescriptions.html#CN_IDIOM_NO_SUPER_CALL in the FindBugs documentation.
The fixes were not generated automatically - I wrote them manually based on a report produced by FindBugs. I can't see anything obvious in the patch that needs to be filtered out but I'm happy to discuss anything else you are concerned about.
Thanks,
Sian
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498560 ]
Sian January commented on HARMONY-3015:
---------------------------------------
Hi Alexei,
Thanks for checking all that in - it all looks fine.
In reply to 2): I defined hashCode() for all those classes because one of the rules of programming in Java is that if you override the equals() method you should always override hashCode() because equal objects must always have equal hash codes. I'm not sure why I use 37 - I think I was taught to do the hash like that at some point to get a good range of hash values for different Objects, but I can't remember why it's 37 rather than 36 or 38 or another number to be honest!
1) and 3) - great!
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498802 ]
Alexei Zakharov commented on HARMONY-3015:
------------------------------------------
About 2: aha, I see. All that classes have equals() method redefined. Now I got it.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3015) [classlib] [security] Fixes for some
minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January updated HARMONY-3015:
----------------------------------
Attachment: exclusionFilter.xml.patch2
security.patch2
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov reassigned HARMONY-3015:
----------------------------------------
Assignee: Alexei Zakharov
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465725 ]
Sian January commented on HARMONY-3015:
---------------------------------------
Hi Alexey - thanks for looking at this. I will update the patch with your comments.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, security.patch
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-3015) [classlib] [security] Fixes for
some minor bugs in the security module found by FindBugs
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-3015.
--------------------------------------
Resolution: Fixed
Hi Sian,
Sorry for the long delay, couldn't find a time to get back to this bug. I understood your idea about Object.clone() - thanks for the explanation. The patch looks good in general. I have just a few comments:
1) I fixed DSAPublicKeyImpl.java exactly in the same way you did for DSAPrivateKeyImpl.java
2)
AlgorithIdentifier.java
Extension.java
Extensions.java
GeneralName.java
TBSCertList.java
Was there any special reason why you defined hashcode() externally for these classes? And why you use 37 everywhere BTW? :) Just asking.
3)
TimestampTest.java
assertEquals() and friends has the format assert(EXPECTED, ACTUAL), not vice versa. So I have swapped the parameters.
I have committed slightly updated version of your patch at the revision 541025. Please verify I didn't break / forget anything.
> [classlib] [security] Fixes for some minor bugs in the security module found by FindBugs
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3015
> URL: https://issues.apache.org/jira/browse/HARMONY-3015
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexei Zakharov
> Priority: Minor
> Attachments: exclusionFilter.xml.patch, exclusionFilter.xml.patch2, security.patch, security.patch2
>
>
> I am attaching a patch containing fixes for minor issues in the security module, and also a second patch for the exclusionFilter.xml file found in standard/tools/FindBugs to exclude false positives in the same module.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.