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 2006/12/20 10:20:21 UTC
[jira] Created: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
[classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
--------------------------------------------------------------------------------
Key: HARMONY-2811
URL: http://issues.apache.org/jira/browse/HARMONY-2811
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Sian January
Priority: Minor
As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=all ]
Sian January updated HARMONY-2811:
----------------------------------
Attachment: findbugs_patch.txt
exclusionFilter_patch.txt
Attached a patch for luni with fixes for bugs found by FindBugs. I'm happy to split the patch into smaller ones or to discuss/explain any of the fixes.
Also attached a patch for exclusionFilter.xml (in standard/tools/FindBugs) that excludes all the false positives I found. This patch contains a change to the format of the file because when running FindBugs myself I discovered that it won't accept extra XML tags, so I converted the "<Reason..." tags to be comments instead.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=comments#action_12459976 ]
Sian January commented on HARMONY-2811:
---------------------------------------
Hi Alexey - thanks for looking at this. I'm fairly confident about the first change because the comment for factories says the key is the adaptable type (and not the adaptable instance itself). Also a Class is used as the key in other places in the same file. Regarding the second change, I think stackDump is used in the most recent version of DebugMemorySpy.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=all ]
Alexey Petrenko reassigned HARMONY-2811:
----------------------------------------
Assignee: Alexey Petrenko
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=comments#action_12459964 ]
Alexey Petrenko commented on HARMONY-2811:
------------------------------------------
You also added array cloning in few places. This will increas code stability but it can cause performance degradation and probably need to be discussed on dev list.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=all ]
Alexey Petrenko resolved HARMONY-2811.
--------------------------------------
Resolution: Fixed
The patch has been applied.
Please verify.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=comments#action_12459961 ]
Alexey Petrenko commented on HARMONY-2811:
------------------------------------------
Great and huge job, Sian!
But some of the changes need more details...
Index: luni/src/main/java/org/apache/harmony/luni/platform/AdapterManager.java
===================================================================
@@ -35,7 +35,7 @@
private final HashMap<Class, List<IAdapterFactory>> factories = new HashMap<Class, List<IAdapterFactory>>();
public Object getAdapter(IAdaptable adaptable, Class adapterType) {
- List factoryList = factories.get(adaptable);
+ List factoryList = factories.get(adapterType);
if (factoryList != null) {
for (Iterator factoryItr = factoryList.iterator(); factoryItr
.hasNext();) {
===================================================================
Are you sure that this is good replacement?
Index: luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
===================================================================
--- luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java (revision 486101)
+++ luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java (working copy)
@@ -25,7 +25,7 @@
*/
final class DebugMemorySpy extends AbstractMemorySpy {
- private final boolean stackDump = true;
+ private static final boolean stackDump = true;
===================================================================
FindBugs reports that stackDump is not used. It probably should be removed but not marked as static.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=comments#action_12460229 ]
Sian January commented on HARMONY-2811:
---------------------------------------
Thanks Alexey. The patch was applied as expected except for the change to DebugMemorySpy, which seems to have been left out.
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Assigned To: Alexey Petrenko
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2811) [classlib] [luni] Fixes for some
minor issues in luni found by Melody (FindBugs)
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2811?page=all ]
Sian January updated HARMONY-2811:
----------------------------------
Patch Info: [Patch Available]
> [classlib] [luni] Fixes for some minor issues in luni found by Melody (FindBugs)
> --------------------------------------------------------------------------------
>
> Key: HARMONY-2811
> URL: http://issues.apache.org/jira/browse/HARMONY-2811
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Sian January
> Priority: Minor
> Attachments: exclusionFilter_patch.txt, findbugs_patch.txt
>
>
> As summary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira