The following issues were found

samples/boot/oauth2-integration/resourceserver/src/main/java/sample/OAuth2ResourceServerApplication.java
1 issues
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
Design

Line: 26

               * @since 0.0.1
 */
@SpringBootApplication
public class OAuth2ResourceServerApplication {

	public static void main(String[] args) {
		SpringApplication.run(OAuth2ResourceServerApplication.class, args);
	}


            

Reported by PMD.

buildSrc/src/main/java/lock/GlobalLockPlugin.java
1 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 12

              public class GlobalLockPlugin implements Plugin<Project> {
	@Override
	public void apply(Project project) {
		project.getTasks().register("writeLocks", GlobalLockTask.class, writeAll -> {
			writeAll.setDescription("Writes the locks for all projects");
		});
	}
}

            

Reported by PMD.

samples/boot/oauth2-integration/client/src/main/java/sample/OAuth2ClientApplication.java
1 issues
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
Design

Line: 26

               * @since 0.0.1
 */
@SpringBootApplication
public class OAuth2ClientApplication {

	public static void main(String[] args) {
		SpringApplication.run(OAuth2ClientApplication.class, args);
	}


            

Reported by PMD.

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/InMemoryOAuth2AuthorizationConsentService.java
1 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 39

               * @see OAuth2AuthorizationConsentService
 */
public final class InMemoryOAuth2AuthorizationConsentService implements OAuth2AuthorizationConsentService {
	private final Map<Integer, OAuth2AuthorizationConsent> authorizationConsents = new ConcurrentHashMap<>();

	/**
	 * Constructs an {@code InMemoryOAuth2AuthorizationConsentService}.
	 */
	public InMemoryOAuth2AuthorizationConsentService() {

            

Reported by PMD.

oauth2-authorization-server/src/test/java/org/springframework/security/config/util/InMemoryXmlWebApplicationContext.java
1 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 38

               * @author Joe Grandja
 */
public class InMemoryXmlWebApplicationContext extends AbstractRefreshableWebApplicationContext {
	private Resource inMemoryXml;

	public InMemoryXmlWebApplicationContext(String xml) {
		this(xml, SPRING_SECURITY_VERSION, null);
	}


            

Reported by PMD.

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationServerJackson2Module.java
1 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 71

              	@Override
	public void setupModule(SetupContext context) {
		SecurityJackson2Modules.enableDefaultTyping(context.getOwner());
		context.setMixInAnnotations(Collections.unmodifiableMap(Collections.emptyMap()).getClass(),
				UnmodifiableMapMixin.class);
		context.setMixInAnnotations(HashSet.class, HashSetMixin.class);
		context.setMixInAnnotations(OAuth2AuthorizationRequest.class, OAuth2AuthorizationRequestMixin.class);
		context.setMixInAnnotations(Duration.class, DurationMixin.class);
		context.setMixInAnnotations(SignatureAlgorithm.class, SignatureAlgorithmMixin.class);

            

Reported by PMD.

samples/boot/oauth2-integration/authorizationserver-custom-consent-page/src/main/java/sample/OAuth2AuthorizationServerCustomConsentPageApplication.java
1 issues
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
Design

Line: 25

               * @author Daniel Garnier-Moiroux
 */
@SpringBootApplication
public class OAuth2AuthorizationServerCustomConsentPageApplication {

	public static void main(String[] args) {
		SpringApplication.run(OAuth2AuthorizationServerCustomConsentPageApplication.class, args);
	}


            

Reported by PMD.

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/core/OAuth2TokenIntrospectionClaimAccessor.java
1 issues
Potential violation of Law of Demeter (static property access)
Design

Line: 52

              	 * @return the indicator whether or not the token is currently active
	 */
	default boolean isActive() {
		return Boolean.TRUE.equals(getClaimAsBoolean(OAuth2TokenIntrospectionClaimNames.ACTIVE));
	}

	/**
	 * Returns the scopes {@code (scope)} associated with the token
	 * @return the scopes associated with the token

            

Reported by PMD.