Commit Graph

1650 Commits

Author SHA1 Message Date
Juergen Hoeller e26ae9853e Up-to-date version and link in ASM/CGLIB/Objenesis package javadoc
Issue: SPR-17267
Issue: SPR-17372
2018-11-08 16:56:48 +01:00
Juergen Hoeller d9c1811d21 Deprecate NON_BRIDGED_METHODS constant as of 5.0.11 as well
Issue: SPR-17464
2018-11-05 22:59:18 +01:00
Juergen Hoeller 2ac4355ec0 ASM ClassReader leniently handles label offset mismatch (again)
Issue: SPR-17467
2018-11-05 17:44:23 +01:00
Juergen Hoeller a3cd7af72d Polishing 2018-11-05 12:27:35 +01:00
Juergen Hoeller 0a7dcf14f9 Deprecate ReflectionUtils.invokeJdbcMethod (for removal in 5.2)
Issue: SPR-17464
2018-11-05 12:26:20 +01:00
Rossen Stoyanchev 133b8b0b5a Polish 2018-11-02 16:19:53 -04:00
Juergen Hoeller dc8f6f7177 Upgrade to CGLIB 3.2.9
This CGLIB upgrade literally does not make any difference to Spring users since its only purpose is a default ASM7 declaration in its AsmApi class (which we patched a month ago). We nevertheless leave our local AsmApi copy in place for the time being, allowing for an individual upgrade of the declared ASM API version in the future.

Issue: SPR-17267
Issue: SPR-17371
2018-11-02 19:55:13 +01:00
Rossen Stoyanchev fa096dc60f Minor refactoring in StringDecoder + polish
1. Avoid re-creating the List with delimited byte arrays on every
request if using the default delimiters which don't vary by charset.

2. Replace flatMap with flatMapIterable for splitOnDelimiter.

3. Avoid going through DataBufferUtils#join, and unnecessarily creating
Flux from the List, since the join method needs a list anyway.
2018-10-26 13:24:53 -04:00
Juergen Hoeller ffa032e78f Polishing 2018-10-24 20:46:26 +02:00
Arjen Poutsma 488a1d4561 Review DataBufferUtils for cancellation memory leaks
Issue: SPR-17408
2018-10-24 16:28:21 +02:00
Arjen Poutsma 51bb96db47 Fix ResourceRegionEncoder and tests
Fix ResourceRegionEncoder so that it checks for resource existance
before writing boundaries. Also defer data buffer allocation until
necessary.

Issue: SPR-17419
2018-10-23 16:41:48 +02:00
Arjen Poutsma eac9e66c46 Fix memory leak when canceling read from AsynchronousFileChannel
This commit fixes a memory leak that occurs when reading from a
AsynchronousFileChannel, and cancelling the subscription.

Issue: SPR-17419
2018-10-23 16:41:48 +02:00
Juergen Hoeller f68b1e0bce Upgrade to Objenesis 3.0.1
Issue: SPR-17372
2018-10-22 18:54:18 +02:00
Juergen Hoeller c3c2383b0d Align serialVersionUID declaration with ASM master
Issue: SPR-17267
2018-10-22 18:53:23 +02:00
Arjen Poutsma 946ec7e22e Fix memory leaks in ProtobufDecoder
Issue: SPR-17418
2018-10-22 16:00:32 +02:00
Arjen Poutsma a64e85fcc6 Javadoc 2018-10-22 16:00:32 +02:00
Arjen Poutsma f738273486 Fix buffering issue in StringDecoder
Issue: SPR-17418
2018-10-22 16:00:32 +02:00
Juergen Hoeller dd2ce20687 SpringFactoriesLoader tolerates whitespace around class names
Issue: SPR-17413
2018-10-22 15:13:58 +02:00
Juergen Hoeller 83a54dba7e Avoid stacktrace if root resource is not resolvable in file system
Issue: SPR-17417
2018-10-22 15:13:49 +02:00
Arjen Poutsma 149d416e8e Review DataBufferUtils for error/cancellation memory leaks
Issue: SPR-17408
2018-10-19 12:16:18 +02:00
Juergen Hoeller 7ff938b3ef LogFormatUtils.formatValue leniently handles toString() exceptions
Issue: SPR-17397
2018-10-18 18:04:32 +02:00
Sebastien Deleuze 2c5a1af236 Leverage Java reflection for Kotlin enums
As discussed in KT-25165, from a Kotlin POV enum constructors
have no parameter, this is an "implementation detail"
required for running on the JVM, so it seems relevant to skip
Kotlin reflection in that case and just delegate to Java
reflection.

