Skip to content

Commit

Permalink
Returning an immutable collection
Browse files Browse the repository at this point in the history
  • Loading branch information
eribeiro committed May 11, 2012
1 parent 90ea1b2 commit d7ab340
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -4,6 +4,7 @@
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;

Expand Down Expand Up @@ -69,7 +70,7 @@ public List<Event> query(String q) throws IOException, ServerError {

validate(m);

return m.getEventsList();
return Collections.unmodifiableList(m.getEventsList());
}

public abstract void sendMessage(Msg message) throws IOException;
Expand Down

0 comments on commit d7ab340

Please sign in to comment.