harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-3416) [classlib][awt] Unneeded Dimension object copying in Component.minimumSize method
Date Fri, 16 Mar 2007 18:52:09 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Petrenko closed HARMONY-3416.
------------------------------------

    Resolution: Fixed

The patch has been applied.

> [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.


Mime
View raw message