On 22 Feb 2011, at 22:38, adelme...@apache.org wrote:

> Author: adelmelle
> Date: Tue Feb 22 21:38:28 2011
> New Revision: 1073518
> <snip />
> @@ -402,7 +398,6 @@ public final class ColorUtil {
> 
>                 /* Ask FOP factory to get ColorSpace for the specified ICC 
> profile source */
>                 if (foUserAgent != null && iccProfileSrc != null) {
> -                    assert colorSpace == null;
> 

To revisit my earlier point about assertions: 
Note that this is a fine example of how assert should *not* be used, IMO. 
It is meant to test for conditions assumed to be true for as far as we 
understand/intend the code to work, but for which this 'guarantee' is, strictly 
speaking, non-verifiable at compile-time. 

If you look 10 lines up, you see that, if iccProfileSrc has been assigned a 
value, that means the assignment of colorSpace did not take place, hence it is 
redundant to explicitly re-assert this.
It would be the same as hard-coding 'assert true;'.


Regards,

Andreas
---

Reply via email to