Skip to content

Adjust logging, remove unused code, formatting#217

Merged
skjolber merged 6 commits intomasterfrom
adjustLoggingAndImports
Jan 30, 2026
Merged

Adjust logging, remove unused code, formatting#217
skjolber merged 6 commits intomasterfrom
adjustLoggingAndImports

Conversation

@skjolber
Copy link
Copy Markdown
Contributor

Simplify #210

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs code cleanup and standardization as a simplification of PR #210 (Spring Boot 4 + Spring gRPC). The changes focus on improving logging practices, removing unused code, and standardizing code formatting.

Changes:

  • Standardized logger variable naming from logger/log to LOGGER for consistency
  • Added log level checks (isInfoEnabled/isDebugEnabled) before logging statements to improve performance
  • Replaced string concatenation with parameterized logging using SLF4J placeholders
  • Removed unused imports and three unused gRPC exception-related classes (GrpcException, GrpcExceptionLog, GrpcExceptionHandlers)
  • Reordered imports to follow standard Java conventions (jakarta/javax, third-party, java.*)
  • Updated javadoc to remove reference to deprecated FilterSecurityInterceptor class

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
jwt-test/jwt-junit5-spring/src/main/java/org/entur/jwt/spring/test/JwtTestContextCustomizerFactory.java Renamed logger variable to LOGGER, added isInfoEnabled check
jwt-server/spring/jwt-spring-webflux/src/test/java/org/entur/jwt/spring/rest/GreetingController.java Removed unused SecurityContextHolder import
jwt-server/spring/jwt-spring-webflux/src/test/java/org/entur/jwt/spring/rest/Greeting.java Reordered imports (Spring before java.*)
jwt-server/spring/jwt-spring-webflux/src/main/java/org/entur/jwt/spring/config/EnturOauth2ResourceServerCustomizer.java Added isInfoEnabled check and converted to parameterized logging
jwt-server/spring/jwt-spring-webflux/src/main/java/org/entur/jwt/spring/config/EnturAuthorizeHttpRequestsCustomizer.java Made logger final, added log level checks, converted to parameterized logging
jwt-server/spring/jwt-spring-web/src/test/java/org/entur/jwt/spring/rest/token/MyAccessTokenEncoder.java Reordered imports
jwt-server/spring/jwt-spring-web/src/test/java/org/entur/jwt/spring/rest/GreetingController.java Removed unused imports, reordered remaining imports
jwt-server/spring/jwt-spring-web/src/test/java/org/entur/jwt/spring/rest/Greeting.java Reordered imports
jwt-server/spring/jwt-spring-web/src/main/java/org/entur/jwt/spring/config/JwtMappedDiagnosticContextFilter.java Reordered imports (jakarta before org/java)
jwt-server/spring/jwt-spring-web/src/main/java/org/entur/jwt/spring/config/EnturOauth2ResourceServerCustomizer.java Added isDebugEnabled check, converted to parameterized logging, removed blank line
jwt-server/spring/jwt-spring-web/src/main/java/org/entur/jwt/spring/config/EnturAuthorizeHttpRequestsCustomizer.java Made logger final, added log level checks, converted to parameterized logging
jwt-server/spring/jwt-spring-grpc-ecosystem/src/main/java/org/entur/jwt/spring/grpc/ecosystem/GrpcEcosystemAutoConfiguration.java Removed unused GrpcExceptionHandlers from @EnableConfigurationProperties
jwt-server/spring/jwt-spring-grpc-common/src/main/java/org/entur/jwt/spring/grpc/properties/GrpcExceptionLog.java Deleted unused class
jwt-server/spring/jwt-spring-grpc-common/src/main/java/org/entur/jwt/spring/grpc/properties/GrpcExceptionHandlers.java Deleted unused class
jwt-server/spring/jwt-spring-grpc-common/src/main/java/org/entur/jwt/spring/grpc/properties/GrpcException.java Deleted unused class
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/properties/AuthorizationProperties.java Removed linkplain reference to deprecated FilterSecurityInterceptor
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/filter/log/JwtMappedDiagnosticContextMapper.java Reordered imports
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/filter/log/DefaultJwtMappedDiagnosticContextMapper.java Reordered imports, removed extra blank line
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/actuate/ListJwksHealthIndicator.java Removed unused imports, added isInfoEnabled checks
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/actuate/JwkSetSourceEventListener.java Converted to parameterized logging
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/actuate/DefaultJwksHealthIndicator.java Added isInfoEnabled check
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/actuate/AbstractJwksHealthIndicator.java Renamed logger to LOGGER, added log level checks
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/OAuth2TokenValidatorFactory.java Added isInfoEnabled checks
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/NoopJwtAuthorityEnricher.java Removed unused import
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/JwtAutoConfiguration.java Removed unused imports
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/JwtAuthorityEnricher.java Reordered imports
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/JwkSourceMapFactory.java Added log level checks, converted to parameterized logging
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/EnrichedJwtGrantedAuthoritiesConverter.java Removed unused import
jwt-server/spring/jwt-spring-common/src/main/java/org/entur/jwt/spring/DefaultJwtAuthorityEnricher.java Removed unused imports, reordered imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

skjolber and others added 2 commits January 30, 2026 13:05
…t/spring/actuate/AbstractJwksHealthIndicator.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…pring/config/EnturOauth2ResourceServerCustomizer.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented Jan 30, 2026

@skjolber I've opened a new pull request, #218, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link
Copy Markdown

@skjolber skjolber merged commit dddf456 into master Jan 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants