< prev index next >

src/java.xml/share/classes/com/sun/xml/internal/stream/events/StartDocumentEvent.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 71,81 **** protected void init(String encoding, String version, boolean standalone,Location loc) { setEventType(XMLStreamConstants.START_DOCUMENT); this.fEncodingScheam = encoding; this.fVersion = version; this.fStandalone = standalone; ! if (encoding != null && !encoding.equals("")) this.fEncodingSchemeSet = true; else { this.fEncodingSchemeSet = false; this.fEncodingScheam = "UTF-8"; } --- 71,81 ---- protected void init(String encoding, String version, boolean standalone,Location loc) { setEventType(XMLStreamConstants.START_DOCUMENT); this.fEncodingScheam = encoding; this.fVersion = version; this.fStandalone = standalone; ! if (encoding != null && !encoding.isEmpty()) this.fEncodingSchemeSet = true; else { this.fEncodingSchemeSet = false; this.fEncodingScheam = "UTF-8"; }
< prev index next >