Issue: SPR-16931
2018-10-16 16:40:02 +02:00
Juergen Hoeller b7e4a56e5c Mark PathResourceTests as deprecated (along with PathResource)
Issue: SPR-17320
2018-10-12 13:17:28 +02:00
Juergen Hoeller dcf2861db5 Upgrade to Objenesis 3.0
Includes jarjar upgrade since jarjar 1.3 fails to properly relocate Objenesis 3.0 classes into org.springframework.objenesis package.

Issue: SPR-17372
2018-10-12 13:17:01 +02:00
Juergen Hoeller 5474995288 Exclude original AsmApi class from CGLIB repack jar
Issue: SPR-17371
2018-10-12 12:14:00 +02:00
Juergen Hoeller a2ae5f6972 Force CGLIB to always specify ASM7 for its visitors
Issue: SPR-17371
2018-10-12 12:01:50 +02:00
Juergen Hoeller 053820c4ff Polishing 2018-10-09 23:14:49 +02:00
Juergen Hoeller 83909e6e1e Consistent exposure of empty attribute arrays in AnnotationMetadata
Issue: SPR-17347
2018-10-09 23:14:13 +02:00
Juergen Hoeller fdf340306d Defensively use Class.forName instead of ClassLoader.loadClass
Issue: SPR-17333
2018-10-09 23:14:05 +02:00
Juergen Hoeller cf3635b42d Resource.lastModified() propagates 0 value if target resource exists
Includes use of Files.getLastModifiedTime for NIO Paths, preservation of NIO-based resolution on createRelative, deprecation of PathResource, and consistent use of getContentLengthLong over getContentLength.

Issue: SPR-17320
2018-10-09 23:13:11 +02:00
Juergen Hoeller 1e0de072f9 Upgrade to ASM 7.0 beta release
Issue: SPR-17267
2018-10-09 23:13:02 +02:00
Rossen Stoyanchev c01f350abe Move MonoToListenableFutureAdapter to spring-core
This was a package private class in spring-messaging since 5.0, and was
recently made public in 5.1. This commit promotes it to spring-core
where it belongs next to all other ListenableFuture support classes.

Follow-up refactoring for SPR-17336
2018-10-09 16:26:24 -04:00
Sam Hubbard 80e7819d6f Fix construction of NullSafeComparator in nullsLow
Previously, both nullsLow(Comparator<T>) and
nullsHigh(Comparator<T>) returned a
NullSafeComparator which treated nulls as being
high. This commit corrects this typo.
2018-10-05 13:20:28 +02:00
www 9d5aced8c5 Fix formatting
Prefix the opening brace with a single space in some classes.
Replace tab character with space in javadoc of AttributeAccessor.
Also fix some other trivial formatting errors.

Closes gh-1979
2018-10-05 09:20:47 +02:00
Juergen Hoeller ad29f97a05 Polishing 2018-09-29 17:16:25 +02:00
Rossen Stoyanchev a6f9c4c599 LogFormatUtils is declared abstract 2018-09-19 11:54:05 -04:00
Arjen Poutsma 8a4835368d Use doOnDiscard to free internally queued data buffers
Issue: SPR-17246
2018-09-19 13:24:45 +02:00
Juergen Hoeller c634b2fae7 ResolvableType-based resolution uses BeanNamesByType cache if possible
Issue: SPR-17282
2018-09-18 15:30:43 +02:00
Juergen Hoeller 69e8bcdf40 Checkstyle updates from ASM master
Issue: SPR-17267
2018-09-17 19:09:07 +02:00
Juergen Hoeller 8e83f140d4 Polishing 2018-09-15 00:17:17 +02:00
Rossen Stoyanchev db8e9eafb2 Add LogFormatUtils
1. Helper method to eliminate duplication in formatting (de-)serialized
   values for logging introduced with prior commit #e62298.

2. Helper method for TRACE vs DEBUG logging with different details.

Issue: SPR-17254
2018-09-14 18:06:46 -04:00
Juergen Hoeller 41d4cb5cbf Ordered stream access on ObjectProvider with strong order guarantees
Issue: SPR-17272
2018-09-14 23:56:25 +02:00
Rossen Stoyanchev e62298eaad Truncate logged encoded and decoded values if necessary
At DEBUG show up to 100 chars, at TRACE show full formatted value.

Note that the formatValue helper method is duplicated a number of times
in this commit. A utility method will likely be added in spring-core
through an extra commit.

Issue: SPR-17254
2018-09-14 12:20:03 -04:00
Juergen Hoeller 65c8fa400f Consistent ordered list access and lazy streaming for ObjectProvider
Includes fallback match for collection/map dependency if qualified.

