Skip to content

Commit

Permalink
also handle null init param in ACSHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Mar 4, 2019
1 parent 22ae007 commit aa686d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AcsHelper(AcsHelper ah) {
}

public AcsHelper(Integer a) {
this.a = a;
this.a = a != null ? a : MODE_INVALID;
}

@Override
Expand Down Expand Up @@ -89,7 +89,7 @@ public void setMuted(boolean v) {
if (a == MODE_INVALID) {
a = MODE_NONE;
}
a = !v ? a | MODE_PRES : (a & ~MODE_PRES);
a = !v ? (a | MODE_PRES) : (a & ~MODE_PRES);
}
public boolean isAdmin() {
return (a & MODE_APPROVE) != 0;
Expand Down

0 comments on commit aa686d8

Please sign in to comment.