Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
private AuthenticationApplication() {
// Start of user code constructor_init
// End of user code
var AUTH_VAR = "OAUTH_STORE_FILE";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local variable AUTH_VAR should follow Java naming conventions for constants. Since this is effectively a constant value, it should be declared as a static final field at the class level (like other constants in this class such as APPLICATION_NAME, OAUTH_REALM, etc.) rather than as a local variable with 'var'. Consider declaring it as: private static final String OAUTH_STORE_ENV_VAR = "OAUTH_STORE_FILE";

Copilot uses AI. Check for mistakes.
final Map<String, String> env = System.getenv();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import for java.util.Map. The Map interface is used on line 80 but is not imported. This will cause a compilation error.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after the assignment operator. The line should be: oslcConsumerStoreFilename = "./oslcOAuthStore.xml"; (with a space after the equals sign) to follow standard Java formatting conventions.

Suggested change
oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
oslcConsumerStoreFilename = "./oslcOAuthStore.xml";

Copilot uses AI. Check for mistakes.
if (env.containsKey(AUTH_VAR)) {
oslcConsumerStoreFilename = env.get(AUTH_VAR);
log.debug("ENV variable '{}' found", AUTH_VAR);
Comment on lines +83 to +84
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable value should be validated to ensure it's not empty or blank. Following the pattern used in ServletListener.getConfigurationPropertyFromEnvironment (line 184), consider checking if the value is null or blank using value.trim().isEmpty() before using it. An empty environment variable value could lead to a file not found error with an unclear cause.

Suggested change
oslcConsumerStoreFilename = env.get(AUTH_VAR);
log.debug("ENV variable '{}' found", AUTH_VAR);
final String value = env.get(AUTH_VAR);
if (value != null && !value.trim().isEmpty()) {
oslcConsumerStoreFilename = value;
log.debug("ENV variable '{}' found with non-blank value", AUTH_VAR);
} else {
log.warn("ENV variable '{}' is defined but blank; using default '{}'", AUTH_VAR, oslcConsumerStoreFilename);
}

Copilot uses AI. Check for mistakes.
} else {
log.debug("ENV variable '{}' not defined", AUTH_VAR);
}
oauth1TokenToApplicationConnector = new LRUCache<String, String>(2000);
// Start of user code constructor_finalize
// End of user code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
private AuthenticationApplication() {
// Start of user code constructor_init
// End of user code
var AUTH_VAR = "OAUTH_STORE_FILE";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local variable AUTH_VAR should follow Java naming conventions for constants. Since this is effectively a constant value, it should be declared as a static final field at the class level (like other constants in this class such as APPLICATION_NAME, OAUTH_REALM, etc.) rather than as a local variable with 'var'. Consider declaring it as: private static final String OAUTH_STORE_ENV_VAR = "OAUTH_STORE_FILE";

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

final Map<String, String> env = System.getenv();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import for java.util.Map. The Map interface is used on line 80 but is not imported. This will cause a compilation error.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after the assignment operator. The line should be: oslcConsumerStoreFilename = "./oslcOAuthStore.xml"; (with a space after the equals sign) to follow standard Java formatting conventions.

Suggested change
oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
oslcConsumerStoreFilename = "./oslcOAuthStore.xml";

Copilot uses AI. Check for mistakes.
if (env.containsKey(AUTH_VAR)) {
oslcConsumerStoreFilename = env.get(AUTH_VAR);
Comment on lines +82 to +83
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable value should be validated to ensure it's not empty or blank. Following the pattern used in ServletListener.getConfigurationPropertyFromEnvironment (line 184), consider checking if the value is null or blank using value.trim().isEmpty() before using it. An empty environment variable value could lead to a file not found error with an unclear cause.

Copilot uses AI. Check for mistakes.
log.debug("ENV variable '{}' found", AUTH_VAR);
} else {
log.debug("ENV variable '{}' not defined", AUTH_VAR);
}
oauth1TokenToApplicationConnector = new LRUCache<String, String>(2000);
// Start of user code constructor_finalize
// End of user code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
private AuthenticationApplication() {
// Start of user code constructor_init
// End of user code
var AUTH_VAR = "OAUTH_STORE_FILE";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local variable AUTH_VAR should follow Java naming conventions for constants. Since this is effectively a constant value, it should be declared as a static final field at the class level (like other constants in this class such as APPLICATION_NAME, OAUTH_REALM, etc.) rather than as a local variable with 'var'. Consider declaring it as: private static final String OAUTH_STORE_ENV_VAR = "OAUTH_STORE_FILE";

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

final Map<String, String> env = System.getenv();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import for java.util.Map. The Map interface is used on line 80 but is not imported. This will cause a compilation error.

Copilot uses AI. Check for mistakes.
oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after the assignment operator. The line should be: oslcConsumerStoreFilename = "./oslcOAuthStore.xml"; (with a space after the equals sign) to follow standard Java formatting conventions.

Suggested change
oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
oslcConsumerStoreFilename = "./oslcOAuthStore.xml";

Copilot uses AI. Check for mistakes.
if (env.containsKey(AUTH_VAR)) {
Comment on lines +79 to +82
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map is referenced here (final Map<String, String> env = System.getenv();) but this file does not import java.util.Map, which will fail compilation. Either add the missing import (ideally in the user-code imports section) or avoid Map entirely by calling System.getenv(AUTH_VAR) directly.

Copilot uses AI. Check for mistakes.
oslcConsumerStoreFilename = env.get(AUTH_VAR);
log.debug("ENV variable '{}' found", AUTH_VAR);
Comment on lines +83 to +84
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable value should be validated to ensure it's not empty or blank. Following the pattern used in ServletListener.getConfigurationPropertyFromEnvironment (line 184), consider checking if the value is null or blank using value.trim().isEmpty() before using it. An empty environment variable value could lead to a file not found error with an unclear cause.

Suggested change
oslcConsumerStoreFilename = env.get(AUTH_VAR);
log.debug("ENV variable '{}' found", AUTH_VAR);
final String envValue = env.get(AUTH_VAR);
if (envValue != null && !envValue.trim().isEmpty()) {
oslcConsumerStoreFilename = envValue;
log.debug("ENV variable '{}' found, using value '{}'", AUTH_VAR, oslcConsumerStoreFilename);
} else {
log.warn("ENV variable '{}' is defined but empty or blank; using default store filename '{}'", AUTH_VAR, oslcConsumerStoreFilename);
}

Copilot uses AI. Check for mistakes.
} else {
log.debug("ENV variable '{}' not defined", AUTH_VAR);
}
oauth1TokenToApplicationConnector = new LRUCache<String, String>(2000);
// Start of user code constructor_finalize
// End of user code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public class AuthenticationApplication implements Application {
private AuthenticationApplication() {
// Start of user code constructor_init
// End of user code
oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
var AUTH_VAR = "OAUTH_STORE_FILE";
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local variable AUTH_VAR should follow Java naming conventions for constants. Since this is effectively a constant value, it should be declared as a static final field at the class level (like other constants in this class such as APPLICATION_NAME, OAUTH_REALM, etc.) rather than as a local variable with 'var'. Consider declaring it as: private static final String OAUTH_STORE_ENV_VAR = "OAUTH_STORE_FILE";

Copilot uses AI. Check for mistakes.
final Map<String, String> env = System.getenv();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import for java.util.Map. The Map interface is used on line 80 but is not imported. This will cause a compilation error.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

oslcConsumerStoreFilename = "./oslcOAuthStore.xml";
if (env.containsKey(AUTH_VAR)) {
oslcConsumerStoreFilename = env.get(AUTH_VAR);
Comment on lines +82 to +83
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable value should be validated to ensure it's not empty or blank. Following the pattern used in ServletListener.getConfigurationPropertyFromEnvironment (line 184), consider checking if the value is null or blank using value.trim().isEmpty() before using it. An empty environment variable value could lead to a file not found error with an unclear cause.

Copilot uses AI. Check for mistakes.
log.debug("ENV variable '{}' found", AUTH_VAR);
} else {
log.debug("ENV variable '{}' not defined", AUTH_VAR);
}
oauth1TokenToApplicationConnector = new LRUCache<String, String>(2000);
// Start of user code constructor_finalize
// End of user code
Expand Down