GUACAMOLE-1123: Fixes to comments, method scope, and minor code tweaks.

This commit is contained in:
Virtually Nick
2020-10-15 14:25:57 -04:00
parent 3d761ea794
commit 0430d5510a
11 changed files with 51 additions and 20 deletions

View File

@@ -143,7 +143,8 @@ public class APIConnectionWrapper implements Connection {
@Deprecated
@Override
public List<? extends ConnectionRecord> getHistory() throws GuacamoleException {
return Collections.<ConnectionRecord>emptyList();
throw new GuacamoleUnsupportedException("APIConnectionWrapper does not "
+ "support retrieving connection history.");
}
@Override

View File

@@ -84,7 +84,7 @@ public abstract class ActivityRecordSetResource<InternalRecordType extends Activ
* A new record object containing the same data as the given internal
* record, but intended for use in interchange.
*/
public abstract ExternalRecordType toExternalRecord(InternalRecordType record);
protected abstract ExternalRecordType toExternalRecord(InternalRecordType record);
/**
* Retrieves the list of activity records stored within the underlying

View File

@@ -42,7 +42,7 @@ public class ConnectionHistoryResource extends ActivityRecordSetResource<Connect
}
@Override
public APIConnectionRecord toExternalRecord(ConnectionRecord record) {
protected APIConnectionRecord toExternalRecord(ConnectionRecord record) {
return new APIConnectionRecord(record);
}

View File

@@ -41,7 +41,7 @@ public class UserHistoryResource extends ActivityRecordSetResource<ActivityRecor
}
@Override
public APIActivityRecord toExternalRecord(ActivityRecord record) {
protected APIActivityRecord toExternalRecord(ActivityRecord record) {
return new APIActivityRecord(record);
}

View File

@@ -143,7 +143,7 @@ public class APIUserWrapper implements User {
@Deprecated
@Override
public List<? extends ActivityRecord> getHistory() throws GuacamoleException {
return Collections.<ActivityRecord>emptyList();
throw new GuacamoleUnsupportedException("APIUserWrapper does not provide login history.");
}
@Override