Collection.isEmpty() should be used to test for emptiness
Closes gh-1670
This commit is contained in:
committed by
Stephane Nicoll
parent
7da40abba5
commit
e381514b07
@@ -191,7 +191,7 @@ public class TagWriter {
|
||||
}
|
||||
|
||||
private boolean inTag() {
|
||||
return this.tagState.size() > 0;
|
||||
return !this.tagState.isEmpty();
|
||||
}
|
||||
|
||||
private TagStateEntry currentState() {
|
||||
|
||||
@@ -180,7 +180,7 @@ public class GroovyMarkupConfigurer extends TemplateConfiguration
|
||||
}
|
||||
ClassLoader classLoader = getApplicationContext().getClassLoader();
|
||||
Assert.state(classLoader != null, "No ClassLoader");
|
||||
return (urls.size() > 0 ? new URLClassLoader(urls.toArray(new URL[urls.size()]), classLoader) : classLoader);
|
||||
return (!urls.isEmpty() ? new URLClassLoader(urls.toArray(new URL[urls.size()]), classLoader) : classLoader);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user