On 01/03/2015 02:11, Christopher Schultz wrote: > Mark, > > On 2/28/15 2:38 PM, ma...@apache.org wrote: >> Author: markt >> Date: Sat Feb 28 19:38:30 2015 >> New Revision: 1662994 >> >> URL: http://svn.apache.org/r1662994
<snip/> > It may be a bit pedantic, but would it be better to check for the Java > version (as above), or for the presence of the method? I tend to look for the simplest / cleanest solution. An explicit method check would duplicate code already in JreCompat. > I feel like the > availability of the method is more important than the runtime version of > Java, though the API is much more well-defined than, say, Javascript > where version-checking is always a bad idea. The method is what is required but given how tightly defined Java's API is a check for the presence of the method is functionally identical to check the Java version (which we happen to do by looking for this method). > I'm happy to leave it this way, but I feel it is a bit ... sloppy? I > dunno... is mine just an academic concern? I think it is more of a style choice at this stage. If the use of JreCompat expands then I think the academic argument would lean towards isJre8Available() on the grounds of simplicity / cleanness / etc. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org