igor-suhorukov
a218bf40cd
Join identical catch branches
...
See gh-2052
2018-12-25 09:46:11 +01:00
igor-suhorukov
93189a6733
String.indexOf() expressions can be replaced with a call to the String.contains() method available in Java 5 and newer.
2018-12-13 12:29:31 +01:00
Rossen Stoyanchev
38ae282c3b
Update log category precision for all tests
...
Replace the full category capped at 36 chars with the class name only
and 1 char per package, e.g. org.apache.commons.Foo -> o.a.c.Foo
2018-12-12 11:40:33 -05:00
Juergen Hoeller
2a5d7690b6
CglibAopProxy skips method proxy for equals/hashCode/toString override
...
Issue: SPR-17500
2018-11-20 22:04:28 +01:00
Stephane Nicoll
7b6f2f8fb3
Polish contribution
...
Closes gh-2019
2018-11-19 08:45:33 +01:00
Hanope
bfb49c7249
Fix typos
...
See gh-2019
2018-11-19 08:41:21 +01:00
HeemangHan
729ce4108d
Correct typos ( #2018 )
2018-11-17 16:31:01 +01:00
Juergen Hoeller
9614817e88
Do not proxy test instances based on "original instance" convention
...
Issue: SPR-17137
2018-08-24 00:49:01 +02:00
Juergen Hoeller
04d2d1da0d
Consistently use double quotes (even if no interpolation needed)
...
Includes upgrade to Hibernate ORM 5.3.5, EclipseLink 2.7.3, Selenium HtmlUnit Driver 2.32.1, Jetty 9.4.12 RC2.
2018-08-16 15:32:44 +02:00
Juergen Hoeller
71d4dbea13
Post-processors ignore AopInfrastructureBean (includes ScopedObject)
...
Issue: SPR-17166
2018-08-11 23:10:57 +02:00
Juergen Hoeller
8bf8092740
Post-processors consistently ignore ScopedObject/AopInfrastructureBean
...
ScheduledAnnotationBeanPostProcessor also ignores TaskScheduler and ScheduledExecutorService, avoiding unnecessary annotation introspection on framework classes.
Issue: SPR-17166
Issue: SPR-16933
2018-08-11 22:20:07 +02:00
Juergen Hoeller
aebb2d52e0
Logging refinements for transaction and cache processing (debug/trace)
...
Issue: SPR-16946
2018-08-10 15:45:46 +02:00
Juergen Hoeller
8f513f8561
AnnotationMatchingPointcut uses AnnotatedElementUtils.hasAnnotation
...
For consistency with AnnotationAsyncExecutionInterceptor (based on AnnotatedElementUtils.findMergedAnnotation) which is the main companion of AnnotationMatchingPointcut's checkInherited mode.
Issue: SPR-16933
2018-08-09 11:58:57 +02:00
Juergen Hoeller
915afa77f4
Polishing
2018-08-09 03:07:05 +02:00
Juergen Hoeller
65f29a39ca
AbstractAspectJAdvisorFactory uses AnnotationUtils.getValue
2018-08-09 02:26:28 +02:00
Juergen Hoeller
7cf98261ce
Polishing
2018-08-08 23:56:17 +02:00
Kazuhiro Sera
be211ceead
Fix typos detected by github.com/client9/misspell
2018-08-08 12:50:46 +02:00
Juergen Hoeller
b325c74216
Pruning of outdated JDK 6/7 references (plus related polishing)
2018-08-07 20:36:47 +02:00
Juergen Hoeller
c037e75f26
Improve debug logging at BeanDefinitionReader and BeanFactory level
...
Issue: SPR-17090
2018-07-27 17:46:05 +02:00
Juergen Hoeller
4e03d3fdcb
MethodBeforeAdviceInterceptor implements BeforeAdvice marker interface
...
Includes related polishing in the advice interceptor implementations.
Issue: SPR-17088
2018-07-25 20:12:14 +02:00
Juergen Hoeller
7f1a8d78b5
BeanFactoryAdvisorRetrievalHelper avoids synchronization for name cache
...
Issue: SPR-16570
2018-07-24 16:16:44 +02:00
Juergen Hoeller
bccff73e2b
AspectJExpressionPointcut leniently ignores non-composable interfaces
...
Issue: SPR-17003
2018-07-22 22:28:48 +02:00
stsypanov
5051850fa9
SPR-17074 Replace iteration over Map::ketSet with Map::entrySet
2018-07-21 13:12:43 +02:00
Juergen Hoeller
9a43d2ec20
Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
...
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Juergen Hoeller
252f52ab07
Tighten (IntroductionAware)MethodMatcher contract
...
Provides a non-null guarantee for MethodMatcher's targetClass argument and strict separation between IntroductionAwareMethodMatcher and regular MethodMatcher, enabling DefaultAdvisorChainFactory to defer its IntroductionAdvisor determination until encountering an actual IntroductionAwareMethodMatcher (even behind union/intersection).
Issue: SPR-17068
2018-07-20 00:17:31 +02:00
Juergen Hoeller
9c08a482d1
Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
...
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity).
Issue: SPR-17037
2018-07-18 22:17:42 +02:00
Juergen Hoeller
5fcfe0fa8e
Polishing
2018-07-18 14:27:16 +02:00
Juergen Hoeller
f6fdffd663
Lazily retrieve delegate beans in AsyncConfigurer and CachingConfigurer
...
Introduces a configure method pattern for Supplier-style configuration and a common SingletonSupplier decorator for method reference suppliers. Also declares jcache.config and jcache.interceptor for non-null conventions.
Issue: SPR-17021
2018-07-14 19:29:32 +02:00
Juergen Hoeller
f123d6c3bc
Upgrade to Netty 4.1.27 and Commons Pool 2.6
2018-07-12 16:53:37 +02:00
stsypanov
6d6aa72e8f
improve performance of projection instantiation
2018-07-09 13:39:23 +02:00
Juergen Hoeller
e5a6711d29
Consistent final declaration for static delegate classes
...
Issue: SPR-16968
2018-07-02 13:55:18 +02:00
Juergen Hoeller
d34e6f7f70
Polishing
2018-06-28 18:02:07 +02:00
Juergen Hoeller
8ad5299f4a
Polishing
2018-06-28 17:12:29 +02:00
Juergen Hoeller
40efcc933c
Polishing
2018-06-28 14:51:33 +02:00
Juergen Hoeller
81cb740e0a
New postProcessProperties variant on InstantiationAwareBeanPostProcessor
...
Allows for skipping the now-deprecated postProcessPropertyValues callback with its expensive PropertyDescriptor retrieval requirement. RequiredAnnotationBeanPostProcessor (which is dependent on postProcessPropertyValues) and the @Required annotation itself are also deprecated now: in favor of constructor injection (or afterPropertiesSet).
Issue: SPR-16918
2018-06-28 14:15:16 +02:00
Phillip Webb
a89e716cc7
Use tabs rather than spaces in tests
...
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
5cedd0d5d4
Consistently use tabs rather than spaces
...
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
634f5c2792
Ensure when equals() is implemented so is hashCode()
...
Update classes that override `equals()` to ensure that they also
implement `hashCode()`.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
9de3689f63
Never use 'this.' when accessing loggers
...
Ensure that `this.` is never used when accessing loggers.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
0b53c1096a
Always use 'this.' when accessing fields
...
Ensure that `this.` is used consistently when accessing class
fields.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
eeebd51f57
Use consistent class design
...
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
866e9d702e
Use consistent block style
...
Update all code to use a consistent block style.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e9d1b39aff
Apply consistent copyright header
...
Add copyright header to `package-info.java` files and fix a few
malformed headers on existing java files.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
c3a17dfd47
Ensure all files end with a newline
...
Update all files to ensure that they always end with a new line.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e0480f75ac
Fix javadoc checkstyle issues
...
Fix checkstyle violations for javadoc.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller
bba5dcaab3
AspectJExpressionPointcut evaluates interface method on proxy as well
...
Issue: SPR-16803
2018-05-16 00:43:51 +02:00
Juergen Hoeller
3917737df2
Polishing
2018-05-07 14:17:15 +02:00
Johnny Lim
fb898e1727
Remove inconsistent spaces
2018-05-05 11:07:35 +02:00
Juergen Hoeller
aa11721ff0
AopUtils.getMostSpecificMethod exposes dynamic proxy class methods
...
Includes efficient canApply check for IntroductionAwareMethodMatcher.
Issue: SPR-16757
2018-04-27 18:23:34 +02:00
Juergen Hoeller
de4ff4b1fc
Polishing
2018-04-14 21:02:53 +02:00
Juergen Hoeller
b95e05db04
AspectJExpressionPointcut consistently resolves superinterface methods
...
Includes efficient check for same ClassLoader in ClassUtils.isVisible, efficient MethodMatchers check for IntroductionAwareMethodMatcher, and supertype method resolution in MethodMapTransactionAttributeSource.
Issue: SPR-16723
2018-04-14 15:10:05 +02:00
Juergen Hoeller
a6885c7235
Polishing
2018-04-11 16:05:35 +02:00
Juergen Hoeller
61c3db0869
MethodHandles.Lookup.defineClass for CGLIB class definition purposes
...
Spring's CGLIB fork is patched with local copies of affected files here, introducing the notion of a "contextClass" (e.g. the proxy superclass) which gets passed through to ReflectUtils.defineClass for delegating to MethodHandles.Lookup.defineClass eventually, against a privateLookupIn(contextClass) lookup context on JDK 9/10/11.
Issue: SPR-15859
2018-04-11 12:47:55 +02:00
Juergen Hoeller
6102715b8d
Consistent treatment of proxy classes and interfaces for introspection
...
Issue: SPR-16675
Issue: SPR-16677
2018-04-03 02:42:41 +02:00
Juergen Hoeller
cc379f1cc7
Polishing
2018-04-01 12:57:19 +02:00
Juergen Hoeller
666037ec5c
Pointcut checking directly against superclass in case of CGLIB subclass
...
Issue: SPR-16675
2018-04-01 12:57:02 +02:00
Juergen Hoeller
6393e5ce0c
Consistent Ordered.LOWEST_PRECEDENCE declarations for default order
2018-03-31 00:20:44 +02:00
igor-suhorukov
93abe0e94b
All branches in a conditional structure should not have exactly the same implementation
2018-03-29 23:33:50 +02:00
igor-suhorukov
e6020ed377
avoid unnecessary autoboxing
2018-03-28 23:48:12 +02:00
Christoph Dreis
d3a0a8e007
Use Collection.removeIf() where possible ( #1747 )
...
Use Collection.removeIf() where possible
Issue: SPR-16622
2018-03-22 11:36:11 +01:00
Juergen Hoeller
50253f670e
Quick access to volatile field (full synchronization only for lazy init)
...
Issue: SPR-16570
2018-03-08 18:13:00 +01:00
Juergen Hoeller
139dc1d373
Polishing (collapsed if checks, consistent downcasts, refined javadoc)
2018-03-08 18:11:57 +01:00
igor-suhorukov
0f7485b01d
Polish: reorder the modifiers to comply with the Java Language Specification.
2018-03-08 17:57:47 +01:00
Juergen Hoeller
a19d4deb24
Polishing
2018-02-28 16:41:59 +01:00
Juergen Hoeller
9962df6527
Polishing
2018-02-28 00:09:15 +01:00
igor-suhorukov
49fd724d8f
Polish: String function use should be optimized for single characters
2018-02-25 20:48:47 +01:00
Juergen Hoeller
578c078082
Polishing
2018-02-22 15:14:20 +01:00
Juergen Hoeller
a5cbf5fe24
Consistent use of Collection.toArray with zero-sized array argument
...
Includes consistent use of ClassUtils.toClassArray (as non-null variant)
Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller
8d3264f680
Prefer List.sort(Comparator) over Collections.sort(List, Comparator)
2018-02-16 10:23:18 +01:00
igor-suhorukov
2be4985b8f
Polish: anonymous inner classes containing only one method should become lambdas,
...
use getOrDefault instead of ternary operator
2018-02-16 09:38:19 +01:00
Juergen Hoeller
3b810f3544
Consistent Class array vs vararg declarations (and related polishing)
2018-02-14 14:44:00 +01:00
Juergen Hoeller
b449928691
Avoid unused arguments for internal delegates
2018-02-13 11:40:28 +01:00
Juergen Hoeller
b089ded5b0
Polishing
2018-02-12 15:55:18 +01:00
igor-suhorukov
9a6fbf59c5
Polish: follow name convention - make immutable fields final
2018-02-10 12:09:19 +01:00
Juergen Hoeller
0a06bce3a6
Relaxed BeanFactory assertion in resolveInterceptorNames
...
Issue: SPR-16347
2018-01-07 23:23:25 +01:00
nkjackzhang
ec6eed6c63
Polish Javadoc
...
Closes gh-1627
2017-12-23 14:19:56 +01:00
Juergen Hoeller
4577a19190
Upgrade to Commons Pool 2.5 (and Jackson Kotlin Module 2.9.3)
2017-12-21 13:52:00 +01:00
Juergen Hoeller
996d747aed
Upgrade to Mockito 2.11
...
Includes fixes for invalid exception declarations in Mockito-based unit tests. Also includes FreeMarker 2.3.27, Commons Pool 2.4.3, JSON-P 1.1.2.
Issue: SPR-16157
2017-11-04 01:06:59 +01:00
Juergen Hoeller
a4b2ae583e
Expose AspectJ 1.8.11 in POMs (and use it for all tests)
...
Issue: SPR-15974
2017-09-27 01:34:02 +02:00
Juergen Hoeller
ac45aa2022
Upgrade to AspectJ 1.9 beta 7 (with 1.8.10 exposed in POMs)
...
Issue: SPR-15974
2017-09-25 13:50:50 +02:00
Juergen Hoeller
9190b76ab9
Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2)
2017-09-23 11:28:19 +02:00
Juergen Hoeller
7ae59d0c2a
Nullability refinements on private and static methods
...
Based on IntelliJ IDEA 2017.3 introspection results.
Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze
1bc93e3d0f
Revisit nullability annotations
...
This commit introduces the following changes.
1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.
2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).
3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).
4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.
5) Updated Javadoc and reference documentation.
Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Brian Clozel
2eeb428e95
Move modules to independent build files
...
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.
Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Juergen Hoeller
47a7475898
Resolve remaining nullability warnings
...
Issue: SPR-15869
2017-08-18 00:15:46 +02:00
Sebastien Deleuze
73cf07e9a4
Fix overridden methods nullability
...
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Sebastien Deleuze
1e07468d20
Prevent warning about final private methods in CglibAopProxy
...
Issue: SPR-15820
2017-07-26 15:57:57 +02:00
Juergen Hoeller
6d6d772f31
Polishing
2017-07-20 00:14:56 +02:00
Juergen Hoeller
118d1470fd
Ignore (Auto)Closeable for interface-based proxy decisions
...
Issue: SPR-15779
2017-07-19 22:40:45 +02:00
Juergen Hoeller
ac1d3b22c9
Polishing
2017-07-19 22:22:27 +02:00
Juergen Hoeller
46eba3dbfa
Nullability fine-tuning around declaration inconsistencies
...
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Sebastien Deleuze
fb4ddb0746
Make getters and setters null-safety consistent
...
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.
It also add a few missing property level @Nullable
annotations.
Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller
c292a89b24
Http(Async)Client not actually nullable, plus MethodInterceptor nullability
...
Issue: SPR-15720
2017-07-19 00:15:37 +02:00
Juergen Hoeller
57f961e36b
No nullability declarations in AOP Alliance sources
...
Issue: SPR-15720
2017-07-14 15:10:20 +02:00
Juergen Hoeller
6d7612e052
AbstractTraceInterceptor provides logExceptionStackTrace flag and writeToLog delegates
...
Issue: SPR-15763
(cherry picked from commit aa0d7a6
)
2017-07-13 13:19:40 +02:00
Juergen Hoeller
19a8efc717
Revised assertions and $[invocationTime] support for exceptionMessage
...
Issue: SPR-15763
2017-07-12 19:13:12 +02:00
Stephane Nicoll
6e5e5913d7
Polish contribution
...
Closes gh-1469
2017-07-12 17:24:17 +02:00
tianjunwei
03b409f891
Use dedicated addAdvisors
...
See gh-1469
2017-07-12 17:22:26 +02:00
Juergen Hoeller
cc74a2891a
@Nullable all the way: null-safety at field level
...
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.
Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Juergen Hoeller
87430f3cd3
ListenableFuture provides CompletableFuture adaptation via completable()
...
Issue: SPR-15696
2017-06-27 00:43:37 +02:00