diff --git a/spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java index c945eb7b03..b8545095c7 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,8 +78,7 @@ public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher } /** - * Subclasses can override this if it's possible to filter out - * some candidate classes. + * Subclasses can override this if it's possible to filter out some candidate classes. */ @Override public boolean matches(Method method, Class> targetClass) { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java index 8e42e094de..cd458113b4 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ import org.springframework.util.ReflectionUtils; * Thanks to Ales Justin and Marius Bogoevici for the initial prototype. * *
As of Spring Framework 5.0, this weaver supports WildFly 8+. + * As of Spring Framework 5.1.5, it also supports WildFly 13+. * * @author Costin Leau * @author Juergen Hoeller @@ -41,8 +42,10 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { private static final String DELEGATING_TRANSFORMER_CLASS_NAME = "org.jboss.as.server.deployment.module.DelegatingClassFileTransformer"; - - private static final String WRAPPER_TRANSFORMER_CLASS_NAME = "org.jboss.modules.JLIClassTransformer"; + + private static final String WRAPPER_TRANSFORMER_CLASS_NAME = + "org.jboss.modules.JLIClassTransformer"; + private final ClassLoader classLoader; @@ -78,23 +81,21 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { transformer.setAccessible(true); Object suggestedTransformer = transformer.get(classLoader); - - if (suggestedTransformer.getClass().getName().equals(WRAPPER_TRANSFORMER_CLASS_NAME)) { - Field wrappedTransformer = ReflectionUtils.findField(suggestedTransformer.getClass(), "transformer"); - if (wrappedTransformer == null) { - throw new IllegalArgumentException("Could not find 'transformer' field on JBoss ClassTransformer: " + - suggestedTransformer.getClass().getName()); - } - wrappedTransformer.setAccessible(true); - suggestedTransformer = wrappedTransformer.get(suggestedTransformer); - } - - if (!suggestedTransformer.getClass().getName().equals(DELEGATING_TRANSFORMER_CLASS_NAME)) { + if (suggestedTransformer.getClass().getName().equals(WRAPPER_TRANSFORMER_CLASS_NAME)) { + Field wrappedTransformer = ReflectionUtils.findField(suggestedTransformer.getClass(), "transformer"); + if (wrappedTransformer == null) { + throw new IllegalArgumentException( + "Could not find 'transformer' field on JBoss JLIClassTransformer: " + + suggestedTransformer.getClass().getName()); + } + wrappedTransformer.setAccessible(true); + suggestedTransformer = wrappedTransformer.get(suggestedTransformer); + } + if (!suggestedTransformer.getClass().getName().equals(DELEGATING_TRANSFORMER_CLASS_NAME)) { throw new IllegalStateException( "Transformer not of the expected type DelegatingClassFileTransformer: " + suggestedTransformer.getClass().getName()); } - this.delegatingTransformer = suggestedTransformer; Method addTransformer = ReflectionUtils.findMethod(this.delegatingTransformer.getClass(), diff --git a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java index 7b67ed34cb..d2a3830d1c 100644 --- a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java +++ b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,7 +145,7 @@ public final class CollectionFactory { * Create the most appropriate collection for the given collection type. *
Delegates to {@link #createCollection(Class, Class, int)} with a
* {@code null} element type.
- * @param collectionType the desired type of the target collection; never {@code null}
+ * @param collectionType the desired type of the target collection (never {@code null})
* @param capacity the initial capacity
* @return a new collection instance
* @throws IllegalArgumentException if the supplied {@code collectionType}
@@ -164,7 +164,7 @@ public final class CollectionFactory {
* supplied {@code elementType} is an enum type matching type {@code E}.
* As an alternative, the caller may wish to treat the return value as a
* raw collection or collection of {@link Object}.
- * @param collectionType the desired type of the target collection; never {@code null}
+ * @param collectionType the desired type of the target collection (never {@code null})
* @param elementType the collection's element type, or {@code null} if unknown
* (note: only relevant for {@link EnumSet} creation)
* @param capacity the initial capacity
@@ -280,7 +280,7 @@ public final class CollectionFactory {
* may wish to treat the return value as a raw map or map keyed by
* {@link Object}. Similarly, type safety cannot be enforced if the
* desired {@code mapType} is {@link MultiValueMap}.
- * @param mapType the desired type of the target map; never {@code null}
+ * @param mapType the desired type of the target map (never {@code null})
* @param keyType the map's key type, or {@code null} if unknown
* (note: only relevant for {@link EnumMap} creation)
* @param capacity the initial capacity
diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java b/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java
index eeb918d197..37c6c584e6 100644
--- a/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java
+++ b/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -575,7 +575,8 @@ public class ConcurrentReferenceHashMap