GUACAMOLE-1020: Clean up unnecessary Java imports.

This commit is contained in:
Virtually Nick
2024-09-09 11:14:49 -04:00
parent 7cfe979ed1
commit d97cde0e6f
3 changed files with 4 additions and 20 deletions

View File

@@ -19,7 +19,6 @@
package org.apache.guacamole.auth.restrict.connection; package org.apache.guacamole.auth.restrict.connection;
import com.google.inject.Inject;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -41,18 +40,12 @@ import org.apache.guacamole.protocol.GuacamoleClientInformation;
* ability to control access to the connection. * ability to control access to the connection.
*/ */
public class RestrictedConnection extends DelegatingConnection implements Restrictable { public class RestrictedConnection extends DelegatingConnection implements Restrictable {
/** /**
* The remote address of the client from which the user logged in. * The remote address of the client from which the user logged in.
*/ */
private final String remoteAddress; private final String remoteAddress;
/**
* The restriction verification service.
*/
@Inject
private RestrictionVerificationService verificationService;
/** /**
* The name of the attribute that contains a list of weekdays and times (UTC) * The name of the attribute that contains a list of weekdays and times (UTC)
* that this connection can be accessed. The presence of values within this * that this connection can be accessed. The presence of values within this
@@ -181,9 +174,9 @@ public class RestrictedConnection extends DelegatingConnection implements Restri
@Override @Override
public GuacamoleTunnel connect(GuacamoleClientInformation info, public GuacamoleTunnel connect(GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException { Map<String, String> tokens) throws GuacamoleException {
// Verify the restrictions for this connection. // Verify the restrictions for this connection.
verificationService.verifyConnectionRestrictions(this, remoteAddress); RestrictionVerificationService.verifyConnectionRestrictions(this, remoteAddress);
// Connect // Connect
return super.connect(info, tokens); return super.connect(info, tokens);

View File

@@ -19,7 +19,6 @@
package org.apache.guacamole.auth.restrict.connectiongroup; package org.apache.guacamole.auth.restrict.connectiongroup;
import com.google.inject.Inject;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -47,12 +46,6 @@ public class RestrictedConnectionGroup extends DelegatingConnectionGroup impleme
*/ */
private final String remoteAddress; private final String remoteAddress;
/**
* The verification service.
*/
@Inject
private RestrictionVerificationService verificationService;
/** /**
* The name of the attribute that contains a list of weekdays and times (UTC) * The name of the attribute that contains a list of weekdays and times (UTC)
* that this connection group can be accessed. The presence of values within * that this connection group can be accessed. The presence of values within
@@ -185,7 +178,7 @@ public class RestrictedConnectionGroup extends DelegatingConnectionGroup impleme
Map<String, String> tokens) throws GuacamoleException { Map<String, String> tokens) throws GuacamoleException {
// Verify restrictions for this connection group. // Verify restrictions for this connection group.
verificationService.verifyConnectionRestrictions(this, remoteAddress); RestrictionVerificationService.verifyConnectionRestrictions(this, remoteAddress);
// Connect // Connect
return super.connect(info, tokens); return super.connect(info, tokens);

View File

@@ -20,8 +20,6 @@
package org.apache.guacamole.auth.restrict.form; package org.apache.guacamole.auth.restrict.form;
import org.apache.guacamole.form.Field; import org.apache.guacamole.form.Field;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* A field that parses a string containing time restrictions into its individual * A field that parses a string containing time restrictions into its individual