On 2 January 2015 at 15:07, Adrian Crum <[email protected]> wrote: > Thank you for fixing that. I had my IDE set for Java 1.4 but somehow it let > me use that method anyway.
That setting only applies to the source and binary format. It will complain about generics etc. but not library additions. In order to check for newer APIs you have to compile against the appropriate Java jars. > Adrian Crum > Sandglass Software > www.sandglass-software.com > > > On 1/2/2015 6:17 AM, [email protected] wrote: >> >> Author: sebb >> Date: Fri Jan 2 14:17:48 2015 >> New Revision: 1649038 >> >> URL: http://svn.apache.org/r1649038 >> Log: >> https://issues.apache.org/jira/browse/VALIDATOR-307 >> Replace String.isEmpty() with Java 1.4 compatible code >> >> Modified: >> >> commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java >> >> Modified: >> commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java?rev=1649038&r1=1649037&r2=1649038&view=diff >> >> ============================================================================== >> --- >> commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java >> (original) >> +++ >> commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java >> Fri Jan 2 14:17:48 2015 >> @@ -82,7 +82,7 @@ public class InetAddressValidator implem >> // verify that address subgroups are legal >> for (int i = 0; i <= 3; i++) { >> String ipSegment = groups[i]; >> - if (ipSegment == null || ipSegment.isEmpty()) { >> + if (ipSegment == null || ipSegment.length() == 0) { >> return false; >> } >> >> @@ -139,7 +139,7 @@ public class InetAddressValidator implem >> int emptyOctets = 0; >> for (int index = 0; index < octets.length; index++) { >> String octet = (String) octets[index]; >> - if (octet.isEmpty()) { >> + if (octet.length() == 0) { >> emptyOctets++; >> if (emptyOctets > 1) { >> return false; >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
