From 6307ba09212c80dddb68d8b516bab80af4ef6bb0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 6 Feb 2015 16:51:19 -0800 Subject: [PATCH] GUAC-1051: Ensure getConnectionHistory() returns a List with a well-defined type. --- .../net/basic/rest/connection/ConnectionRESTService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/ConnectionRESTService.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/ConnectionRESTService.java index ef98e0bd7..67fb66258 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/ConnectionRESTService.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/rest/connection/ConnectionRESTService.java @@ -23,6 +23,7 @@ package org.glyptodon.guacamole.net.basic.rest.connection; import com.google.inject.Inject; +import java.util.Collections; import java.util.List; import java.util.Map; import javax.ws.rs.Consumes; @@ -178,14 +179,14 @@ public class ConnectionRESTService { @GET @Path("/{connectionID}/history") @AuthProviderRESTExposure - public List getConnectionHistory(@QueryParam("token") String authToken, + public List getConnectionHistory(@QueryParam("token") String authToken, @PathParam("connectionID") String connectionID) throws GuacamoleException { UserContext userContext = authenticationService.getUserContext(authToken); // Retrieve the requested connection's history Connection connection = retrievalService.retrieveConnection(userContext, connectionID); - return connection.getHistory(); + return Collections.unmodifiableList(connection.getHistory()); }