X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fusermgt%2FInMemoryGroupSet.java;h=ce2d7b8b1206ee2cf456e4fc62ade5c5fb42954b;hb=455802c8c3d5d596c9b852cb0e86366f2681bb39;hp=227e8853bca8b980e8821c571eb268da5c247dc9;hpb=0dd127ebfc98d49c18d3b1d8157d0d85e77b572a;p=utils diff --git a/security/impl/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java b/security/impl/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java index 227e8853..ce2d7b8b 100644 --- a/security/impl/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java +++ b/security/impl/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.usermgt; import java.util.ArrayList; @@ -27,9 +27,9 @@ import java.util.concurrent.atomic.AtomicLong; * @author Erik Brakkee */ public class InMemoryGroupSet implements GroupSet { - + private AtomicLong pk = new AtomicLong(1l); - + /** * Groups. */ @@ -49,8 +49,8 @@ public class InMemoryGroupSet implements GroupSet { * org.wamblee.usermgt.GroupSet#groupModified(org.wamblee.usermgt.Group) */ public void groupModified(Group aGroup) { - for (int i = 0; i < groups.size(); i++) { - if (groups.get(i).getPrimaryKey().equals(aGroup.getPrimaryKey())) { + for (int i = 0; i < groups.size(); i++) { + if (groups.get(i).getPrimaryKey().equals(aGroup.getPrimaryKey())) { groups.remove(i); groups.add(aGroup); return; @@ -89,8 +89,8 @@ public class InMemoryGroupSet implements GroupSet { */ public boolean add(Group aGroup) { aGroup.setPrimaryKey(pk.getAndIncrement()); - if ( find(aGroup.getName()) != null ) { - return false; + if (find(aGroup.getName()) != null) { + return false; } return groups.add(aGroup); }