[
https://issues.apache.org/jira/browse/PIVOT-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349583#comment-16349583
]
Roger Whitcomb commented on PIVOT-1012:
---------------------------------------
Last of the changes for IllegalArgumentException regularization, that is, using
the Utils methods for these as much as possible.
Sending wtk\src\org\apache\pivot\wtk\content\TableViewImageCellRenderer.java
Sending wtk\src\org\apache\pivot\wtk\content\TableViewMultiCellRenderer.java
Sending wtk\src\org\apache\pivot\wtk\content\TableViewNumberCellRenderer.java
Sending wtk\src\org\apache\pivot\wtk\content\TableViewRowComparator.java
Sending wtk\src\org\apache\pivot\wtk\effects\Transition.java
Sending wtk\src\org\apache\pivot\wtk\media\BufferedImageSerializer.java
Sending wtk\src\org\apache\pivot\wtk\media\Drawing.java
Sending wtk\src\org\apache\pivot\wtk\media\Picture.java
Sending wtk\src\org\apache\pivot\wtk\skin\BorderSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\BoxPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\CardPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\FillPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\FlowPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\GridPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\LabelSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\StackPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\TablePaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\TextAreaSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\TextPaneSkin.java
Sending wtk\src\org\apache\pivot\wtk\skin\WindowSkin.java
Sending wtk\src\org\apache\pivot\wtk\validation\ComparableRangeValidator.java
Sending wtk\src\org\apache\pivot\wtk\validation\FormattedValidator.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraColorChooserSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSkin.java
Transmitting file data ........................done
Committing transaction...
Committed revision 1822916.
> Many places throw IllegalArgumentException during parameter validation, but
> some are inconsistent
> -------------------------------------------------------------------------------------------------
>
> 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
(v7.6.3#76005)