Issue: SPR-17272
Issue: SPR-17197
2018-09-13 18:23:19 +02:00
Arjen Poutsma cde677a1f4 Fixed DefaultDataBuffer.toString() 2018-09-13 16:12:13 +02:00
Juergen Hoeller 45936f0ddd ClassReader revision from ASM master
Issue: SPR-17267
2018-09-12 12:26:29 +02:00
Arjen Poutsma f35f7db29b Removed deprecated methods. 2018-09-11 13:36:44 +02:00
Arjen Poutsma 09af706af6 Use concatWith instead of mergeWith 2018-09-11 13:36:44 +02:00
Arjen Poutsma 1a0522b805 DataBufferUtils does not release DataBuffer on error cases
This commit makes sure that in DataBufferUtils.write, any received data
buffers are returned as part of the returned flux, even when an error
occurs or is received.

Issue: SPR-16782
2018-09-11 13:36:44 +02:00
Juergen Hoeller 1da4d504c4 Upgrade to ASM master (7.0 beta) and CGLIB 3.2.8
Issue: SPR-17267
2018-09-11 13:10:45 +02:00
Juergen Hoeller c06b9525ac UriComponentsBuilder copies query params through MultiValueMap.addAll
Issue: SPR-17256
2018-09-10 11:31:37 +02:00
Juergen Hoeller e49896d95f Upgrade to Mockito 2.22, XMLUnit 2.6.2, JavaMail 1.6.2
Also includes Apache Johnzon 1.1.9.
2018-09-10 10:52:24 +02:00
Juergen Hoeller 84ec382201 XMLEventReader.getElementText() properly checks for start element
Issue: SPR-17233
2018-09-07 12:56:15 +02:00
Sebastien Deleuze 8d45e3e7ef Fix Kotlin inner class nested configuration handling
Before this commit, Kotlin inner class nested configuration
handling thrown an IndexOutOfBoundsException due to bogus filtering
of its constructor parameter reference to an instance of the outer
class.

This commit keep constructor parameter of type INSTANCE in order to
throw a more meaningful NoSuchBeanDefinitionException.

Issue: SPR-17222
2018-09-07 11:39:30 +02:00
Arjen Poutsma 259b2ca5f4 Added tests for errors in the source stream
This commit adds decoder/message-reader tests for errors in
the source data buffer publisher. Because the tests extend
AbstractDataBufferAllocatingTestCase, they also check whether
the buffers that precede the error in the stream are properly
released.

Issue: SPR-17025
2018-09-05 11:08:07 +02:00
Arjen Poutsma 196c0adf47 Fixed DataBufferUtils.join leak for error in source
This commit fixes an issue where DataBufferUtils.join() would not
release databuffers that preceded an error signal.

Issue: SPR-17025
2018-09-05 11:07:57 +02:00
Sam Brannen 326895246d Polishing 2018-09-04 13:55:22 +02:00
Stephane Nicoll 2c1dca5b5e Polish capitalisation of units on DataSize and javadoc of DataUnit
Issue: SPR-17240
2018-09-04 13:46:41 +02:00
stsypanov 7dba79c7c1 Use String::isEmpty instead of "".equals(arg) when arg is not null 2018-08-26 22:48:21 +02:00
Sam Brannen 08ba53dd0e Ensure SocketUtils can be instantiated
Issue: SPR-17215
2018-08-26 21:49:21 +02:00
Sam Brannen f6ee2508ef Clean up warning in AnnotatedElementUtils 2018-08-23 18:24:18 +02:00
Juergen Hoeller 6ef0938a92 Defensive URL cleaning (preserving the original URL if possible)
Issue: SPR-17198
2018-08-22 14:12:39 +02:00
Juergen Hoeller a6a6cf7d97 Upgrade to Java Activation Framework 1.2 as API dependency
Includes XMLUnit 2.6.1 and Undertow 2.0.13.

Issue: SPR-16115
2018-08-17 16:01:15 +02:00
Juergen Hoeller 2ac23badee SimpleAliasRegistry.hasAlias properly resolves multiple chained aliases
Issue: SPR-17191
2018-08-17 09:54:14 +02:00
Juergen Hoeller 109a2b49e5 Consistently skip unnecessary search on superclasses and empty elements
Includes caching of declared annotation arrays and combined searching for several annotation types (used in SpringCacheAnnotationParser).

