Add missing braces around if- for- and while-statements

Change-Id: Ib7d455426fa78ac803f9d5162466f52b973cf998
This commit is contained in:
David Pursehouse
2015-03-16 17:10:40 +09:00
parent 1abfd35d76
commit 5ddffa0060
35 changed files with 131 additions and 66 deletions

View File

@@ -136,7 +136,9 @@ public class CommentDetail {
parentMap.put(parentUuid, l);
}
l.add(c);
if (parentUuid == null) rootComments.add(c);
if (parentUuid == null) {
rootComments.add(c);
}
}
// Add the comments in the list, starting with the head and then going through all the

View File

@@ -125,11 +125,15 @@ public class PermissionRange implements Comparable<PermissionRange> {
r.append(' ');
} else {
if (getMin() != getMax()) {
if (0 <= getMin()) r.append('+');
if (0 <= getMin()) {
r.append('+');
}
r.append(getMin());
r.append("..");
}
if (0 <= getMax()) r.append('+');
if (0 <= getMax()) {
r.append('+');
}
r.append(getMax());
r.append(' ');
}

View File

@@ -126,8 +126,12 @@ public class PermissionRule implements Comparable<PermissionRule> {
@Override
public int compareTo(PermissionRule o) {
int cmp = action(this) - action(o);
if (cmp == 0) cmp = range(o) - range(this);
if (cmp == 0) cmp = group(this).compareTo(group(o));
if (cmp == 0) {
cmp = range(o) - range(this);
}
if (cmp == 0) {
cmp = group(this).compareTo(group(o));
}
return cmp;
}