You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/03/16 19:28:09 UTC
[jira] Updated: (HARMONY-3416) [classlib][awt] Unneeded Dimension
object copying in Component.minimumSize method
[ https://issues.apache.org/jira/browse/HARMONY-3416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko updated HARMONY-3416:
-------------------------------------
Priority: Trivial (was: Major)
> [classlib][awt] Unneeded Dimension object copying in Component.minimumSize method
> ---------------------------------------------------------------------------------
>
> Key: HARMONY-3416
> URL: https://issues.apache.org/jira/browse/HARMONY-3416
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Reporter: Alexey Petrenko
> Assigned To: Alexey Petrenko
> Priority: Trivial
>
> Here is a part of the Component.minimumSize method:
> === cut ===
> 1:Dimension defSize = getDefaultMinimumSize();
> 2:if (defSize == null) {
> 3: defSize = (isDisplayable() ? new Dimension(1, 1) : new Dimension(w, h));
> 4: }
> 5: return new Dimension(defSize);
> === cut ===
> We do not need to clone Dimension object in the line 5 in case of getDefaultMinimumSize returns null.
> Unneeded object creation has a performance impact.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.