Issue: SPR-16933
2018-08-15 17:30:14 +02:00
Juergen Hoeller ac544924c8 Polishing 2018-08-13 14:36:37 +02:00
Sam Brannen 8126ffbc8c Fix broken links in JavaDoc
Issue: SPR-17174
2018-08-13 12:22:52 +02:00
Marten Deinum 5322fa0fb7 Use an import instead of FQCN
javax.xml.stream.Location is already there as an import there is no need
to use the FQCN in the handleDtd method.
2018-08-13 10:38:23 +02:00
Juergen Hoeller df51ff0386 Revert to Map entry iteration for less expensive static initialization
Issue: SPR-17169
2018-08-12 20:52:55 +02:00
Stephane Nicoll 30b8d47814 Polish 2018-08-12 10:49:29 +02:00
Juergen Hoeller 2b2a5a414b Polishing 2018-08-10 19:23:44 +02:00
Stephane Nicoll f931a3fb59 Improve DataSize to support negative values
Issue: SPR-17154
2018-08-10 18:21:09 +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
Stephane Nicoll 282a4ad2f6 Fix checkstyle violations 2018-08-10 14:43:16 +02:00
Stephane Nicoll 8a1588ae29 Add support for DataSize
This commit provides a data type to represents a size in bytes and other
standard unit.

Issue: SPR-17154
2018-08-10 14:28:46 +02:00
Sam Brannen 8ea913392c Link to Eclipse bug for annotations on bridge methods 2018-08-09 18:49:24 +02:00
Juergen Hoeller 65f29a39ca AbstractAspectJAdvisorFactory uses AnnotationUtils.getValue 2018-08-09 02:26:28 +02:00
Juergen Hoeller 4521a79b2d Find annotations on implemented generic superclass methods as well
Includes Java 8 getDeclaredAnnotation shortcut for lookup on Class.

Issue: SPR-17146
2018-08-08 23:52:47 +02:00
Sergey Chupov a06e63f619 Polishing javadocs: IllegalStateException no longer thrown
The dependency to Apache Commons has been removed in 51252ebbca (diff-95dc9d8756aa91afb2ac28454f1b634c), but the javadoc still mentions it.
2018-08-08 15:51:05 +02:00
Sam Brannen 7b608ab995 Ensure AnnotationUtilsTests pass in Eclipse again 2018-08-08 13:23:51 +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 2b051b8b32 Deprecate support classes for Sun's JDK HTTP server
Issue: SPR-17143
2018-08-07 20:35:53 +02:00
Juergen Hoeller 2d05f2ed47 SerializableTypeWrapper detects Graal through system property as well
Issue: SPR-17136
2018-08-07 11:15:43 +02:00
Juergen Hoeller 6b82a6c38c Polishing 2018-08-07 02:47:00 +02:00
Juergen Hoeller d72d376f03 Avoid unnecessary annotation introspection on framework methods
Issue: SPR-16933
2018-08-07 01:35:32 +02:00
Juergen Hoeller 8a9d042320 Javadoc fix from ASM master (6.2.1)
Issue: SPR-16398
2018-08-06 18:33:41 +02:00
Juergen Hoeller 69c6a40c50 Consistent nullability for array/collection input parameters
Includes pre-sizing of LinkedHashSet for conversion from array.

Issue: SPR-17123
Issue: SPR-17074
2018-08-06 14:11:59 +02:00
Rossen Stoyanchev 5095ec40b5 takeUntilByteCount actually uses takeUntil
Issue: SPR-17188
2018-08-02 21:19:22 +03:00
Rossen Stoyanchev 542ed81d5c Polish 2018-08-02 21:19:22 +03:00
Juergen Hoeller 0001f87d59 Polishing 2018-08-01 12:52:50 +02:00
Juergen Hoeller 589b7048ec Avoid synthesizable annotation creation for @Bean/@Scope processing
Includes consistent (non-)use of AnnotationUtils/AnnotatedElementUtils.

Issue: SPR-16933
2018-08-01 11:43:28 +02:00
Juergen Hoeller 9b671f8408 Polishing 2018-07-31 23:57:19 +02:00
Juergen Hoeller 6cd9060183 Avoid synthesizable check for common annotation types
This revision considers any java/javax and org.springframework.lang annotations as not synthesizable upfront, checking not only in isSynthesizable but also at synthesizeAnnotation(Array) level.

Issue: SPR-16933
2018-07-31 20:54:10 +02:00
Juergen Hoeller 4a147d26fc Initialize pre-filled HashMaps with large enough capacity
Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed).

Issue: SPR-17105
2018-07-30 22:07:31 +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 e82efbc7e3 Declare ASM7_EXPERIMENTAL for full compatibility with JDK 11 bytecode
Issue: SPR-17096
2018-07-26 23:11:54 +02:00
Juergen Hoeller 9ab63b8494 ListBasedXMLEventReader uses defensive modifiable copy of given List 2018-07-25 19:03:13 +02:00
Juergen Hoeller 3881a4aded Polishing 2018-07-25 14:16:02 +02:00
Juergen Hoeller fd8e4abe5d Introduce ResolvableType.toClass() shortcut
Issue: SPR-17086
2018-07-25 14:15:19 +02:00