Add missing braces around if- for- and while-statements
Change-Id: Ib7d455426fa78ac803f9d5162466f52b973cf998
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(' ');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user