mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1051: Ensure getConnectionHistory() returns a List with a well-defined type.
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
package org.glyptodon.guacamole.net.basic.rest.connection;
|
package org.glyptodon.guacamole.net.basic.rest.connection;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
@@ -178,14 +179,14 @@ public class ConnectionRESTService {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{connectionID}/history")
|
@Path("/{connectionID}/history")
|
||||||
@AuthProviderRESTExposure
|
@AuthProviderRESTExposure
|
||||||
public List<? extends ConnectionRecord> getConnectionHistory(@QueryParam("token") String authToken,
|
public List<ConnectionRecord> getConnectionHistory(@QueryParam("token") String authToken,
|
||||||
@PathParam("connectionID") String connectionID) throws GuacamoleException {
|
@PathParam("connectionID") String connectionID) throws GuacamoleException {
|
||||||
|
|
||||||
UserContext userContext = authenticationService.getUserContext(authToken);
|
UserContext userContext = authenticationService.getUserContext(authToken);
|
||||||
|
|
||||||
// Retrieve the requested connection's history
|
// Retrieve the requested connection's history
|
||||||
Connection connection = retrievalService.retrieveConnection(userContext, connectionID);
|
Connection connection = retrievalService.retrieveConnection(userContext, connectionID);
|
||||||
return connection.getHistory();
|
return Collections.<ConnectionRecord>unmodifiableList(connection.getHistory());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user