pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Whitcomb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-1012) Many places throw IllegalArgumentException during parameter validation, but some are inconsistent
Date Fri, 02 Feb 2018 04:49:00 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349780#comment-16349780

Roger Whitcomb commented on PIVOT-1012:

Add the color name string to the remaining calls to GraphicsUtiliities.decodeColor to complete
this issue:

Sending wtk\src\org\apache\pivot\wtk\content\ColorItem.java
Sending wtk\src\org\apache\pivot\wtk\skin\BorderSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\ContainerSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\ImageViewSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\LabelSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\MovieViewSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraActivityIndicatorSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraAlertSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraCheckboxSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraLinkButtonSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraListButtonSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraListViewSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraMenuBarSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraMenuButtonSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraMenuSkin.java
Transmitting file data ...............done
Committing transaction...
Committed revision 1822921.

> Many places throw IllegalArgumentException during parameter validation, but some are
> -------------------------------------------------------------------------------------------------
>                 Key: PIVOT-1012
>                 URL: https://issues.apache.org/jira/browse/PIVOT-1012
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core, wtk, wtk-terra
>         Environment: All
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>             Fix For: 2.1
> Primarily the code looks like this currently:
> {code:java}
> if (param == null)
> throw new IllegalArgumentException(param + " is null");
> {code}
> But not all places have the message in the exception, and not all places check the parameters
as they should, and not all places have the same message.
> So, regularize this checking everywhere by making common "core" methods to do this null
check (or other checks, such as <= 0, etc.) so that the checking and messaging are common.
 This also simplifies the code, and with JIT compiling shouldn't affect runtime speed either,
as this common method should get compiled and/or inlined as appropriate.

This message was sent by Atlassian JIRA

View raw message