commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IMAGING-149) Colors should check whether color components are in allowed ranges
Date Sat, 10 Jan 2015 10:07:34 GMT

    [ https://issues.apache.org/jira/browse/IMAGING-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272428#comment-14272428
] 

Benedikt Ritter commented on IMAGING-149:
-----------------------------------------

Hello Stephan,

your approach is perfectly fine. IllegalArgumentException is the way to go here. Using annotation
based testing for these kind of errors is exactly what I would do. I think the overhead of
using ExpectedException is only necessary when the exception been thrown carries additional
information (which is not the case here).

Go for it and implement the other colors.

TIA,
Benedikt

> Colors should check whether color components are in allowed ranges
> ------------------------------------------------------------------
>
>                 Key: IMAGING-149
>                 URL: https://issues.apache.org/jira/browse/IMAGING-149
>             Project: Commons Imaging
>          Issue Type: Improvement
>          Components: imaging.color.*
>            Reporter: Benedikt Ritter
>             Fix For: Patch Needed
>
>         Attachments: IMAGING-149_partial_001.patch
>
>
> Each color in the color package should check the parameters passed into the constructor
for validity regarding their color space.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message