< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SecurityManager.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
*** 136,168 ****
private void readSystemProperties(){
try {
String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT);
! if(value != null && !value.equals("")){
entityExpansionLimit = Integer.parseInt(value);
if (entityExpansionLimit < 0)
entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
}
else
entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
}catch(Exception ex){}
try {
String value = System.getProperty(Constants.MAX_OCCUR_LIMIT);
! if(value != null && !value.equals("")){
maxOccurLimit = Integer.parseInt(value);
if (maxOccurLimit < 0)
maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
}
else
maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
}catch(Exception ex){}
try {
String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT);
! if(value != null && !value.equals("")){
fElementAttributeLimit = Integer.parseInt(value);
if ( fElementAttributeLimit < 0)
fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
}
else
--- 136,168 ----
private void readSystemProperties(){
try {
String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT);
! if(value != null && !value.isEmpty()){
entityExpansionLimit = Integer.parseInt(value);
if (entityExpansionLimit < 0)
entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
}
else
entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT;
}catch(Exception ex){}
try {
String value = System.getProperty(Constants.MAX_OCCUR_LIMIT);
! if(value != null && !value.isEmpty()){
maxOccurLimit = Integer.parseInt(value);
if (maxOccurLimit < 0)
maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
}
else
maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT;
}catch(Exception ex){}
try {
String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT);
! if(value != null && !value.isEmpty()){
fElementAttributeLimit = Integer.parseInt(value);
if ( fElementAttributeLimit < 0)
fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT;
}
else
< prev index next >