Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Change to immutable Collection
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Xu <robxu9@gmail.com>
  • Loading branch information
robxu9 committed Jun 28, 2012
1 parent 323aedb commit 2cc7067
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/alta189/simplesave/Database.java
Expand Up @@ -25,6 +25,8 @@
import com.alta189.simplesave.query.QueryResult;
import com.alta189.simplesave.query.SelectQuery;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
Expand Down Expand Up @@ -67,8 +69,8 @@ public TableRegistration getTableRegistration(Class<?> tableClass) {
return tables.get(tableClass);
}

public TableRegistration[] getTableRegistrations() {
return tables.values().toArray(new TableRegistration[tables.values().size()]);
public Collection<TableRegistration> getTableRegistrations() {
return Collections.unmodifiableCollection(tables.values());
}

public void connect() throws ConnectionException {
Expand Down

0 comments on commit 2cc7067

Please sign in to comment.