+1 with Eelco.
The use of poor coding constructs or coding style such as the final ternary, double locking and so on should be checked by tools such as Checkstyle and/or PMD as part of the maven build. Unit tests should only test the code that we actually write. I tend to agree with Juergen that we should be looking out for use of final ternary in the Wicket code, but unit tests are the wrong place for this check.
Regards,
Chris
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: 10 November 2004 13:49
> To: [EMAIL PROTECTED]
> Subject: Re: AW: [Wicket-develop] FinalTernaryIfCompilerBug
>
>
> Gwyn Evans wrote:
>
> >On Wed, 10 Nov 2004 07:10:12 +0100, Eelco Hillenius
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>We just have to make sure we do not introduce that construct.
> >>
> >>
> >
> >Which to me seems like an reasonable thing for an automated
> test to be
> >doing.
> >
> >The things that I'd be considering are if the test takes a
> lot of time
> >to run or support and how feasable is it that the problem
> could occur.
> >My default position would be to go for leaving it there, though...
> >
> >
>
> My problem with this is that we should use the unit tests to
> verify the
> *Wicket* code, not what JDK we are using. As this specific
> construct is
> never used in Wicket, it does not prove anything, but worse
> (if we setup
> the Maven build to fail when tests fail as I think we should)
> it fails
> on a tests without there being a problem!
>
> >
> >
> >>said, we do not so far. I think guarding against JDK bugs
> can only be
> >>done by just being carefull (and know what potential pitfalls are).
> >>What about the zillion of bugs in other JDK versions?
> >>
> >>
> >
> > Well, in an ideal world, there'd be tests for them (now that's an
> >idea for an OpenSource project - a set of (plugable) tests to scan a
> >code base for JDK bugs - Could be an Intellij plugin for
> example) but
> >while no one's suggesting they should be there, it seems odd
> to remove
> >it unless there's a specific reason...
> >
> >
>
> The reason is that if people use the JDK with that bug to
> compile/ run
> the tests, a test will fail, while actually there is no
> problem at all!
>
> Regards,
>
> Eelco
>
> > On the other hand, if it does take non-trivial time to
> run, it should
> >come out of the unit tests, at least, as that might help
> with getting
> >them run regularly.
> >
> >/Gwyn
> >
> >
> >-------------------------------------------------------
> >This SF.Net email is sponsored by:
> >Sybase ASE Linux Express Edition - download now for FREE LinuxWorld
> >Reader's Choice Award Winner for best database on Linux.
> >http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> >_______________________________________________
> >Wicket-develop mailing list [EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on
> Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Wicket-develop mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
>
