ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject JDK version checking
Date Sat, 08 Jul 2000 12:33:08 GMT
This is a minor curiosity.

I noticed that a lot of code is checking the JDK version with code like
	project.getJavaVersion() == Project.JAVA_1_1

This is an identity test as opposed to an equality test. Since the objects
involved are Strings, my instinctive reaction is to change these tests to
.equals() but in this case an identity test is actually OK.

Thoughts?

Conor



--
Conor MacNeill
Home: conor@m64.com
Work: conor@cortexebusiness.com.au
Web:  www.cortexebusiness.com.au


Mime
View raw message