Allon Mureinik has uploaded a new change for review. Change subject: core: TagsDirector: use isEmpty() ......................................................................
core: TagsDirector: use isEmpty() Use List's isEmpty() method instead of comparing size() to 0 for improved readability. Change-Id: I1e6191b6ebaa4964493bbc724726fece22b31881 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/72/25672/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java index 1fc2b3c..49c425e 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java @@ -291,7 +291,7 @@ } private static void RecursiveGetTagsAndChildrenByRegExp(String tagNameRegExp, StringBuilder sb, Tags tag, TagReturnValueIndicator indicator) { - if ((tag.getChildren() != null) && (tag.getChildren().size() > 0)) { + if ((tag.getChildren() != null) && !tag.getChildren().isEmpty()) { // The following line replaces '\\' in the expression that may be added by handling a '_' character with empty string. // since we have here both String and RegExp , each backslash char is represented by four backslash chars , so for marching 2 we will need 8 tagNameRegExp=tagNameRegExp.replaceAll("\\\\\\\\", ""); -- To view, visit http://gerrit.ovirt.org/25672 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e6191b6ebaa4964493bbc724726fece22b31881 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
