Fixed some Findbugs issues.
Renamed finalize(…) in AbstractQueryCreator to complete(…).
This commit is contained in:
@@ -92,7 +92,7 @@ public abstract class RepositoryConfig<T extends SingleRepositoryConfigInformati
|
||||
*/
|
||||
public boolean configureManually() {
|
||||
|
||||
return getRepositoryNodes().size() > 0;
|
||||
return getRepositoryElements().size() > 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,15 +182,15 @@ public abstract class RepositoryConfig<T extends SingleRepositoryConfigInformati
|
||||
public Iterable<T> getSingleRepositoryConfigInformations() {
|
||||
|
||||
Set<T> infos = new HashSet<T>();
|
||||
for (Element element : getRepositoryNodes()) {
|
||||
infos.add(createSingleRepositoryConfigInformationFor(element));
|
||||
for (Element repositoryElement : getRepositoryElements()) {
|
||||
infos.add(createSingleRepositoryConfigInformationFor(repositoryElement));
|
||||
}
|
||||
|
||||
return infos;
|
||||
}
|
||||
|
||||
|
||||
private Collection<Element> getRepositoryNodes() {
|
||||
private Collection<Element> getRepositoryElements() {
|
||||
|
||||
NodeList nodes = element.getChildNodes();
|
||||
Set<Element> result = new HashSet<Element>();
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SimpleParameterAccessor {
|
||||
"Invalid number of parameters given!");
|
||||
|
||||
this.parameters = parameters;
|
||||
this.values = values;
|
||||
this.values = values.clone();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public abstract class AbstractQueryCreator<T, S> {
|
||||
*/
|
||||
public T createQuery() {
|
||||
|
||||
return finalize(createCriteria(tree), tree.getSort());
|
||||
return complete(createCriteria(tree), tree.getSort());
|
||||
}
|
||||
|
||||
|
||||
@@ -136,5 +136,5 @@ public abstract class AbstractQueryCreator<T, S> {
|
||||
* @param sort
|
||||
* @return
|
||||
*/
|
||||
protected abstract T finalize(S criteria, Sort sort);
|
||||
protected abstract T complete(S criteria, Sort sort);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class PartTree implements Iterable<OrPart> {
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
private String[] split(String text, String keyword) {
|
||||
private static String[] split(String text, String keyword) {
|
||||
|
||||
String regex = format(KEYWORD_TEMPLATE, keyword);
|
||||
|
||||
@@ -152,7 +152,7 @@ public class PartTree implements Iterable<OrPart> {
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class OrPart implements Iterable<Part> {
|
||||
public static class OrPart implements Iterable<Part> {
|
||||
|
||||
private final List<Part> children = new ArrayList<Part>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user