Adjust logging, remove unused code, formatting#217
Conversation
There was a problem hiding this comment.
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/logtoLOGGERfor 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.
...pring-web/src/main/java/org/entur/jwt/spring/config/EnturOauth2ResourceServerCustomizer.java
Outdated
Show resolved
Hide resolved
...t-junit5-spring/src/main/java/org/entur/jwt/spring/test/JwtTestContextCustomizerFactory.java
Outdated
Show resolved
Hide resolved
...wt-spring-common/src/main/java/org/entur/jwt/spring/actuate/AbstractJwksHealthIndicator.java
Outdated
Show resolved
Hide resolved
…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>
There was a problem hiding this comment.
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.
...t-junit5-spring/src/main/java/org/entur/jwt/spring/test/JwtTestContextCustomizerFactory.java
Outdated
Show resolved
Hide resolved
|



Simplify #210