RFR 8214971 : Replace use of string.equals("") with isEmpty()

Roger Riggs roger.riggs at oracle.com
Thu Dec 6 22:37:51 UTC 2018


Hi Claes,

Thanks for the reminder about xalan sources.

Updated to revert changes to xalan.

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-string-isempty-8214971-2/

Thanks, Roger

On 12/6/18 4:48 PM, Claes Redestad wrote:
> Should changes to various com.sun.org.apache.xalan classes in java.xml 
> be deferred to upstream?
>
> Otherwise looks good to me!
>
> /Claes
>
> On 2018-12-06 21:04, Roger Riggs wroe te:
>> Please review changing string.equals("") to string.isEmpty().
>> isEmpty is preferred, performs better and is easier to optimize.
>>
>> The change is a literal substitution in all files and only in these 
>> modules:
>>
>>    java.base
>>    java.logging
>>    java.management
>>    java.management.rmi
>>    java.naming
>>    java.net.http
>>    java.prefs
>>    java.rmi
>>    java.scripting
>>    java.sql
>>    java.sql.rowset
>>    java.xml
>>    jdk.jartool
>>    jdk.javadoc
>>    jdk.jcmd
>>    jdk.jconsole
>>    jdk.management.agent
>>    jdk.naming.dns
>>    jdk.rmic
>>
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-string-isempty-8214971-1/
>>
>> Issue:
>>   https://bugs.openjdk.java.net/browse/JDK-8214971
>>
>> Thanks, Roger
>



More information about the core-libs-dev mailing list