Compare commits

..

1276 Commits

Author SHA1 Message Date
Spring Buildmaster 21648426e9 Next Development Version 2020-12-09 08:31:54 +00:00
Juergen Hoeller 0b076b28f1 Remove duplicate "property" in PropertyCacheKey.toString()
Closes gh-26237
2020-12-08 15:14:28 +01:00
Juergen Hoeller 0abb17af9d Polishing (aligned with 5.1.x) 2020-12-08 15:14:08 +01:00
Juergen Hoeller d5a80d2777 Polishing (aligned with 5.2.x) 2020-12-02 17:52:40 +01:00
Rossen Stoyanchev 07455c8a27 ContentCachingResponseWrapper skips contentLength for chunked responses
Closes gh-26182
2020-12-01 20:28:00 +00:00
Juergen Hoeller c45c67203c Add Maven Central repository (aligned with 5.1.x) 2020-11-26 16:10:26 +01:00
Juergen Hoeller aeb83fe1a3 Remove misleading default note on ISO.DATE_TIME
Closes gh-26134

(cherry picked from commit 86f9716fef)
2020-11-26 16:09:13 +01:00
Rossen Stoyanchev 0bf002dbe1 Fix 401 errors from artifactory 2020-11-16 13:49:41 +00:00
Rossen Stoyanchev 4ff521d769 UrlPathHelper.removeJsessionid correctly appends remainder
Closes gh-26079
2020-11-16 11:31:24 +00:00
Juergen Hoeller 9107aed878 Refined SqlParameterSource batchUpdate tests (plus related polishing)
See gh-26071
2020-11-12 14:43:11 +01:00
Juergen Hoeller 4ba174311b Polishing 2020-11-09 14:22:06 +01:00
Juergen Hoeller 09c8586ee4 Polishing 2020-11-05 19:05:47 +01:00
Juergen Hoeller 8212151f16 Suppress NotWritablePropertyException in case of ignoreUnknown=true
Closes gh-25986
2020-11-05 19:05:39 +01:00
Juergen Hoeller 65577671bc Polishing 2020-10-26 18:28:49 +01:00
Rossen Stoyanchev d1d37534bf Reinstate removal of jsessionid from lookup path
Closes gh-25864
2020-10-13 16:55:44 +01:00
Juergen Hoeller 45322a72a5 Polishing 2020-10-13 01:22:39 +02:00
Juergen Hoeller 678ea4ece7 Avoid creation of unused logger instance in AbstractMediaTypeExpression
Closes gh-25901
2020-10-13 01:20:34 +02:00
Juergen Hoeller bacf6ca37b Polishing 2020-10-07 15:03:26 +02:00
Juergen Hoeller 95c0f1108f Construct StringWriter instances with appropriate initial size
Closes gh-25789
2020-10-07 15:02:50 +02:00
Spring Buildmaster 06c76d8075 Next Development Version 2020-09-15 10:51:10 +00:00
Juergen Hoeller 7056dd599f Polishing 2020-09-14 23:46:49 +02:00
Rossen Stoyanchev bb5b12af3b UriComponentsBuilder Javadoc update
Closes gh-25604
2020-09-08 12:30:00 +01:00
Rossen Stoyanchev 2f75212eb6 Avoid unnecessary parsing of path params
Closes gh-25690
2020-09-08 12:24:44 +01:00
Rossen Stoyanchev bdcb189e50 Shared read-only instances of UrlPathHelper
UrlPathHelper is often created and used without customizations or with
the same customizations. This commit introduces re-usable, instances.
Effectively a backport of commit 23233c.

Closes gh-25690
2020-09-08 12:24:27 +01:00
Juergen Hoeller caa22b7291 Properties loading with ignoreResourceNotFound covers SocketException as well
Closes gh-25717
2020-09-07 18:50:16 +02:00
Juergen Hoeller 586677341c Revise documentation notes on getParameterType performance issues
See gh-25679
2020-09-05 14:28:35 +02:00
Juergen Hoeller 2d632eff0f Fix SpEL generated code for default method invocation
Closes gh-25706
2020-09-05 14:28:19 +02:00
Juergen Hoeller eec4a6d521 Retry DatabaseMetaData retrieval if access to transactional connection fails
Closes gh-25681
2020-09-03 23:30:04 +02:00
Juergen Hoeller a577f633ff Polishing 2020-09-01 11:00:18 +02:00
Juergen Hoeller b6677ccbff Polishing 2020-08-27 16:16:24 +02:00
Juergen Hoeller 6c977e9c2a Avoid potential integer overflow in seconds->millis transformation
Closes gh-25613
2020-08-27 15:59:52 +02:00
Juergen Hoeller 265bc6cd65 Populate dependencies metadata for resolved target behind lazy dependency proxy
Closes gh-25562
2020-08-07 22:07:12 +02:00
Juergen Hoeller 3d2de9a378 Efficient concurrency in MethodOverrides through CopyOnWriteArraySet
Closes gh-23448
2020-08-07 15:39:36 +02:00
Juergen Hoeller cc1f0e1186 Polishing 2020-08-07 15:37:04 +02:00
Juergen Hoeller 17a47b30e9 Refine use of substring operations
Closes gh-25445
2020-08-07 15:21:54 +02:00
Juergen Hoeller 5e5723c8ba Reset charset field in MockHttpServletResponse
Closes gh-25501
2020-08-07 15:20:52 +02:00
Sam Brannen 9fcdaa7308 Regression tests for @RestControllerAdvice support in MockMvc
This commit introduces regression tests for @RestControllerAdvice
support in standalone MockMvc configurations.

See gh-25520
2020-08-05 18:56:58 +02:00
Sam Brannen ef6494584c Fix bug in StaticListableBeanFactory.isSingleton()
Prior to this commit, StaticListableBeanFactory.isSingleton() returned
false for singleton beans unless they were created by a FactoryBean.

StaticListableBeanFactory.isSingleton() now properly returns true for
all beans not created by a FactoryBean.

Closes gh-25522
2020-08-04 16:50:14 +02:00
Spring Buildmaster 88f792a5d7 Next Development Version 2020-07-21 06:59:04 +00:00
Juergen Hoeller d8654607a4 Defer creating logger in StandardWebSocketHandlerAdapter to instantiation time
Closes gh-25427

(cherry picked from commit 64f4703445)
2020-07-20 17:21:11 +02:00
Juergen Hoeller 93e42b8e4f Copy queryParams MultiValueMap through deepCopy (for independent List entries)
Closes gh-25423
2020-07-20 08:01:51 +02:00
Rossen Stoyanchev 70773468c2 Align default values with 5.0.x
Closes gh-25414
2020-07-20 06:32:38 +03:00
Juergen Hoeller 6d524e1da5 Unwrap SqlParameterValue for disposable value detection in cleanupParameters
Closes gh-22972
2020-07-19 20:49:05 +02:00
Juergen Hoeller f38ab3863f Polishing 2020-07-17 19:06:14 +02:00
Juergen Hoeller 94d459ebcf Clarify enforceInitMethod/enforceDestroyMethod default values
Closes gh-25402

(cherry picked from commit 5846d9c2ea)
2020-07-17 19:02:46 +02:00
Juergen Hoeller b5887bfd83 Polishing 2020-06-23 11:56:52 +02:00
Juergen Hoeller 299e2c8c46 Avoid misleading log message for commit-triggering exception
Closes gh-25253
2020-06-17 16:25:42 +02:00
Juergen Hoeller 3aae8b2dc8 Polishing 2020-06-12 00:33:46 +02:00
Juergen Hoeller 85e3f23863 Consistent abstract declaration of "Abstract" base classes
Closes gh-25240
2020-06-12 00:33:02 +02:00
Juergen Hoeller 323977be2c Document exception handling limitations in TaskDecorator implementations
Closes gh-25231
2020-06-10 23:08:53 +02:00
Juergen Hoeller 2c1cca69e7 Polishing 2020-06-10 12:19:09 +02:00
Juergen Hoeller 00c9875122 Consistent MultiValueMap behavior for empty list values
Closes gh-25227
2020-06-10 12:17:44 +02:00
Juergen Hoeller 2010956076 WebSphereUowTransactionManager sets timeout for actual transaction only
Closes gh-25225
2020-06-10 12:16:59 +02:00
Juergen Hoeller 9c73023e5a Avoid ClassCastException on IllegalArgumentException from sync invocation
Closes gh-25223
2020-06-10 12:16:19 +02:00
Juergen Hoeller 700fedef3e Consistent not-null assertions for configured interceptors
Closes gh-25221
2020-06-10 12:16:01 +02:00
Juergen Hoeller 31cda09c93 Avoid full synchronization in refreshable getBeanFactory() implementation
Closes gh-25219
2020-06-10 12:15:07 +02:00
Spring Buildmaster 16d4e0e6c4 Next Development Version 2020-04-28 09:27:37 +00:00
Juergen Hoeller 6893207998 Polishing 2020-04-27 14:55:25 +02:00
Rossen Stoyanchev 85c5a0c1a9 Escape quoted filename in HttpHeaders
This is primarily to align with similar changes applied to
ContentDisposition in 5.x.

Closes gh-24580
2020-04-21 08:28:42 +01:00
Sam Brannen f60bb825b0 Retain brackets for IPV6 address in MockHttpServletRequest
According to the Javadoc for ServletRequest's getServerName() method,
when the `Host` header is set, the server name is "the value of the
part before ':' in the Host header value ...". For a value representing
an IPV6 address such as `[::ffff:abcd:abcd]`, the enclosing square
brackets should therefore not be stripped from the enclosed IPV6
address.

However, the changes made in conjunction with gh-16704 introduced a
regression in Spring Framework 4.1 for the getServerName() method in
MockHttpServletRequest by stripping the enclosing brackets from the
IPV6 address in the `Host` header. Similarly, the changes made in
conjunction with gh-20686 introduced a regression in Spring Framework
4.3.13 and 5.0.2 in the getRequestURL() method in
MockHttpServletRequest by delegating to the getServerName() method
which strips the enclosing brackets.

This commit fixes the implementation of getServerName() so that the
enclosing brackets are no longer stripped from an IPV6 address in the
`Host` header. The implementation of getRequestURL() is therefore also
fixed.

In addition, in order to avoid a NullPointerException, the
implementations of getServerName() and getServerPort() now assert that
an IPV6 address present in the `Host` header correctly contains an
opening and closing bracket and throw an IllegalStateException if that
is not the case.

Closes gh-24916
2020-04-17 17:24:52 +02:00
Juergen Hoeller f929109415 Close-suppressing Connection proxy exposes target isClosed() state
Closes gh-24853
2020-04-03 22:00:47 +02:00
Juergen Hoeller eb81337e69 Clear by-type cache in case of no pre-existing bean definition as well
Closes gh-24852
2020-04-03 22:00:42 +02:00
Juergen Hoeller 01ec5d83e6 Polishing 2020-03-24 01:31:58 +01:00
Juergen Hoeller 6e579b0474 Polishing 2020-03-13 23:54:13 +01:00
Juergen Hoeller 322d7bed8a Polishing 2020-02-12 18:20:02 +01:00
Juergen Hoeller ef1be1723e Consistent ROLE_INFRASTRUCTURE declarations for configuration classes
Closes gh-24509
2020-02-12 18:17:20 +01:00
Sam Brannen 2dcce8ca31 Upgrade to Gradle 4.10.2
Due to an upgrade of the Artifactory publication plugin on the CI
server, we need to upgrade the build for 4.3.x to Gradle 4.x.

Closes gh-24392
2020-01-17 18:24:57 +01:00
Sam Brannen 032100ce55 Include Objenesis NOTICE file contents in binary distributions
Closes gh-24326
2020-01-16 10:57:56 +01:00
Spring Buildmaster 444338160e Next Development Version 2020-01-14 11:07:05 +00:00
Sam Brannen 58d11989ce Document Objenesis license in license.txt
See gh-24340
2020-01-13 16:15:36 +01:00
Sam Brannen 2e132bd62b Disable annotation processing warning in spring-test
This commit disables warnings for annotation processing in spring-test
in order to get the build passing again after it mysteriously started
failing in 2020.
2020-01-13 14:31:25 +01:00
Sam Brannen 3cbd4a94ce Update ASM and CBLIB versions in license.txt 2020-01-13 13:27:57 +01:00
Juergen Hoeller 71cd792e2a Polishing 2020-01-10 14:47:52 +01:00
Juergen Hoeller 33dc3b0e50 Thread-safe compiled expression evaluation in SpelExpression
Closes gh-24265
2020-01-10 14:47:29 +01:00
Juergen Hoeller a10f9f280f Polishing 2019-12-09 15:35:52 +01:00
Juergen Hoeller dcedd29deb Polishing 2019-12-01 11:11:42 +01:00
Juergen Hoeller 9404a8a108 Polishing 2019-11-20 18:06:01 +01:00
Juergen Hoeller ee2fe1deb1 Avoid substring allocation in StringUtils.replace
Closes gh-24023
2019-11-19 15:12:01 +01:00
Juergen Hoeller f190168095 Revise getElementTypeDescriptor javadoc (no IllegalStateException)
Closes gh-23996
2019-11-14 18:48:28 +01:00
Juergen Hoeller e1f950764e Minor internal refinements (backported from master) 2019-11-13 18:11:44 +01:00
Juergen Hoeller 9cad93093a Support for new MySQL 8 error code 3572
Closes gh-23972
2019-11-13 17:49:00 +01:00
endtak b3fb79ea99 isIncludeHeaders() declared as protected. 2019-11-13 17:48:26 +01:00
YuDongYing f69440151d Fix schemaZip Gradle task on MS Windows
Prior to this commit, the schemaZip Gradle task failed to find Spring
schema files on MS Windows due to path separators hard coded to forward
slashes that are not compatible with the Windows operating system.

Consequently, a full build failed on Windows since the distZip task was
not able to locate the zipped schema archive that the schemaZip task
failed to create.

This commit fixes this by updating the schemaZip task to search for
schema files using backslashes as well as forward slashes.

Closes gh-23933
2019-11-13 15:17:17 +01:00
Juergen Hoeller d0506bc110 Polishing 2019-10-30 17:25:07 +01:00
Juergen Hoeller 5c741a7cc7 Verify read-only propagation in DataSourceTransactionManagerTests
See gh-23747
2019-10-30 17:19:39 +01:00
Juergen Hoeller 8abe714687 Upgrade to Tomcat 8.5.45, Netty 4.1.39, Animal Sniffer 1.18 2019-09-25 21:45:21 +02:00
Juergen Hoeller d1a34b9a7e Polishing 2019-09-25 21:45:05 +02:00
Juergen Hoeller ace2e623d1 Fix DefaultListableBeanFactory#copyConfigurationFrom
Closes gh-23569
2019-09-25 21:43:04 +02:00
Juergen Hoeller 5d5867603a Consistent equality check for parent name and indexed arguments
Closes gh-23593
2019-09-25 21:42:47 +02:00
Spring Buildmaster 18ae3790e1 Next Development Version 2019-08-02 08:07:47 +00:00
Juergen Hoeller 13b9f58c4a Consistent suppression of get/clearWarnings without target connection
See gh-23346
2019-08-02 01:34:39 +02:00
Juergen Hoeller f99b2f11da Document all remaining public methods on BeanDefinitionParserDelegate
Closes gh-23349
2019-08-01 15:47:35 +02:00
Juergen Hoeller 379e919b64 TransactionAwareDataSourceProxy locally handles get/clearWarnings call
Closes gh-23346
2019-08-01 15:47:19 +02:00
Juergen Hoeller 87152d7ccf MethodParameter.equals properly checks overridden containing class
Closes gh-23352
2019-08-01 14:44:01 +02:00
Juergen Hoeller 5b9129724b Polishing 2019-07-31 23:34:41 +02:00
Juergen Hoeller c14d2d37d4 Upgrade to Netty 4.1.38 2019-07-31 23:17:28 +02:00
Juergen Hoeller b7304651de Deprecate logger field in HandlerMethodArgumentResolverComposite 2019-07-31 23:17:16 +02:00
Juergen Hoeller a8623dbbd7 MethodParameter.equals checks nesting level and containing class
Closes gh-23352
2019-07-31 23:16:20 +02:00
Juergen Hoeller 4f0104231a Upgrade to Tomcat 8.5.43 and Netty 4.1.37 2019-07-20 21:58:23 +02:00
Juergen Hoeller 34f8ec3c77 Polishing 2019-07-20 21:58:09 +02:00
Sam Brannen 6e20f8d0a5 Improve documentation for @Autowired constructors
Prior to this commit, there was some ambiguity surrounding semantics
for @Autowired constructors and `required = true`, especially for
multiple @Autowired constructors.

This commit improves the documentation in the Javadoc for @Autowired as
well as in the reference manual.

Closes gh-23263
2019-07-18 11:31:13 +02:00
Sam Brannen e5a28f81c3 Support empty target request path in FlashMap
Prior to this commit, if the user configured an empty path for the
targetRequestPath property of a FlashMap, the FlashMapManager threw a
StringIndexOutOfBoundsException when saving the output FlashMap for the
next request.

This commit fixes this by skipping the decoding and normalization of an
empty target request path.

Fixes gh-23240
2019-07-07 19:02:50 +02:00
Sam Brannen 92abe2927e Document that Ordered is not supported for @ControllerAdvice beans
Closes gh-23172
2019-06-21 12:51:06 +03:00
chrunchyjesus 3f6ab6467a Fix ScriptUtils for MS Windows line ending
Prior to this commit, ScriptUtils did not properly split SQL
scripts that contained line endings for MS Windows.

Closes gh-23019
2019-05-24 11:45:58 +02:00
Juergen Hoeller e0883f5eaa Polishing 2019-05-21 00:05:28 +02:00
Juergen Hoeller 5900639135 Fix stale-if-error xsd documentation
Closes gh-22983
2019-05-21 00:05:19 +02:00
Juergen Hoeller 1345ec902e SpEL documentation refinements (backported from 5.1.x) 2019-05-13 19:20:58 +02:00
Juergen Hoeller 6eeb065036 Upgrade to Groovy 2.4.17 2019-05-13 19:01:25 +02:00
Juergen Hoeller c096dc45e7 Minor documentation refinements (backported from 5.1.x) 2019-05-13 19:01:12 +02:00
Juergen Hoeller 4b999cfe95 Clarify AbstractBeanDefinition.getBeanClass() return semantics
Closes gh-22960
2019-05-13 19:01:03 +02:00
Juergen Hoeller ed3df72d67 Avoid expensive assertions in web resource resolution
Closes gh-22955
2019-05-13 19:00:55 +02:00
Spring Buildmaster 9ad9025619 Next Development Version 2019-05-09 08:59:39 +00:00
Juergen Hoeller f8eb0fb1b2 Polishing 2019-05-07 14:02:31 +02:00
Juergen Hoeller d777c73f78 Consistent handling of empty List entries in LinkedMultiValueMap
Closes gh-22912
2019-05-07 14:02:25 +02:00
Sam Brannen 0ef611707d Introduce HTTPS mappings in spring.schemas files
Backport of gh-22903
Closes gh-22904
2019-05-07 13:40:10 +02:00
Juergen Hoeller 770f6786c2 Polishing 2019-05-07 02:03:11 +02:00
Juergen Hoeller e0e720cdac Upgrade to Netty 4.1.36 2019-05-03 16:11:02 +02:00
Juergen Hoeller 1f4ca61b80 Polishing 2019-05-03 16:10:51 +02:00
Juergen Hoeller 2e7489d124 Allow null operands in compiled SpEL numeric operator expressions
Closes gh-22358
2019-05-03 16:10:44 +02:00
Rossen Stoyanchev 8d0b72bee5 Fail proactively if lookupPath not in requestUri
Closes gh-22851
2019-05-01 14:27:12 -04:00
Juergen Hoeller 4c49833079 Polishing 2019-04-26 21:17:17 +02:00
Juergen Hoeller 4bfa2ccec5 Upgrade to Tomcat 8.5.40 and Netty 4.1.35 2019-04-26 21:17:09 +02:00
Juergen Hoeller bbcdb65f14 Polishing 2019-04-08 20:17:22 +02:00
Juergen Hoeller fce58c6a6e Efficient MultiValueMap.entrySet() iteration in decodeMatrixVariables 2019-04-08 18:51:38 +02:00
Juergen Hoeller 54dd8336b2 Polishing 2019-04-08 18:18:17 +02:00
Juergen Hoeller 5d1787bd29 Avoid expensive assertions in HttpRange
Closes gh-22742
2019-04-08 18:17:50 +02:00
Sebastien Deleuze f328bfc157 Fix a regression in Jackson builder module registration
This commit brings back the support for registration of multiple
Jackson modules with a null typeId.

Closes gh-22764
2019-04-08 15:26:16 +02:00
Juergen Hoeller f6b2c0f780 Polishing 2019-04-03 17:54:33 +02:00
Spring Buildmaster c5802e98e9 Next Development Version 2019-03-31 07:23:26 +00:00
Juergen Hoeller c56e7f7270 Typo fixes 2019-03-29 23:59:50 +01:00
Sam Brannen 0e354754cf URL Cleanup - polishing
See gh-22678
2019-03-27 16:49:48 +01:00
Sam Brannen 6dcc414805 URL Cleanup - upgrade to more modern Xalan namespace
See gh-22678
2019-03-27 16:49:10 +01:00
Sam Brannen 1de492aef2 URL Cleanup - fix undesirable code change
Namespace handlers are mapped based on the canonical names for XML
namespaces which in Spring do not use "https" as the scheme.

See gh-22678
2019-03-27 16:10:02 +01:00
Sam Brannen e435ea7a17 URL Cleanup - Fix broken tests
See gh-22678
2019-03-27 16:03:23 +01:00
Spring Operator 0e93443a2b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://aopalliance.sourceforge.net (200) with 1 occurrences could not be migrated:
   ([https](https://aopalliance.sourceforge.net) result AnnotatedConnectException).
* [ ] http://classdoc.sourceforge.net (200) with 1 occurrences could not be migrated:
   ([https](https://classdoc.sourceforge.net) result AnnotatedConnectException).
* [ ] http://code.jquery.com:80/jquery.js (200) with 1 occurrences could not be migrated:
   ([https](https://code.jquery.com:80/jquery.js) result SSLException).
* [ ] http://dbunit.sourceforge.net/ (200) with 1 occurrences could not be migrated:
   ([https](https://dbunit.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html (200) with 1 occurrences could not be migrated:
   ([https](https://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html) result SSLProtocolException).
* [ ] http://domain3.com (200) with 3 occurrences could not be migrated:
   ([https](https://domain3.com) result ConnectTimeoutException).
* [ ] http://gee.cs.oswego.edu/dl/concurrency-interest/ (200) with 1 occurrences could not be migrated:
   ([https](https://gee.cs.oswego.edu/dl/concurrency-interest/) result AnnotatedConnectException).
* [ ] http://grinder.sourceforge.net/ (200) with 1 occurrences could not be migrated:
   ([https](https://grinder.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://groovy-lang.org/templating.html (200) with 3 occurrences could not be migrated:
   ([https](https://groovy-lang.org/templating.html) result SSLProtocolException).
* [ ] http://hsqldb.org (200) with 1 occurrences could not be migrated:
   ([https](https://hsqldb.org) result SSLHandshakeException).
* [ ] http://htmlunit.sourceforge.net/ (200) with 3 occurrences could not be migrated:
   ([https](https://htmlunit.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://htmlunit.sourceforge.net/gettingStarted.html (200) with 1 occurrences could not be migrated:
   ([https](https://htmlunit.sourceforge.net/gettingStarted.html) result AnnotatedConnectException).
* [ ] http://htmlunit.sourceforge.net/javascript.html (200) with 1 occurrences could not be migrated:
   ([https](https://htmlunit.sourceforge.net/javascript.html) result AnnotatedConnectException).
* [ ] http://jasperreports.sourceforge.net (200) with 3 occurrences could not be migrated:
   ([https](https://jasperreports.sourceforge.net) result AnnotatedConnectException).
* [ ] http://jasperreports.sourceforge.net/dtds/jasperreport.dtd (200) with 6 occurrences could not be migrated:
   ([https](https://jasperreports.sourceforge.net/dtds/jasperreport.dtd) result AnnotatedConnectException).
* [ ] http://javadiff.cvs.sourceforge.net/ (200) with 3 occurrences could not be migrated:
   ([https](https://javadiff.cvs.sourceforge.net/) result SSLHandshakeException).
* [ ] http://jibx.sourceforge.net/ (200) with 2 occurrences could not be migrated:
   ([https](https://jibx.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://joda-time.sourceforge.net (200) with 1 occurrences could not be migrated:
   ([https](https://joda-time.sourceforge.net) result AnnotatedConnectException).
* [ ] http://jotm.objectweb.org/ (200) with 1 occurrences could not be migrated:
   ([https](https://jotm.objectweb.org/) result NotSslRecordException).
* [ ] http://livereload.com/ (200) with 1 occurrences could not be migrated:
   ([https](https://livereload.com/) result ConnectTimeoutException).
* [ ] http://mx4j.sourceforge.net (200) with 1 occurrences could not be migrated:
   ([https](https://mx4j.sourceforge.net) result AnnotatedConnectException).
* [ ] http://mx4j.sourceforge.net/ (200) with 1 occurrences could not be migrated:
   ([https](https://mx4j.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://mydomain3.com (200) with 9 occurrences could not be migrated:
   ([https](https://mydomain3.com) result ConnectTimeoutException).
* [ ] http://objenesis.org (200) with 1 occurrences could not be migrated:
   ([https](https://objenesis.org) result SSLHandshakeException).
* [ ] http://objenesis.org/tutorial.html (200) with 1 occurrences could not be migrated:
   ([https](https://objenesis.org/tutorial.html) result SSLHandshakeException).
* [ ] http://other.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://other.com/) result SSLHandshakeException).
* [ ] http://url.somewhereelse.com (200) with 2 occurrences could not be migrated:
   ([https](https://url.somewhereelse.com) result SSLHandshakeException).
* [ ] http://www.andykhan.com/jexcelapi/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.andykhan.com/jexcelapi/) result ConnectTimeoutException).
* [ ] http://www.beanshell.org (200) with 1 occurrences could not be migrated:
   ([https](https://www.beanshell.org) result SSLHandshakeException).
* [ ] http://www.beanshell.org/ (200) with 1 occurrences could not be migrated:
   ([https](https://www.beanshell.org/) result SSLHandshakeException).
* [ ] http://www.datanucleus.org/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.datanucleus.org/) result AnnotatedConnectException).
* [ ] http://www.doclet.com (200) with 1 occurrences could not be migrated:
   ([https](https://www.doclet.com) result AnnotatedConnectException).
* [ ] http://www.gebish.org/ (200) with 1 occurrences could not be migrated:
   ([https](https://www.gebish.org/) result SSLHandshakeException).
* [ ] http://www.gebish.org/manual/current/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.gebish.org/manual/current/) result SSLHandshakeException).
* [ ] http://www.groovy-lang.org/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.groovy-lang.org/) result SSLProtocolException).
* [ ] http://www.groovy-lang.org/operators.html (200) with 2 occurrences could not be migrated:
   ([https](https://www.groovy-lang.org/operators.html) result SSLProtocolException).
* [ ] http://www.hsqldb.org (200) with 1 occurrences could not be migrated:
   ([https](https://www.hsqldb.org) result SSLHandshakeException).
* [ ] http://www.jasperassistant.com (200) with 6 occurrences could not be migrated:
   ([https](https://www.jasperassistant.com) result SSLHandshakeException).
* [ ] http://www.jensgulden.de (200) with 1 occurrences could not be migrated:
   ([https](https://www.jensgulden.de) result AnnotatedConnectException).
* [ ] http://www.mockobjects.com (200) with 2 occurrences could not be migrated:
   ([https](https://www.mockobjects.com) result ClosedChannelException).
* [ ] http://www.mockobjects.com/ (200) with 1 occurrences could not be migrated:
   ([https](https://www.mockobjects.com/) result ClosedChannelException).
* [ ] http://xmlunit.sourceforge.net/ (200) with 3 occurrences could not be migrated:
   ([https](https://xmlunit.sourceforge.net/) result AnnotatedConnectException).
* [ ] http://192.168.0.1/mvc-showcase (301) with 1 occurrences could not be migrated:
   ([https](https://192.168.0.1/mvc-showcase) result ConnectTimeoutException).
* [ ] http://www.easymock.org (301) with 4 occurrences could not be migrated:
   ([https](https://www.easymock.org) result SSLHandshakeException).
* [ ] http://www.easymock.org/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.easymock.org/) result SSLHandshakeException).
* [ ] http://www.jmock.org/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.jmock.org/) result SSLHandshakeException).
* [ ] http://foo.com (301) with 4 occurrences could not be migrated:
   ([https](https://foo.com) result SSLHandshakeException).
* [ ] http://foo.com/a (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com/a) result SSLHandshakeException).
* [ ] http://foo.com/a?foo=bar&foo=baz (301) with 4 occurrences could not be migrated:
   ([https](https://foo.com/a?foo=bar&foo=baz) result SSLHandshakeException).
* [ ] http://foo.com/bar (301) with 4 occurrences could not be migrated:
   ([https](https://foo.com/bar) result SSLHandshakeException).
* [ ] http://foo.com/rest/books/6.json (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com/rest/books/6.json) result SSLHandshakeException).
* [ ] http://foo.com/rest/books/6/pages/1.json (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com/rest/books/6/pages/1.json) result SSLHandshakeException).
* [ ] http://foo.com/wrong (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com/wrong) result SSLHandshakeException).
* [ ] http://mydomain4.com (301) with 3 occurrences could not be migrated:
   ([https](https://mydomain4.com) result SSLHandshakeException).
* [ ] http://groovy-lang.org/docs/groovy-2.3.6/html/documentation/markup-template-engine.html (302) with 1 occurrences could not be migrated:
   ([https](https://groovy-lang.org/docs/groovy-2.3.6/html/documentation/markup-template-engine.html) result SSLProtocolException).
* [ ] http://www.caucho.com/hessian (302) with 6 occurrences could not be migrated:
   ([https](https://www.caucho.com/hessian) result SSLHandshakeException).
* [ ] http://mydomain2.com (302) with 22 occurrences could not be migrated:
   ([https](https://mydomain2.com) result ConnectTimeoutException).
* [ ] http://www.jdiff.org (302) with 1 occurrences could not be migrated:
   ([https](https://www.jdiff.org) result ConnectTimeoutException).
* [ ] http://example.com:80/test/this/here (404) with 3 occurrences could not be migrated:
   ([https](https://example.com:80/test/this/here) result NotSslRecordException).
* [ ] http://www.foo.com/schema/component/component.xsd (404) with 1 occurrences could not be migrated:
   ([https](https://www.foo.com/schema/component/component.xsd) result SSLHandshakeException).
* [ ] http://www.foo.com/schema/jcache (404) with 2 occurrences could not be migrated:
   ([https](https://www.foo.com/schema/jcache) result SSLHandshakeException).
* [ ] http://www.gebish.org/manual/current/testing.html (404) with 1 occurrences could not be migrated:
   ([https](https://www.gebish.org/manual/current/testing.html) result SSLHandshakeException).
* [ ] http://www.jpox.org (404) with 1 occurrences could not be migrated:
   ([https](https://www.jpox.org) result ClosedChannelException).
* [ ] http://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/ (404) with 1 occurrences could not be migrated:
   ([https](https://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/) result SSLHandshakeException).
* [ ] http://www.mycompany.com/schema/myns/myns.xsd (404) with 1 occurrences could not be migrated:
   ([https](https://www.mycompany.com/schema/myns/myns.xsd) result ConnectTimeoutException).
* [ ] http://xunitpatterns.com/Test%20Spy.html (404) with 1 occurrences could not be migrated:
   ([https](https://xunitpatterns.com/Test%20Spy.html) result AnnotatedConnectException).

These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://bugs.sun.com/view_bug.do?bug_id=6342411 (302) with 1 occurrences migrated to:
  https://bugs.java.com/view_bug.do?bug_id=6342411 ([https](https://bugs.sun.com/view_bug.do?bug_id=6342411) result SSLHandshakeException).
* [ ] http://bugs.sun.com/view_bug.do?bug_id=7023180 (302) with 2 occurrences migrated to:
  https://bugs.java.com/view_bug.do?bug_id=7023180 ([https](https://bugs.sun.com/view_bug.do?bug_id=7023180) result SSLHandshakeException).
* [ ] http://www.freemarker.org (301) with 4 occurrences migrated to:
  https://freemarker.apache.org/ ([https](https://www.freemarker.org) result ConnectTimeoutException).
* [ ] http://sockjs.org (303) with 2 occurrences migrated to:
  https://github.com/sockjs/sockjs-client ([https](https://sockjs.org) result AnnotatedConnectException).
* [ ] http://network.pivotal.io/open-source (301) with 1 occurrences migrated to:
  https://network.pivotal.io/open-source ([https](https://network.pivotal.io/open-source) result ReadTimeoutException).
* [ ] http://www.caucho.com/ (302) with 1 occurrences migrated to:
  https://www.caucho.com/ ([https](https://www.caucho.com/) result SSLHandshakeException).
* [ ] http://www.caucho.com (302) with 1 occurrences migrated to:
  https://www.caucho.com/ ([https](https://www.caucho.com) result SSLHandshakeException).
* [ ] http://www.caucho.com/burlap (302) with 5 occurrences migrated to:
  https://www.caucho.com/burlap ([https](https://www.caucho.com/burlap) result SSLHandshakeException).
* [ ] http://jruby.org (301) with 2 occurrences migrated to:
  https://www.jruby.org ([https](https://jruby.org) result SSLHandshakeException).
* [ ] http://jruby.org/ (301) with 1 occurrences migrated to:
  https://www.jruby.org ([https](https://jruby.org/) result SSLHandshakeException).
* [ ] http://slf4j.org/faq.html (302) with 1 occurrences migrated to:
  https://www.slf4j.org/faq.html ([https](https://slf4j.org/faq.html) result SSLHandshakeException).
* [ ] http://192.168.28.42/1.jsp (ConnectTimeoutException) with 3 occurrences migrated to:
  https://192.168.28.42/1.jsp ([https](https://192.168.28.42/1.jsp) result ConnectTimeoutException).
* [ ] http://example.com:8080/ (ConnectTimeoutException) with 1 occurrences migrated to:
  https://example.com:8080/ ([https](https://example.com:8080/) result ConnectTimeoutException).
* [ ] http://example.com:8080/bar (ConnectTimeoutException) with 5 occurrences migrated to:
  https://example.com:8080/bar ([https](https://example.com:8080/bar) result ConnectTimeoutException).
* [ ] http://example.org:9090 (ConnectTimeoutException) with 2 occurrences migrated to:
  https://example.org:9090 ([https](https://example.org:9090) result ConnectTimeoutException).
* [ ] http://example.org:9090/base (ConnectTimeoutException) with 12 occurrences migrated to:
  https://example.org:9090/base ([https](https://example.org:9090/base) result ConnectTimeoutException).
* [ ] http://example.org:9090/base/people (ConnectTimeoutException) with 2 occurrences migrated to:
  https://example.org:9090/base/people ([https](https://example.org:9090/base/people) result ConnectTimeoutException).
* [ ] http://example.org:9090/base/something/1/foo (ConnectTimeoutException) with 2 occurrences migrated to:
  https://example.org:9090/base/something/1/foo ([https](https://example.org:9090/base/something/1/foo) result ConnectTimeoutException).
* [ ] http://example.org:9090/base/something/else (ConnectTimeoutException) with 2 occurrences migrated to:
  https://example.org:9090/base/something/else ([https](https://example.org:9090/base/something/else) result ConnectTimeoutException).
* [ ] http://example.org:9999/base (ConnectTimeoutException) with 1 occurrences migrated to:
  https://example.org:9999/base ([https](https://example.org:9999/base) result ConnectTimeoutException).
* [ ] http://example.org:9999/base/people/123/addresses/DE (ConnectTimeoutException) with 1 occurrences migrated to:
  https://example.org:9999/base/people/123/addresses/DE ([https](https://example.org:9999/base/people/123/addresses/DE) result ConnectTimeoutException).
* [ ] http://mydomain1.com:123 (ConnectTimeoutException) with 1 occurrences migrated to:
  https://mydomain1.com:123 ([https](https://mydomain1.com:123) result ConnectTimeoutException).
* [ ] http://site1.com (ConnectTimeoutException) with 2 occurrences migrated to:
  https://site1.com ([https](https://site1.com) result ConnectTimeoutException).
* [ ] http://wwws.sun.com/software/xml/developers/diffmk/ (ConnectTimeoutException) with 1 occurrences migrated to:
  https://wwws.sun.com/software/xml/developers/diffmk/ ([https](https://wwws.sun.com/software/xml/developers/diffmk/) result ConnectTimeoutException).
* [ ] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784 (ReadTimeoutException) with 1 occurrences migrated to:
  https://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784 ([https](https://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784) result SSLHandshakeException).
* [ ] http://www.w3.org/TR/html4/loose.dtd (ReadTimeoutException) with 4 occurrences migrated to:
  https://www.w3.org/TR/html4/loose.dtd ([https](https://www.w3.org/TR/html4/loose.dtd) result ReadTimeoutException).
* [ ] http://DOMAIN2.com (UnknownHostException) with 1 occurrences migrated to:
  https://DOMAIN2.com ([https](https://DOMAIN2.com) result UnknownHostException).
* [ ] http://a.example.org/mvc-showcase (UnknownHostException) with 1 occurrences migrated to:
  https://a.example.org/mvc-showcase ([https](https://a.example.org/mvc-showcase) result UnknownHostException).
* [ ] http://arjen:foobar@java.sun.com:80 (UnknownHostException) with 1 occurrences migrated to:
  https://arjen:foobar@java.sun.com:80 ([https](https://arjen:foobar@java.sun.com:80) result UnknownHostException).
* [ ] http://dev.bar.com (UnknownHostException) with 3 occurrences migrated to:
  https://dev.bar.com ([https](https://dev.bar.com) result UnknownHostException).
* [ ] http://domain1.com (UnknownHostException) with 20 occurrences migrated to:
  https://domain1.com ([https](https://domain1.com) result UnknownHostException).
* [ ] http://domain2.com (UnknownHostException) with 61 occurrences migrated to:
  https://domain2.com ([https](https://domain2.com) result UnknownHostException).
* [ ] http://example.com",HttpMethod.GET (UnknownHostException) with 6 occurrences migrated to:
  https://example.com",HttpMethod.GET ([https](https://example.com",HttpMethod.GET) result UnknownHostException).
* [ ] http://foo.bar.com (UnknownHostException) with 4 occurrences migrated to:
  https://foo.bar.com ([https](https://foo.bar.com) result UnknownHostException).
* [ ] http://joe.openid.example.org/ (UnknownHostException) with 2 occurrences migrated to:
  https://joe.openid.example.org/ ([https](https://joe.openid.example.org/) result UnknownHostException).
* [ ] http://myserver/logo.png (UnknownHostException) with 1 occurrences migrated to:
  https://myserver/logo.png ([https](https://myserver/logo.png) result UnknownHostException).
* [ ] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16014 (UnknownHostException) with 1 occurrences migrated to:
  https://nagoya.apache.org/bugzilla/show_bug.cgi?id=16014 ([https](https://nagoya.apache.org/bugzilla/show_bug.cgi?id=16014) result UnknownHostException).
* [ ] http://samples.springframework.org/order (UnknownHostException) with 2 occurrences migrated to:
  https://samples.springframework.org/order ([https](https://samples.springframework.org/order) result UnknownHostException).
* [ ] http://url.somewhere.com (UnknownHostException) with 21 occurrences migrated to:
  https://url.somewhere.com ([https](https://url.somewhere.com) result UnknownHostException).
* [ ] http://url.somewhere.com/path (UnknownHostException) with 1 occurrences migrated to:
  https://url.somewhere.com/path ([https](https://url.somewhere.com/path) result UnknownHostException).
* [ ] http://url.somewhere.com/path?id=1 (UnknownHostException) with 1 occurrences migrated to:
  https://url.somewhere.com/path?id=1 ([https](https://url.somewhere.com/path?id=1) result UnknownHostException).
* [ ] http://url.somewhere.com/test.htm (UnknownHostException) with 2 occurrences migrated to:
  https://url.somewhere.com/test.htm ([https](https://url.somewhere.com/test.htm) result UnknownHostException).
* [ ] http://url.somewhere.com?foo=bar (UnknownHostException) with 1 occurrences migrated to:
  https://url.somewhere.com?foo=bar ([https](https://url.somewhere.com?foo=bar) result UnknownHostException).
* [ ] http://url.somewhere.com?foo=bar&a=b&c=d (UnknownHostException) with 1 occurrences migrated to:
  https://url.somewhere.com?foo=bar&a=b&c=d ([https](https://url.somewhere.com?foo=bar&a=b&c=d) result UnknownHostException).
* [ ] http://wiki.fasterxml.com/JacksonHome (UnknownHostException) with 3 occurrences migrated to:
  https://wiki.fasterxml.com/JacksonHome ([https](https://wiki.fasterxml.com/JacksonHome) result UnknownHostException).
* [ ] http://wiki.fasterxml.com/JacksonJsonViews (UnknownHostException) with 2 occurrences migrated to:
  https://wiki.fasterxml.com/JacksonJsonViews ([https](https://wiki.fasterxml.com/JacksonJsonViews) result UnknownHostException).
* [ ] http://x.y.z (UnknownHostException) with 2 occurrences migrated to:
  https://x.y.z ([https](https://x.y.z) result UnknownHostException).
* [ ] http://bitworking.org/projects/URI-Templates/ (302) with 1 occurrences migrated to:
  https://bitworking.org/projects/URI-Templates/ ([https](https://bitworking.org/projects/URI-Templates/) result 404).
* [ ] http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html ([https](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html) result 404).
* [ ] http://example.com/-foo (404) with 2 occurrences migrated to:
  https://example.com/-foo ([https](https://example.com/-foo) result 404).
* [ ] http://example.com/1 (404) with 1 occurrences migrated to:
  https://example.com/1 ([https](https://example.com/1) result 404).
* [ ] http://example.com/2 (404) with 1 occurrences migrated to:
  https://example.com/2 ([https](https://example.com/2) result 404).
* [ ] http://example.com/abc/ (404) with 1 occurrences migrated to:
  https://example.com/abc/ ([https](https://example.com/abc/) result 404).
* [ ] http://example.com/abc/x/y (404) with 1 occurrences migrated to:
  https://example.com/abc/x/y ([https](https://example.com/abc/x/y) result 404).
* [ ] http://example.com/abc/x/y/z (404) with 3 occurrences migrated to:
  https://example.com/abc/x/y/z ([https](https://example.com/abc/x/y/z) result 404).
* [ ] http://example.com/app/login/authenticate (404) with 1 occurrences migrated to:
  https://example.com/app/login/authenticate ([https](https://example.com/app/login/authenticate) result 404).
* [ ] http://example.com/bar (404) with 5 occurrences migrated to:
  https://example.com/bar ([https](https://example.com/bar) result 404).
* [ ] http://example.com/context.xml (404) with 4 occurrences migrated to:
  https://example.com/context.xml ([https](https://example.com/context.xml) result 404).
* [ ] http://example.com/example (404) with 6 occurrences migrated to:
  https://example.com/example ([https](https://example.com/example) result 404).
* [ ] http://example.com/example/?name (404) with 1 occurrences migrated to:
  https://example.com/example/?name ([https](https://example.com/example/?name) result 404).
* [ ] http://example.com/example/?name= (404) with 1 occurrences migrated to:
  https://example.com/example/?name= ([https](https://example.com/example/?name=) result 404).
* [ ] http://example.com/example/?name=%20 (404) with 1 occurrences migrated to:
  https://example.com/example/?name=%20 ([https](https://example.com/example/?name=%20) result 404).
* [ ] http://example.com/example/?name=row%5B0%5D (404) with 1 occurrences migrated to:
  https://example.com/example/?name=row%5B0%5D ([https](https://example.com/example/?name=row%5B0%5D) result 404).
* [ ] http://example.com/example/?name=value (404) with 1 occurrences migrated to:
  https://example.com/example/?name=value ([https](https://example.com/example/?name=value) result 404).
* [ ] http://example.com/example/?name=value&param2=value+2 (404) with 1 occurrences migrated to:
  https://example.com/example/?name=value&param2=value+2 ([https](https://example.com/example/?name=value&param2=value+2) result 404).
* [ ] http://example.com/example/?row%5B0%5D=value (404) with 1 occurrences migrated to:
  https://example.com/example/?row%5B0%5D=value ([https](https://example.com/example/?row%5B0%5D=value) result 404).
* [ ] http://example.com/foo (404) with 4 occurrences migrated to:
  https://example.com/foo ([https](https://example.com/foo) result 404).
* [ ] http://example.com/foo/../bar (404) with 1 occurrences migrated to:
  https://example.com/foo/../bar ([https](https://example.com/foo/../bar) result 404).
* [ ] http://example.com/foo/foo2?bar (404) with 1 occurrences migrated to:
  https://example.com/foo/foo2?bar ([https](https://example.com/foo/foo2?bar) result 404).
* [ ] http://example.com/foo?bar (404) with 4 occurrences migrated to:
  https://example.com/foo?bar ([https](https://example.com/foo?bar) result 404).
* [ ] http://example.com/foo?bar= (404) with 2 occurrences migrated to:
  https://example.com/foo?bar= ([https](https://example.com/foo?bar=) result 404).
* [ ] http://example.com/foo?bar=baz (404) with 2 occurrences migrated to:
  https://example.com/foo?bar=baz ([https](https://example.com/foo?bar=baz) result 404).
* [ ] http://example.com/foo?baz=42 (404) with 1 occurrences migrated to:
  https://example.com/foo?baz=42 ([https](https://example.com/foo?baz=42) result 404).
* [ ] http://example.com/foo?foo=bar&baz=qux (404) with 2 occurrences migrated to:
  https://example.com/foo?foo=bar&baz=qux ([https](https://example.com/foo?foo=bar&baz=qux) result 404).
* [ ] http://example.com/hotel (404) with 4 occurrences migrated to:
  https://example.com/hotel ([https](https://example.com/hotel) result 404).
* [ ] http://example.com/hotel%20list (404) with 4 occurrences migrated to:
  https://example.com/hotel%20list ([https](https://example.com/hotel%20list) result 404).
* [ ] http://example.com/hotel%20list/Z (404) with 1 occurrences migrated to:
  https://example.com/hotel%20list/Z ([https](https://example.com/hotel%20list/Z) result 404).
* [ ] http://example.com/hotel%20list/Z%C3%BCrich (404) with 3 occurrences migrated to:
  https://example.com/hotel%20list/Z%C3%BCrich ([https](https://example.com/hotel%20list/Z%C3%BCrich) result 404).
* [ ] http://example.com/hotel%2520list (404) with 2 occurrences migrated to:
  https://example.com/hotel%2520list ([https](https://example.com/hotel%2520list) result 404).
* [ ] http://example.com/hotels (404) with 3 occurrences migrated to:
  https://example.com/hotels ([https](https://example.com/hotels) result 404).
* [ ] http://example.com/hotels/ (404) with 16 occurrences migrated to:
  https://example.com/hotels/ ([https](https://example.com/hotels/) result 404).
* [ ] http://example.com/hotels/1/bookings (404) with 1 occurrences migrated to:
  https://example.com/hotels/1/bookings ([https](https://example.com/hotels/1/bookings) result 404).
* [ ] http://example.com/hotels/1/bookings/42 (404) with 1 occurrences migrated to:
  https://example.com/hotels/1/bookings/42 ([https](https://example.com/hotels/1/bookings/42) result 404).
* [ ] http://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150 (404) with 2 occurrences migrated to:
  https://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150 ([https](https://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150) result 404).
* [ ] http://example.com/hotels/1/pic/pics/logo.png (404) with 1 occurrences migrated to:
  https://example.com/hotels/1/pic/pics/logo.png ([https](https://example.com/hotels/1/pic/pics/logo.png) result 404).
* [ ] http://example.com/hotels/42/bookings/21 (404) with 1 occurrences migrated to:
  https://example.com/hotels/42/bookings/21 ([https](https://example.com/hotels/42/bookings/21) result 404).
* [ ] http://example.com/hotels/42/bookings/42 (404) with 1 occurrences migrated to:
  https://example.com/hotels/42/bookings/42 ([https](https://example.com/hotels/42/bookings/42) result 404).
* [ ] http://example.com/hotels/Rest%20%26%20Relax/bookings/42 (404) with 2 occurrences migrated to:
  https://example.com/hotels/Rest%20%26%20Relax/bookings/42 ([https](https://example.com/hotels/Rest%20%26%20Relax/bookings/42) result 404).
* [ ] http://example.com/info (404) with 2 occurrences migrated to:
  https://example.com/info ([https](https://example.com/info) result 404).
* [ ] http://example.com/jquery-1.11.0.min.js (404) with 2 occurrences migrated to:
  https://example.com/jquery-1.11.0.min.js ([https](https://example.com/jquery-1.11.0.min.js) result 404).
* [ ] http://example.com/myFileUpload (404) with 1 occurrences migrated to:
  https://example.com/myFileUpload ([https](https://example.com/myFileUpload) result 404).
* [ ] http://example.com/myForm (404) with 1 occurrences migrated to:
  https://example.com/myForm ([https](https://example.com/myForm) result 404).
* [ ] http://example.com/path (404) with 2 occurrences migrated to:
  https://example.com/path ([https](https://example.com/path) result 404).
* [ ] http://example.com/path?query (404) with 2 occurrences migrated to:
  https://example.com/path?query ([https](https://example.com/path?query) result 404).
* [ ] http://example.com/path?query=foo (404) with 1 occurrences migrated to:
  https://example.com/path?query=foo ([https](https://example.com/path?query=foo) result 404).
* [ ] http://example.com/resource (404) with 4 occurrences migrated to:
  https://example.com/resource ([https](https://example.com/resource) result 404).
* [ ] http://example.com/resource?access_token=123 (404) with 1 occurrences migrated to:
  https://example.com/resource?access_token=123 ([https](https://example.com/resource?access_token=123) result 404).
* [ ] http://example.com/spaces (404) with 1 occurrences migrated to:
  https://example.com/spaces ([https](https://example.com/spaces) result 404).
* [ ] http://example.com/spaces%20and%20%E2%82%AC (404) with 3 occurrences migrated to:
  https://example.com/spaces%20and%20%E2%82%AC ([https](https://example.com/spaces%20and%20%E2%82%AC) result 404).
* [ ] http://example.com/spring/ (404) with 1 occurrences migrated to:
  https://example.com/spring/ ([https](https://example.com/spring/) result 404).
* [ ] http://example.com/test/this/here (404) with 1 occurrences migrated to:
  https://example.com/test/this/here ([https](https://example.com/test/this/here) result 404).
* [ ] http://example.com/user (404) with 1 occurrences migrated to:
  https://example.com/user ([https](https://example.com/user) result 404).
* [ ] http://example.org/fonts/css (404) with 3 occurrences migrated to:
  https://example.org/fonts/css ([https](https://example.org/fonts/css) result 404).
* [ ] http://example.org/foo/page.html (404) with 1 occurrences migrated to:
  https://example.org/foo/page.html ([https](https://example.org/foo/page.html) result 404).
* [ ] http://example.org/image.png (404) with 2 occurrences migrated to:
  https://example.org/image.png ([https](https://example.org/image.png) result 404).
* [ ] http://example.org/music/people (404) with 4 occurrences migrated to:
  https://example.org/music/people ([https](https://example.org/music/people) result 404).
* [ ] http://example.org/page.cache.html (404) with 1 occurrences migrated to:
  https://example.org/page.cache.html ([https](https://example.org/page.cache.html) result 404).
* [ ] http://example.org/path (404) with 3 occurrences migrated to:
  https://example.org/path ([https](https://example.org/path) result 404).
* [ ] http://help.github.com/send-pull-requests (404) with 2 occurrences migrated to:
  https://help.github.com/send-pull-requests ([https](https://help.github.com/send-pull-requests) result 404).
* [ ] http://host.com/outsideOfficeHours.html (404) with 1 occurrences migrated to:
  https://host.com/outsideOfficeHours.html ([https](https://host.com/outsideOfficeHours.html) result 404).
* [ ] http://springframework.org/oxm-test (404) with 2 occurrences migrated to:
  https://springframework.org/oxm-test ([https](https://springframework.org/oxm-test) result 404).
* [ ] http://www.example.com/favicon.ico (404) with 2 occurrences migrated to:
  https://www.example.com/favicon.ico ([https](https://www.example.com/favicon.ico) result 404).
* [ ] http://www.example.com/foo/bar (404) with 1 occurrences migrated to:
  https://www.example.com/foo/bar ([https](https://www.example.com/foo/bar) result 404).
* [ ] http://www.example.com/hotels (404) with 2 occurrences migrated to:
  https://www.example.com/hotels ([https](https://www.example.com/hotels) result 404).
* [ ] http://www.example.com/user/ (404) with 4 occurrences migrated to:
  https://www.example.com/user/ ([https](https://www.example.com/user/) result 404).
* [ ] http://www.example.com/user/john%3Bdoe/dashboard (404) with 3 occurrences migrated to:
  https://www.example.com/user/john%3Bdoe/dashboard ([https](https://www.example.com/user/john%3Bdoe/dashboard) result 404).
* [ ] http://www.example.com/user/john;doe/dashboard (404) with 2 occurrences migrated to:
  https://www.example.com/user/john;doe/dashboard ([https](https://www.example.com/user/john;doe/dashboard) result 404).
* [ ] http://www.example.com/users/ (404) with 1 occurrences migrated to:
  https://www.example.com/users/ ([https](https://www.example.com/users/) result 404).
* [ ] http://www.example.com/users/fred (404) with 3 occurrences migrated to:
  https://www.example.com/users/fred ([https](https://www.example.com/users/fred) result 404).
* [ ] http://www.example.com/users/fred.pdf (404) with 1 occurrences migrated to:
  https://www.example.com/users/fred.pdf ([https](https://www.example.com/users/fred.pdf) result 404).
* [ ] http://www.example.com/users/fred.xml (404) with 1 occurrences migrated to:
  https://www.example.com/users/fred.xml ([https](https://www.example.com/users/fred.xml) result 404).
* [ ] http://www.ibm.com/developerworks/websphere/library/techarticles/0404_tang/0404_tang.html (301) with 1 occurrences migrated to:
  https://www.ibm.com/developerworks/websphere/library/techarticles/0404_tang/0404_tang.html ([https](https://www.ibm.com/developerworks/websphere/library/techarticles/0404_tang/0404_tang.html) result 404).
* [ ] http://mydomain1.com:80/path (301) with 2 occurrences migrated to:
  https://www.mydomain1.com/path ([https](https://mydomain1.com:80/path) result 404).
* [ ] http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/tutorial-lesson-03 (404) with 1 occurrences migrated to:
  https://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/tutorial-lesson-03 ([https](https://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/tutorial-lesson-03) result 404).
* [ ] http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0243.html (404) with 1 occurrences migrated to:
  https://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0243.html ([https](https://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0243.html) result 404).
* [ ] http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html (301) with 1 occurrences migrated to:
  https://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html ([https](https://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html) result 404).
* [ ] http://xml.apache.org/xslt (404) with 3 occurrences migrated to:
  https://xml.apache.org/xslt ([https](https://xml.apache.org/xslt) result 404).
* [ ] http://myhost.com/resource/path/myTemplate.txt (500) with 1 occurrences migrated to:
  https://myhost.com/resource/path/myTemplate.txt ([https](https://myhost.com/resource/path/myTemplate.txt) result 500).
* [ ] http://myhost.com/some/arbitrary/path (500) with 1 occurrences migrated to:
  https://myhost.com/some/arbitrary/path ([https](https://myhost.com/some/arbitrary/path) result 500).

These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://activemq.apache.org/delete-inactive-destinations.html with 1 occurrences migrated to:
  https://activemq.apache.org/delete-inactive-destinations.html ([https](https://activemq.apache.org/delete-inactive-destinations.html) result 200).
* [ ] http://activemq.apache.org/stomp.html with 1 occurrences migrated to:
  https://activemq.apache.org/stomp.html ([https](https://activemq.apache.org/stomp.html) result 200).
* [ ] http://ant.apache.org with 1 occurrences migrated to:
  https://ant.apache.org ([https](https://ant.apache.org) result 200).
* [ ] http://asciidoctor.org/ with 1 occurrences migrated to:
  https://asciidoctor.org/ ([https](https://asciidoctor.org/) result 200).
* [ ] http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/ with 1 occurrences migrated to:
  https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/ ([https](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) result 200).
* [ ] http://asciidoctor.org/docs/asciidoc-writers-guide/ with 1 occurrences migrated to:
  https://asciidoctor.org/docs/asciidoc-writers-guide/ ([https](https://asciidoctor.org/docs/asciidoc-writers-guide/) result 200).
* [ ] http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/ with 1 occurrences migrated to:
  https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/ ([https](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/) result 200).
* [ ] http://asciidoctor.org/docs/user-manual/ with 1 occurrences migrated to:
  https://asciidoctor.org/docs/user-manual/ ([https](https://asciidoctor.org/docs/user-manual/) result 200).
* [ ] http://beanvalidation.org/ with 1 occurrences migrated to:
  https://beanvalidation.org/ ([https](https://beanvalidation.org/) result 200).
* [ ] http://caniuse.com/ with 1 occurrences migrated to:
  https://caniuse.com/ ([https](https://caniuse.com/) result 200).
* [ ] http://caniuse.com/websockets with 1 occurrences migrated to:
  https://caniuse.com/websockets ([https](https://caniuse.com/websockets) result 200).
* [ ] http://castor-data-binding.github.io/castor/reference-guides/1.3.3/html-single/index.html with 2 occurrences migrated to:
  https://castor-data-binding.github.io/castor/reference-guides/1.3.3/html-single/index.html ([https](https://castor-data-binding.github.io/castor/reference-guides/1.3.3/html-single/index.html) result 200).
* [ ] http://code.jquery.com/jquery-1.11.0.min.js with 2 occurrences migrated to:
  https://code.jquery.com/jquery-1.11.0.min.js ([https](https://code.jquery.com/jquery-1.11.0.min.js) result 200).
* [ ] http://code.jquery.com/jquery.js with 1 occurrences migrated to:
  https://code.jquery.com/jquery.js ([https](https://code.jquery.com/jquery.js) result 200).
* [ ] http://commons.apache.org/proper/commons-lang/ with 2 occurrences migrated to:
  https://commons.apache.org/proper/commons-lang/ ([https](https://commons.apache.org/proper/commons-lang/) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/java/beans/package-summary.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/java/beans/package-summary.html ([https](https://docs.oracle.com/javase/6/docs/api/java/beans/package-summary.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html ([https](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html with 2 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html ([https](https://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html ([https](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html) result 200).
* [ ] http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html ([https](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html) result 200).
* [ ] http://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/ with 1 occurrences migrated to:
  https://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/ ([https](https://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/) result 200).
* [ ] http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html ([https](https://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html) result 200).
* [ ] http://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html ([https](https://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html) result 200).
* [ ] http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html ([https](https://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html) result 200).
* [ ] http://docs.seleniumhq.org/ with 1 occurrences migrated to:
  https://docs.seleniumhq.org/ ([https](https://docs.seleniumhq.org/) result 200).
* [ ] http://docs.seleniumhq.org/projects/webdriver/ with 1 occurrences migrated to:
  https://docs.seleniumhq.org/projects/webdriver/ ([https](https://docs.seleniumhq.org/projects/webdriver/) result 200).
* [ ] http://docs.spring.io/spring-framework/docs/3.2.4.RELEASE_to_4.0.0.RELEASE/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-framework/docs/3.2.4.RELEASE_to_4.0.0.RELEASE/ ([https](https://docs.spring.io/spring-framework/docs/3.2.4.RELEASE_to_4.0.0.RELEASE/) result 200).
* [ ] http://docs.spring.io/spring-framework/docs/current/javadoc-api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-framework/docs/current/javadoc-api/ ([https](https://docs.spring.io/spring-framework/docs/current/javadoc-api/) result 200).
* [ ] http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/ ([https](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/) result 200).
* [ ] http://docs.spring.io/spring-session/docs/current/reference/html5/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-session/docs/current/reference/html5/ ([https](https://docs.spring.io/spring-session/docs/current/reference/html5/) result 200).
* [ ] http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/filter/CorsFilter.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/filter/CorsFilter.html ([https](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/filter/CorsFilter.html) result 200).
* [ ] http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/OracleConnection.html with 1 occurrences migrated to:
  https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/OracleConnection.html ([https](https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/OracleConnection.html) result 200).
* [ ] http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html with 7 occurrences migrated to:
  https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html ([https](https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html) result 200).
* [ ] http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html with 7 occurrences migrated to:
  https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html ([https](https://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html) result 200).
* [ ] http://en.wikipedia.org/wiki/Adapter_pattern with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Adapter_pattern ([https](https://en.wikipedia.org/wiki/Adapter_pattern) result 200).
* [ ] http://en.wikipedia.org/wiki/Content_negotiation with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Content_negotiation ([https](https://en.wikipedia.org/wiki/Content_negotiation) result 200).
* [ ] http://en.wikipedia.org/wiki/Cross-origin_resource_sharing with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Cross-origin_resource_sharing ([https](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) result 200).
* [ ] http://en.wikipedia.org/wiki/HTTP_ETag with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/HTTP_ETag ([https](https://en.wikipedia.org/wiki/HTTP_ETag) result 200).
* [ ] http://en.wikipedia.org/wiki/Halting_Problem with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Halting_Problem ([https](https://en.wikipedia.org/wiki/Halting_Problem) result 200).
* [ ] http://en.wikipedia.org/wiki/Internet_media_type with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Internet_media_type ([https](https://en.wikipedia.org/wiki/Internet_media_type) result 200).
* [ ] http://en.wikipedia.org/wiki/JSONP with 3 occurrences migrated to:
  https://en.wikipedia.org/wiki/JSONP ([https](https://en.wikipedia.org/wiki/JSONP) result 200).
* [ ] http://en.wikipedia.org/wiki/List_of_HTTP_status_codes with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/List_of_HTTP_status_codes ([https](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) result 200).
* [ ] http://en.wikipedia.org/wiki/MIME with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/MIME ([https](https://en.wikipedia.org/wiki/MIME) result 200).
* [ ] http://en.wikipedia.org/wiki/Mock_Object with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Mock_Object ([https](https://en.wikipedia.org/wiki/Mock_Object) result 200).
* [ ] http://en.wikipedia.org/wiki/Polyfill with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Polyfill ([https](https://en.wikipedia.org/wiki/Polyfill) result 200).
* [ ] http://example.com with 98 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://example.com/ with 14 occurrences migrated to:
  https://example.com/ ([https](https://example.com/) result 200).
* [ ] http://example.com?foo=bar@baz with 1 occurrences migrated to:
  https://example.com?foo=bar@baz ([https](https://example.com?foo=bar@baz) result 200).
* [ ] http://example.org with 11 occurrences migrated to:
  https://example.org ([https](https://example.org) result 200).
* [ ] http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html with 1 occurrences migrated to:
  https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html) result 200).
* [ ] http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html with 1 occurrences migrated to:
  https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html) result 200).
* [ ] http://gradle.org with 1 occurrences migrated to:
  https://gradle.org ([https](https://gradle.org) result 200).
* [ ] http://h2database.com with 1 occurrences migrated to:
  https://h2database.com ([https](https://h2database.com) result 200).
* [ ] http://handlebarsjs.com with 1 occurrences migrated to:
  https://handlebarsjs.com ([https](https://handlebarsjs.com) result 200).
* [ ] http://handlebarsjs.com/ with 1 occurrences migrated to:
  https://handlebarsjs.com/ ([https](https://handlebarsjs.com/) result 200).
* [ ] http://hc.apache.org/httpcomponents-asyncclient-dev/ with 1 occurrences migrated to:
  https://hc.apache.org/httpcomponents-asyncclient-dev/ ([https](https://hc.apache.org/httpcomponents-asyncclient-dev/) result 200).
* [ ] http://hc.apache.org/httpcomponents-client-ga/ with 2 occurrences migrated to:
  https://hc.apache.org/httpcomponents-client-ga/ ([https](https://hc.apache.org/httpcomponents-client-ga/) result 200).
* [ ] http://hc.apache.org/httpcomponents-client-ga/httpclient/ with 1 occurrences migrated to:
  https://hc.apache.org/httpcomponents-client-ga/httpclient/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/) result 200).
* [ ] http://www.hibernate.org/ (301) with 1 occurrences migrated to:
  https://hibernate.org/ ([https](https://www.hibernate.org/) result 200).
* [ ] http://www.hibernate.org (301) with 3 occurrences migrated to:
  https://hibernate.org/ ([https](https://www.hibernate.org) result 200).
* [ ] http://jcp.org/aboutJava/communityprocess/final/jsr003/index3.html with 1 occurrences migrated to:
  https://jcp.org/aboutJava/communityprocess/final/jsr003/index3.html ([https](https://jcp.org/aboutJava/communityprocess/final/jsr003/index3.html) result 200).
* [ ] http://jcp.org/aboutJava/communityprocess/final/jsr160/index.html with 1 occurrences migrated to:
  https://jcp.org/aboutJava/communityprocess/final/jsr160/index.html ([https](https://jcp.org/aboutJava/communityprocess/final/jsr160/index.html) result 200).
* [ ] http://jcp.org/en/jsr/detail?id=107 with 1 occurrences migrated to:
  https://jcp.org/en/jsr/detail?id=107 ([https](https://jcp.org/en/jsr/detail?id=107) result 200).
* [ ] http://jcp.org/en/jsr/detail?id=310 with 1 occurrences migrated to:
  https://jcp.org/en/jsr/detail?id=310 ([https](https://jcp.org/en/jsr/detail?id=310) result 200).
* [ ] http://jcp.org/en/jsr/detail?id=356 with 2 occurrences migrated to:
  https://jcp.org/en/jsr/detail?id=356 ([https](https://jcp.org/en/jsr/detail?id=356) result 200).
* [ ] http://jira.pentaho.com/browse/PDI-5031 with 1 occurrences migrated to:
  https://jira.pentaho.com/browse/PDI-5031 ([https](https://jira.pentaho.com/browse/PDI-5031) result 200).
* [ ] http://joel-costigliola.github.io/assertj/ with 2 occurrences migrated to:
  https://joel-costigliola.github.io/assertj/ ([https](https://joel-costigliola.github.io/assertj/) result 200).
* [ ] http://jsonassert.skyscreamer.org/ with 2 occurrences migrated to:
  https://jsonassert.skyscreamer.org/ ([https](https://jsonassert.skyscreamer.org/) result 200).
* [ ] http://logback.qos.ch with 1 occurrences migrated to:
  https://logback.qos.ch ([https](https://logback.qos.ch) result 200).
* [ ] http://logging.apache.org/log4j/2.x/manual/configuration.html with 1 occurrences migrated to:
  https://logging.apache.org/log4j/2.x/manual/configuration.html ([https](https://logging.apache.org/log4j/2.x/manual/configuration.html) result 200).
* [ ] http://martinfowler.com/articles/injection.html with 1 occurrences migrated to:
  https://martinfowler.com/articles/injection.html ([https](https://martinfowler.com/articles/injection.html) result 200).
* [ ] http://maven.apache.org/ with 1 occurrences migrated to:
  https://maven.apache.org/ ([https](https://maven.apache.org/) result 200).
* [ ] http://mydomain.com with 5 occurrences migrated to:
  https://mydomain.com ([https](https://mydomain.com) result 200).
* [ ] http://myfaces.apache.org/ with 1 occurrences migrated to:
  https://myfaces.apache.org/ ([https](https://myfaces.apache.org/) result 200).
* [ ] http://myfaces.apache.org/orchestra/ with 1 occurrences migrated to:
  https://myfaces.apache.org/orchestra/ ([https](https://myfaces.apache.org/orchestra/) result 200).
* [ ] http://netty.io/ with 1 occurrences migrated to:
  https://netty.io/ ([https](https://netty.io/) result 200).
* [ ] http://openjdk.java.net/jeps/290 with 1 occurrences migrated to:
  https://openjdk.java.net/jeps/290 ([https](https://openjdk.java.net/jeps/290) result 200).
* [ ] http://openjdk.java.net/projects/nashorn/ with 5 occurrences migrated to:
  https://openjdk.java.net/projects/nashorn/ ([https](https://openjdk.java.net/projects/nashorn/) result 200).
* [ ] http://pivotal.io/security/cve-2015-5211 with 1 occurrences migrated to:
  https://pivotal.io/security/cve-2015-5211 ([https](https://pivotal.io/security/cve-2015-5211) result 200).
* [ ] http://poi.apache.org with 4 occurrences migrated to:
  https://poi.apache.org ([https](https://poi.apache.org) result 200).
* [ ] http://projects.spring.io/spring-boot/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-boot/ ([https](https://projects.spring.io/spring-boot/) result 200).
* [ ] http://projects.spring.io/spring-data/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-data/ ([https](https://projects.spring.io/spring-data/) result 200).
* [ ] http://projects.spring.io/spring-framework/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-framework/ ([https](https://projects.spring.io/spring-framework/) result 200).
* [ ] http://projects.spring.io/spring-integration/ with 3 occurrences migrated to:
  https://projects.spring.io/spring-integration/ ([https](https://projects.spring.io/spring-integration/) result 200).
* [ ] http://projects.spring.io/spring-security/ with 3 occurrences migrated to:
  https://projects.spring.io/spring-security/ ([https](https://projects.spring.io/spring-security/) result 200).
* [ ] http://projects.spring.io/spring-webflow/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-webflow/ ([https](https://projects.spring.io/spring-webflow/) result 200).
* [ ] http://repo.spring.io/milestone/ with 1 occurrences migrated to:
  https://repo.spring.io/milestone/ ([https](https://repo.spring.io/milestone/) result 200).
* [ ] http://repo.spring.io/release/ with 2 occurrences migrated to:
  https://repo.spring.io/release/ ([https](https://repo.spring.io/release/) result 200).
* [ ] http://repo.spring.io/snapshot/ with 1 occurrences migrated to:
  https://repo.spring.io/snapshot/ ([https](https://repo.spring.io/snapshot/) result 200).
* [ ] http://repo1.maven.org/maven2/javax/inject/javax.inject/1/ with 2 occurrences migrated to:
  https://repo1.maven.org/maven2/javax/inject/javax.inject/1/ ([https](https://repo1.maven.org/maven2/javax/inject/javax.inject/1/) result 200).
* [ ] http://schema.spring.io/mvc/spring-mvc.xsd with 1 occurrences migrated to:
  https://schema.spring.io/mvc/spring-mvc.xsd ([https](https://schema.spring.io/mvc/spring-mvc.xsd) result 200).
* [ ] http://search.maven.org/ with 2 occurrences migrated to:
  https://search.maven.org/ ([https](https://search.maven.org/) result 200).
* [ ] http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html with 3 occurrences migrated to:
  https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html ([https](https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html) result 200).
* [ ] http://sourceforge.net with 1 occurrences migrated to:
  https://sourceforge.net ([https](https://sourceforge.net) result 200).
* [ ] http://sourceforge.net/projects/javadiff/ with 1 occurrences migrated to:
  https://sourceforge.net/projects/javadiff/ ([https](https://sourceforge.net/projects/javadiff/) result 200).
* [ ] http://sourceforge.net/sflogo.php?group_id=37160 with 1 occurrences migrated to:
  https://sourceforge.net/sflogo.php?group_id=37160 ([https](https://sourceforge.net/sflogo.php?group_id=37160) result 200).
* [ ] http://spring.io/blog/ with 1 occurrences migrated to:
  https://spring.io/blog/ ([https](https://spring.io/blog/) result 200).
* [ ] http://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/ with 1 occurrences migrated to:
  https://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/ ([https](https://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/) result 200).
* [ ] http://spring.io/blog/category/news with 1 occurrences migrated to:
  https://spring.io/blog/category/news ([https](https://spring.io/blog/category/news) result 200).
* [ ] http://spring.io/projects with 1 occurrences migrated to:
  https://spring.io/projects ([https](https://spring.io/projects) result 200).
* [ ] http://spring.io/questions with 1 occurrences migrated to:
  https://spring.io/questions ([https](https://spring.io/questions) result 200).
* [ ] http://spring.io/services with 1 occurrences migrated to:
  https://spring.io/services ([https](https://spring.io/services) result 200).
* [ ] http://square.github.io/okhttp/ with 3 occurrences migrated to:
  https://square.github.io/okhttp/ ([https](https://square.github.io/okhttp/) result 200).
* [ ] http://stackoverflow.com/faq with 1 occurrences migrated to:
  https://stackoverflow.com/faq ([https](https://stackoverflow.com/faq) result 200).
* [ ] http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do with 2 occurrences migrated to:
  https://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do ([https](https://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do) result 200).
* [ ] http://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources with 2 occurrences migrated to:
  https://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources ([https](https://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources) result 200).
* [ ] http://stackoverflow.com/questions/22986109/testing-spring-managed-servlet with 1 occurrences migrated to:
  https://stackoverflow.com/questions/22986109/testing-spring-managed-servlet ([https](https://stackoverflow.com/questions/22986109/testing-spring-managed-servlet) result 200).
* [ ] http://stackoverflow.com/questions/24725438/what-could-cause-a-class-implementing-applicationlistenercontextrefreshedevent with 1 occurrences migrated to:
  https://stackoverflow.com/questions/24725438/what-could-cause-a-class-implementing-applicationlistenercontextrefreshedevent ([https](https://stackoverflow.com/questions/24725438/what-could-cause-a-class-implementing-applicationlistenercontextrefreshedevent) result 200).
* [ ] http://stackoverflow.com/questions/35733344/can-contextconfiguration-in-a-custom-annotation-be-merged with 1 occurrences migrated to:
  https://stackoverflow.com/questions/35733344/can-contextconfiguration-in-a-custom-annotation-be-merged ([https](https://stackoverflow.com/questions/35733344/can-contextconfiguration-in-a-custom-annotation-be-merged) result 200).
* [ ] http://start.spring.io with 1 occurrences migrated to:
  https://start.spring.io ([https](https://start.spring.io) result 200).
* [ ] http://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html with 1 occurrences migrated to:
  https://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html ([https](https://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html) result 200).
* [ ] http://stomp.github.io/stomp-specification-1.2.html with 10 occurrences migrated to:
  https://stomp.github.io/stomp-specification-1.2.html ([https](https://stomp.github.io/stomp-specification-1.2.html) result 200).
* [ ] http://struts.apache.org with 1 occurrences migrated to:
  https://struts.apache.org ([https](https://struts.apache.org) result 200).
* [ ] http://struts.apache.org/ with 1 occurrences migrated to:
  https://struts.apache.org/ ([https](https://struts.apache.org/) result 200).
* [ ] http://tapestry.apache.org/ with 2 occurrences migrated to:
  https://tapestry.apache.org/ ([https](https://tapestry.apache.org/) result 200).
* [ ] http://tiles.apache.org with 7 occurrences migrated to:
  https://tiles.apache.org ([https](https://tiles.apache.org) result 200).
* [ ] http://tiles.apache.org/framework/dependency-management.html with 1 occurrences migrated to:
  https://tiles.apache.org/framework/dependency-management.html ([https](https://tiles.apache.org/framework/dependency-management.html) result 200).
* [ ] http://tomcat.apache.org/ with 2 occurrences migrated to:
  https://tomcat.apache.org/ ([https](https://tomcat.apache.org/) result 200).
* [ ] http://tomcat.apache.org/tomcat-6.0-doc/config/context.html with 2 occurrences migrated to:
  https://tomcat.apache.org/tomcat-6.0-doc/config/context.html ([https](https://tomcat.apache.org/tomcat-6.0-doc/config/context.html) result 200).
* [ ] http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html with 1 occurrences migrated to:
  https://tomcat.apache.org/tomcat-6.0-doc/config/loader.html ([https](https://tomcat.apache.org/tomcat-6.0-doc/config/loader.html) result 200).
* [ ] http://tools.ietf.org/html/rfc1945 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc1945 ([https](https://tools.ietf.org/html/rfc1945) result 200).
* [ ] http://tools.ietf.org/html/rfc2109 with 2 occurrences migrated to:
  https://tools.ietf.org/html/rfc2109 ([https](https://tools.ietf.org/html/rfc2109) result 200).
* [ ] http://tools.ietf.org/html/rfc2295 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2295 ([https](https://tools.ietf.org/html/rfc2295) result 200).
* [ ] http://tools.ietf.org/html/rfc2324 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2324 ([https](https://tools.ietf.org/html/rfc2324) result 200).
* [ ] http://tools.ietf.org/html/rfc2518 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2518 ([https](https://tools.ietf.org/html/rfc2518) result 200).
* [ ] http://tools.ietf.org/html/rfc2616 with 3 occurrences migrated to:
  https://tools.ietf.org/html/rfc2616 ([https](https://tools.ietf.org/html/rfc2616) result 200).
* [ ] http://tools.ietf.org/html/rfc2774 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2774 ([https](https://tools.ietf.org/html/rfc2774) result 200).
* [ ] http://tools.ietf.org/html/rfc2817 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2817 ([https](https://tools.ietf.org/html/rfc2817) result 200).
* [ ] http://tools.ietf.org/html/rfc2965 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc2965 ([https](https://tools.ietf.org/html/rfc2965) result 200).
* [ ] http://tools.ietf.org/html/rfc3229 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc3229 ([https](https://tools.ietf.org/html/rfc3229) result 200).
* [ ] http://tools.ietf.org/html/rfc3986 with 3 occurrences migrated to:
  https://tools.ietf.org/html/rfc3986 ([https](https://tools.ietf.org/html/rfc3986) result 200).
* [ ] http://tools.ietf.org/html/rfc4918 with 5 occurrences migrated to:
  https://tools.ietf.org/html/rfc4918 ([https](https://tools.ietf.org/html/rfc4918) result 200).
* [ ] http://tools.ietf.org/html/rfc5842 with 2 occurrences migrated to:
  https://tools.ietf.org/html/rfc5842 ([https](https://tools.ietf.org/html/rfc5842) result 200).
* [ ] http://tools.ietf.org/html/rfc5988 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc5988 ([https](https://tools.ietf.org/html/rfc5988) result 200).
* [ ] http://tools.ietf.org/html/rfc6202 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc6202 ([https](https://tools.ietf.org/html/rfc6202) result 200).
* [ ] http://tools.ietf.org/html/rfc6266 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc6266 ([https](https://tools.ietf.org/html/rfc6266) result 200).
* [ ] http://tools.ietf.org/html/rfc6454 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc6454 ([https](https://tools.ietf.org/html/rfc6454) result 200).
* [ ] http://tools.ietf.org/html/rfc6455 with 3 occurrences migrated to:
  https://tools.ietf.org/html/rfc6455 ([https](https://tools.ietf.org/html/rfc6455) result 200).
* [ ] http://tools.ietf.org/html/rfc6585 with 4 occurrences migrated to:
  https://tools.ietf.org/html/rfc6585 ([https](https://tools.ietf.org/html/rfc6585) result 200).
* [ ] http://tools.ietf.org/html/rfc7230 with 10 occurrences migrated to:
  https://tools.ietf.org/html/rfc7230 ([https](https://tools.ietf.org/html/rfc7230) result 200).
* [ ] http://tools.ietf.org/html/rfc7231 with 58 occurrences migrated to:
  https://tools.ietf.org/html/rfc7231 ([https](https://tools.ietf.org/html/rfc7231) result 200).
* [ ] http://tools.ietf.org/html/rfc7232 with 8 occurrences migrated to:
  https://tools.ietf.org/html/rfc7232 ([https](https://tools.ietf.org/html/rfc7232) result 200).
* [ ] http://tools.ietf.org/html/rfc7233 with 12 occurrences migrated to:
  https://tools.ietf.org/html/rfc7233 ([https](https://tools.ietf.org/html/rfc7233) result 200).
* [ ] http://tools.ietf.org/html/rfc7234 with 5 occurrences migrated to:
  https://tools.ietf.org/html/rfc7234 ([https](https://tools.ietf.org/html/rfc7234) result 200).
* [ ] http://tools.ietf.org/html/rfc7235 with 6 occurrences migrated to:
  https://tools.ietf.org/html/rfc7235 ([https](https://tools.ietf.org/html/rfc7235) result 200).
* [ ] http://tools.ietf.org/html/rfc7238 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc7238 ([https](https://tools.ietf.org/html/rfc7238) result 200).
* [ ] http://tools.ietf.org/html/rfc7239 with 9 occurrences migrated to:
  https://tools.ietf.org/html/rfc7239 ([https](https://tools.ietf.org/html/rfc7239) result 200).
* [ ] http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt with 3 occurrences migrated to:
  https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt ([https](https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt) result 200).
* [ ] http://velocity.apache.org with 4 occurrences migrated to:
  https://velocity.apache.org ([https](https://velocity.apache.org) result 200).
* [ ] http://vimeo.com/34436402 with 1 occurrences migrated to:
  https://vimeo.com/34436402 ([https](https://vimeo.com/34436402) result 200).
* [ ] http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ with 10 occurrences migrated to:
  https://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ ([https](https://www.amazon.com/exec/obidos/tg/detail/-/0764543857/) result 200).
* [ ] http://www.apache.org with 1 occurrences migrated to:
  https://www.apache.org ([https](https://www.apache.org) result 200).
* [ ] http://www.apple.com/DTDs/PropertyList-1.0.dtd with 6 occurrences migrated to:
  https://www.apple.com/DTDs/PropertyList-1.0.dtd ([https](https://www.apple.com/DTDs/PropertyList-1.0.dtd) result 200).
* [ ] http://www.atomikos.com/ with 1 occurrences migrated to:
  https://www.atomikos.com/ ([https](https://www.atomikos.com/) result 200).
* [ ] http://www.eclipse.org/ajdt/ with 1 occurrences migrated to:
  https://www.eclipse.org/ajdt/ ([https](https://www.eclipse.org/ajdt/) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/next/progguide/index.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/next/progguide/index.html ([https](https://www.eclipse.org/aspectj/doc/next/progguide/index.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html ([https](https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html ([https](https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html ([https](https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/devguide/index.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/devguide/index.html ([https](https://www.eclipse.org/aspectj/doc/released/devguide/index.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html ([https](https://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/devguide/ltw.html ([https](https://www.eclipse.org/aspectj/doc/released/devguide/ltw.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/progguide/index.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/progguide/index.html ([https](https://www.eclipse.org/aspectj/doc/released/progguide/index.html) result 200).
* [ ] http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html ([https](https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html) result 200).
* [ ] http://www.eclipse.org/aspectj/dtd/aspectj.dtd with 1 occurrences migrated to:
  https://www.eclipse.org/aspectj/dtd/aspectj.dtd ([https](https://www.eclipse.org/aspectj/dtd/aspectj.dtd) result 200).
* [ ] http://www.eclipse.org/jetty/ with 1 occurrences migrated to:
  https://www.eclipse.org/jetty/ ([https](https://www.eclipse.org/jetty/) result 200).
* [ ] http://ehcache.sourceforge.net (301) with 1 occurrences migrated to:
  https://www.ehcache.org/ ([https](https://ehcache.sourceforge.net) result 200).
* [ ] http://ehcache.org/ (301) with 1 occurrences migrated to:
  https://www.ehcache.org/ ([https](https://ehcache.org/) result 200).
* [ ] http://www.embeddedjs.com/ with 1 occurrences migrated to:
  https://www.embeddedjs.com/ ([https](https://www.embeddedjs.com/) result 200).
* [ ] http://www.enterpriseintegrationpatterns.com with 1 occurrences migrated to:
  https://www.enterpriseintegrationpatterns.com ([https](https://www.enterpriseintegrationpatterns.com) result 200).
* [ ] http://www.example.org/?param=aGVsbG9Xb3JsZA%3D%3D with 1 occurrences migrated to:
  https://www.example.org/?param=aGVsbG9Xb3JsZA%3D%3D ([https](https://www.example.org/?param=aGVsbG9Xb3JsZA%3D%3D) result 200).
* [ ] http://www.google.com with 2 occurrences migrated to:
  https://www.google.com ([https](https://www.google.com) result 200).
* [ ] http://www.h2database.com with 1 occurrences migrated to:
  https://www.h2database.com ([https](https://www.h2database.com) result 200).
* [ ] http://www.ietf.org with 1 occurrences migrated to:
  https://www.ietf.org ([https](https://www.ietf.org) result 200).
* [ ] http://www.ietf.org/rfc/rfc1867.txt with 2 occurrences migrated to:
  https://www.ietf.org/rfc/rfc1867.txt ([https](https://www.ietf.org/rfc/rfc1867.txt) result 200).
* [ ] http://www.ietf.org/rfc/rfc2396.txt with 2 occurrences migrated to:
  https://www.ietf.org/rfc/rfc2396.txt ([https](https://www.ietf.org/rfc/rfc2396.txt) result 200).
* [ ] http://www.ietf.org/rfc/rfc3986.txt with 11 occurrences migrated to:
  https://www.ietf.org/rfc/rfc3986.txt ([https](https://www.ietf.org/rfc/rfc3986.txt) result 200).
* [ ] http://www.infoq.com/ with 1 occurrences migrated to:
  https://www.infoq.com/ ([https](https://www.infoq.com/) result 200).
* [ ] http://www.infoq.com/articles/Web-Sockets-Proxy-Servers with 1 occurrences migrated to:
  https://www.infoq.com/articles/Web-Sockets-Proxy-Servers ([https](https://www.infoq.com/articles/Web-Sockets-Proxy-Servers) result 200).
* [ ] http://www.infoq.com/minibooks/JTDS with 1 occurrences migrated to:
  https://www.infoq.com/minibooks/JTDS ([https](https://www.infoq.com/minibooks/JTDS) result 200).
* [ ] http://www.jetbrains.com/idea/ with 1 occurrences migrated to:
  https://www.jetbrains.com/idea/ ([https](https://www.jetbrains.com/idea/) result 200).
* [ ] http://jruby.sourceforge.net (302) with 1 occurrences migrated to:
  https://www.jruby.org/ ([https](https://jruby.sourceforge.net) result 200).
* [ ] http://www.json.org/ with 1 occurrences migrated to:
  https://www.json.org/ ([https](https://www.json.org/) result 200).
* [ ] http://www.jython.org with 1 occurrences migrated to:
  https://www.jython.org ([https](https://www.jython.org) result 200).
* [ ] http://www.jython.org/ with 1 occurrences migrated to:
  https://www.jython.org/ ([https](https://www.jython.org/) result 200).
* [ ] http://www.lowagie.com/iText with 2 occurrences migrated to:
  https://www.lowagie.com/iText ([https](https://www.lowagie.com/iText) result 200).
* [ ] http://www.manpagez.com/man/5/crontab/ with 1 occurrences migrated to:
  https://www.manpagez.com/man/5/crontab/ ([https](https://www.manpagez.com/man/5/crontab/) result 200).
* [ ] http://mydomain1.com:80/ (301) with 2 occurrences migrated to:
  https://www.mydomain1.com/ ([https](https://mydomain1.com:80/) result 200).
* [ ] http://mydomain1.com:80 (301) with 1 occurrences migrated to:
  https://www.mydomain1.com/ ([https](https://mydomain1.com:80) result 200).
* [ ] http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/articles/javaee/jpa-137156.html ([https](https://www.oracle.com/technetwork/articles/javaee/jpa-137156.html) result 200).
* [ ] http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html with 2 occurrences migrated to:
  https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html ([https](https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html) result 200).
* [ ] http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html ([https](https://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html) result 200).
* [ ] http://www.oracle.com/technetwork/java/javase/tech/download-jsp-141676.html with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/java/javase/tech/download-jsp-141676.html ([https](https://www.oracle.com/technetwork/java/javase/tech/download-jsp-141676.html) result 200).
* [ ] http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html ([https](https://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html) result 200).
* [ ] http://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html ([https](https://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html) result 200).
* [ ] http://www.ow2.org/ with 1 occurrences migrated to:
  https://www.ow2.org/ ([https](https://www.ow2.org/) result 200).
* [ ] http://quartz-scheduler.org (301) with 3 occurrences migrated to:
  https://www.quartz-scheduler.org/ ([https](https://quartz-scheduler.org) result 200).
* [ ] http://www.rabbitmq.com/stomp.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/stomp.html ([https](https://www.rabbitmq.com/stomp.html) result 200).
* [ ] http://seleniumhq.org/projects/webdriver/ (301) with 1 occurrences migrated to:
  https://www.seleniumhq.org ([https](https://seleniumhq.org/projects/webdriver/) result 200).
* [ ] http://www.slf4j.org with 1 occurrences migrated to:
  https://www.slf4j.org ([https](https://www.slf4j.org) result 200).
* [ ] http://www.springbyexample.org/examples/custom-thread-scope-module.html with 1 occurrences migrated to:
  https://www.springbyexample.org/examples/custom-thread-scope-module.html ([https](https://www.springbyexample.org/examples/custom-thread-scope-module.html) result 200).
* [ ] http://www.springframework.org/dtd/spring-beans-2.0.dtd with 10 occurrences migrated to:
  https://www.springframework.org/dtd/spring-beans-2.0.dtd ([https](https://www.springframework.org/dtd/spring-beans-2.0.dtd) result 200).
* [ ] http://www.springframework.org/schema/aop/spring-aop.xsd with 13 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop.xsd ([https](https://www.springframework.org/schema/aop/spring-aop.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-2.0.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-2.5.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.5.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.0.xsd with 10 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.1.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.2.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.2.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.0.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.1.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.2.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.2.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.3.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.3.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.3.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans.xsd with 75 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/cache/spring-cache.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/cache/spring-cache.xsd ([https](https://www.springframework.org/schema/cache/spring-cache.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc.xsd) result 200).
* [ ] http://www.springframework.org/schema/jee/spring-jee.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/jee/spring-jee.xsd ([https](https://www.springframework.org/schema/jee/spring-jee.xsd) result 200).
* [ ] http://www.springframework.org/schema/jms/spring-jms.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms.xsd ([https](https://www.springframework.org/schema/jms/spring-jms.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang.xsd ([https](https://www.springframework.org/schema/lang/spring-lang.xsd) result 200).
* [ ] http://www.springframework.org/schema/mvc/spring-mvc.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc.xsd) result 200).
* [ ] http://www.springframework.org/schema/oxm/spring-oxm.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/oxm/spring-oxm.xsd ([https](https://www.springframework.org/schema/oxm/spring-oxm.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-2.0.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-2.0.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-2.5.xsd with 7 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-2.5.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-3.0.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-3.0.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-3.1.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-3.1.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-3.2.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-3.2.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-3.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-4.0.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-4.0.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-4.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-4.1.xsd with 13 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-4.1.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-4.2.xsd with 13 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-4.2.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/tool/spring-tool-4.3.xsd with 13 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool-4.3.xsd ([https](https://www.springframework.org/schema/tool/spring-tool-4.3.xsd) result 200).
* [ ] http://www.springframework.org/schema/tx/spring-tx.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx.xsd ([https](https://www.springframework.org/schema/tx/spring-tx.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util.xsd ([https](https://www.springframework.org/schema/util/spring-util.xsd) result 200).
* [ ] http://www.springframework.org/schema/websocket/spring-websocket.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/websocket/spring-websocket.xsd ([https](https://www.springframework.org/schema/websocket/spring-websocket.xsd) result 200).
* [ ] http://www.stuartellis.eu/articles/erb/ (301) with 1 occurrences migrated to:
  https://www.stuartellis.name/articles/erb/ ([https](https://www.stuartellis.eu/articles/erb/) result 200).
* [ ] http://www.thymeleaf.org/ with 1 occurrences migrated to:
  https://www.thymeleaf.org/ ([https](https://www.thymeleaf.org/) result 200).
* [ ] http://www.thymeleaf.org/documentation.html with 1 occurrences migrated to:
  https://www.thymeleaf.org/documentation.html ([https](https://www.thymeleaf.org/documentation.html) result 200).
* [ ] http://www.w3.org/2000/xmlns/ with 5 occurrences migrated to:
  https://www.w3.org/2000/xmlns/ ([https](https://www.w3.org/2000/xmlns/) result 200).
* [ ] http://www.w3.org/2004/08/xop/include with 2 occurrences migrated to:
  https://www.w3.org/2004/08/xop/include ([https](https://www.w3.org/2004/08/xop/include) result 200).
* [ ] http://www.w3.org/DesignIssues/MatrixURIs.html with 1 occurrences migrated to:
  https://www.w3.org/DesignIssues/MatrixURIs.html ([https](https://www.w3.org/DesignIssues/MatrixURIs.html) result 200).
* [ ] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/ with 1 occurrences migrated to:
  https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/ ([https](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/) result 200).
* [ ] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/ with 1 occurrences migrated to:
  https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/ ([https](https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/) result 200).
* [ ] http://www.w3.org/TR/2004/WD-soap12-mtom-20040608/ with 2 occurrences migrated to:
  https://www.w3.org/TR/2004/WD-soap12-mtom-20040608/ ([https](https://www.w3.org/TR/2004/WD-soap12-mtom-20040608/) result 200).
* [ ] http://www.w3.org/TR/2005/REC-xop10-20050125/ with 6 occurrences migrated to:
  https://www.w3.org/TR/2005/REC-xop10-20050125/ ([https](https://www.w3.org/TR/2005/REC-xop10-20050125/) result 200).
* [ ] http://www.w3.org/TR/cors/ with 14 occurrences migrated to:
  https://www.w3.org/TR/cors/ ([https](https://www.w3.org/TR/cors/) result 200).
* [ ] http://www.w3.org/TR/eventsource/ with 2 occurrences migrated to:
  https://www.w3.org/TR/eventsource/ ([https](https://www.w3.org/TR/eventsource/) result 200).
* [ ] http://www.w3.org/TR/xhtml1/ with 2 occurrences migrated to:
  https://www.w3.org/TR/xhtml1/ ([https](https://www.w3.org/TR/xhtml1/) result 200).
* [ ] http://www.w3.org/TR/xhtml1/diffs.html with 1 occurrences migrated to:
  https://www.w3.org/TR/xhtml1/diffs.html ([https](https://www.w3.org/TR/xhtml1/diffs.html) result 200).
* [ ] http://www.w3.org/TR/xhtml1/dtds.html with 2 occurrences migrated to:
  https://www.w3.org/TR/xhtml1/dtds.html ([https](https://www.w3.org/TR/xhtml1/dtds.html) result 200).
* [ ] http://www.webjars.org with 2 occurrences migrated to:
  https://www.webjars.org ([https](https://www.webjars.org) result 200).
* [ ] http://www.webjars.org/ with 1 occurrences migrated to:
  https://www.webjars.org/ ([https](https://www.webjars.org/) result 200).
* [ ] http://www.wildfly.org/ with 1 occurrences migrated to:
  https://www.wildfly.org/ ([https](https://www.wildfly.org/) result 200).
* [ ] http://x-stream.github.io/ with 2 occurrences migrated to:
  https://x-stream.github.io/ ([https](https://x-stream.github.io/) result 200).
* [ ] http://xmlbeans.apache.org/ with 2 occurrences migrated to:
  https://xmlbeans.apache.org/ ([https](https://xmlbeans.apache.org/) result 200).
* [ ] http://youtrack.jetbrains.com/issue/IDEA-53476 with 1 occurrences migrated to:
  https://youtrack.jetbrains.com/issue/IDEA-53476 ([https](https://youtrack.jetbrains.com/issue/IDEA-53476) result 200).
* [ ] http://youtrack.jetbrains.com/issue/IDEA-64446 with 1 occurrences migrated to:
  https://youtrack.jetbrains.com/issue/IDEA-64446 ([https](https://youtrack.jetbrains.com/issue/IDEA-64446) result 200).
* [ ] http://ant.apache.org/ivy with 1 occurrences migrated to:
  https://ant.apache.org/ivy ([https](https://ant.apache.org/ivy) result 301).
* [ ] http://asm.ow2.org with 1 occurrences migrated to:
  https://asm.ow2.org ([https](https://asm.ow2.org) result 301).
* [ ] http://bit.ly/TRlX2r with 1 occurrences migrated to:
  https://bit.ly/TRlX2r ([https](https://bit.ly/TRlX2r) result 301).
* [ ] http://bit.ly/UzccDt with 1 occurrences migrated to:
  https://bit.ly/UzccDt ([https](https://bit.ly/UzccDt) result 301).
* [ ] http://bit.ly/p9rIvx with 1 occurrences migrated to:
  https://bit.ly/p9rIvx ([https](https://bit.ly/p9rIvx) result 301).
* [ ] http://bit.ly/qUwvwz with 1 occurrences migrated to:
  https://bit.ly/qUwvwz ([https](https://bit.ly/qUwvwz) result 301).
* [ ] http://blog.pivotal.io/pivotal/products/websocket-architecture-in-spring-4-0 with 1 occurrences migrated to:
  https://blog.pivotal.io/pivotal/products/websocket-architecture-in-spring-4-0 ([https](https://blog.pivotal.io/pivotal/products/websocket-architecture-in-spring-4-0) result 301).
* [ ] http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx with 1 occurrences migrated to:
  https://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx ([https](https://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx) result 301).
* [ ] http://castor-data-binding.github.io/castor with 1 occurrences migrated to:
  https://castor-data-binding.github.io/castor ([https](https://castor-data-binding.github.io/castor) result 301).
* [ ] http://code.google.com/p/beanshell2/ with 1 occurrences migrated to:
  https://code.google.com/p/beanshell2/ ([https](https://code.google.com/p/beanshell2/) result 301).
* [ ] http://code.google.com/p/browsersec/wiki/Part2 with 1 occurrences migrated to:
  https://code.google.com/p/browsersec/wiki/Part2 ([https](https://code.google.com/p/browsersec/wiki/Part2) result 301).
* [ ] http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal with 1 occurrences migrated to:
  https://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal ([https](https://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal) result 301).
* [ ] http://code.google.com/p/guava-libraries/ with 1 occurrences migrated to:
  https://code.google.com/p/guava-libraries/ ([https](https://code.google.com/p/guava-libraries/) result 301).
* [ ] http://code.google.com/p/objenesis/ with 1 occurrences migrated to:
  https://code.google.com/p/objenesis/ ([https](https://code.google.com/p/objenesis/) result 301).
* [ ] http://code.google.com/p/xml-matchers/ with 4 occurrences migrated to:
  https://code.google.com/p/xml-matchers/ ([https](https://code.google.com/p/xml-matchers/) result 301).
* [ ] http://commons.apache.org/proper/commons-dbcp with 2 occurrences migrated to:
  https://commons.apache.org/proper/commons-dbcp ([https](https://commons.apache.org/proper/commons-dbcp) result 301).
* [ ] http://commons.apache.org/proper/commons-fileupload with 3 occurrences migrated to:
  https://commons.apache.org/proper/commons-fileupload ([https](https://commons.apache.org/proper/commons-fileupload) result 301).
* [ ] http://confluence.jetbrains.net/display/IDEADEV/Gradle+integration with 1 occurrences migrated to:
  https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration ([https](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration) result 301).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://db.apache.org/derby with 2 occurrences migrated to:
  https://db.apache.org/derby ([https](https://db.apache.org/derby) result 301).
* [ ] http://dev.w3.org/html5/eventsource/ with 2 occurrences migrated to:
  https://dev.w3.org/html5/eventsource/ ([https](https://dev.w3.org/html5/eventsource/) result 301).
* [ ] http://docs.spring.io with 1 occurrences migrated to:
  https://docs.spring.io ([https](https://docs.spring.io) result 301).
* [ ] http://domain.com with 17 occurrences migrated to:
  https://domain.com ([https](https://domain.com) result 301).
* [ ] http://domain.com/ with 1 occurrences migrated to:
  https://domain.com/ ([https](https://domain.com/) result 301).
* [ ] http://en.wikipedia.org/wiki/Cache_ with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Cache_ ([https](https://en.wikipedia.org/wiki/Cache_) result 301).
* [ ] http://facebook.github.io/react/ with 1 occurrences migrated to:
  https://facebook.github.io/react/ ([https](https://facebook.github.io/react/) result 301).
* [ ] http://forum.springframework.org/showthread.php?t=41350 with 1 occurrences migrated to:
  https://forum.springframework.org/showthread.php?t=41350 ([https](https://forum.springframework.org/showthread.php?t=41350) result 301).
* [ ] http://github.com/SpringSource/spring-framework with 1 occurrences migrated to:
  https://github.com/SpringSource/spring-framework ([https](https://github.com/SpringSource/spring-framework) result 301).
* [ ] http://hdiv.org/ with 1 occurrences migrated to:
  https://hdiv.org/ ([https](https://hdiv.org/) result 301).
* [ ] http://help.github.com/set-up-git-redirect with 1 occurrences migrated to:
  https://help.github.com/set-up-git-redirect ([https](https://help.github.com/set-up-git-redirect) result 301).
* [ ] http://jakarta.apache.org/commons/fileupload with 2 occurrences migrated to:
  https://jakarta.apache.org/commons/fileupload ([https](https://jakarta.apache.org/commons/fileupload) result 301).
* [ ] http://jira.springframework.org/browse/SPR-5708 with 1 occurrences migrated to:
  https://jira.springframework.org/browse/SPR-5708 ([https](https://jira.springframework.org/browse/SPR-5708) result 301).
* [ ] http://jira.springframework.org/browse/SPR-6124 with 1 occurrences migrated to:
  https://jira.springframework.org/browse/SPR-6124 ([https](https://jira.springframework.org/browse/SPR-6124) result 301).
* [ ] http://jira.springframework.org/browse/SPR-6128 with 1 occurrences migrated to:
  https://jira.springframework.org/browse/SPR-6128 ([https](https://jira.springframework.org/browse/SPR-6128) result 301).
* [ ] http://jira.springframework.org/browse/SPR-7064 with 1 occurrences migrated to:
  https://jira.springframework.org/browse/SPR-7064 ([https](https://jira.springframework.org/browse/SPR-7064) result 301).
* [ ] http://logging.apache.org/log4j with 1 occurrences migrated to:
  https://logging.apache.org/log4j ([https](https://logging.apache.org/log4j) result 301).
* [ ] http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html with 1 occurrences migrated to:
  https://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html ([https](https://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html) result 301).
* [ ] http://mockito.org/ (301) with 1 occurrences migrated to:
  https://mockito.github.io ([https](https://mockito.org/) result 301).
* [ ] http://mydomain1.com with 36 occurrences migrated to:
  https://mydomain1.com ([https](https://mydomain1.com) result 301).
* [ ] http://mydomain1.com/ with 2 occurrences migrated to:
  https://mydomain1.com/ ([https](https://mydomain1.com/) result 301).
* [ ] http://mydomain1.com/path with 2 occurrences migrated to:
  https://mydomain1.com/path ([https](https://mydomain1.com/path) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-2660 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-2660 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-2660) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-2754 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-2754 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-2754) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-2789 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-2789 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-2789) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3026 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3026 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3026) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3038 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3038 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3038) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3127 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3127 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3127) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3775 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3775 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3775) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3880 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3880 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3880) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3896 with 7 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3896 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3896) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3949 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3949 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3949) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-3960 with 1 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-3960 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-3960) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-4008 with 2 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-4008 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-4008) result 301).
* [ ] http://opensource.atlassian.com/projects/spring/browse/SPR-4040 with 2 occurrences migrated to:
  https://opensource.atlassian.com/projects/spring/browse/SPR-4040 ([https](https://opensource.atlassian.com/projects/spring/browse/SPR-4040) result 301).
* [ ] http://projects.spring.io/spring-webflow with 1 occurrences migrated to:
  https://projects.spring.io/spring-webflow ([https](https://projects.spring.io/spring-webflow) result 301).
* [ ] http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//topic/com.ibm.websphere.base.doc/info/aes/ae/rdat_extiapi.html with 1 occurrences migrated to:
  https://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//topic/com.ibm.websphere.base.doc/info/aes/ae/rdat_extiapi.html ([https](https://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//topic/com.ibm.websphere.base.doc/info/aes/ae/rdat_extiapi.html) result 301).
* [ ] http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.javadoc.doc/public_html/api/com/ibm/websphere/rsadapter/JDBCConnectionSpec.html with 1 occurrences migrated to:
  https://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.javadoc.doc/public_html/api/com/ibm/websphere/rsadapter/JDBCConnectionSpec.html ([https](https://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.javadoc.doc/public_html/api/com/ibm/websphere/rsadapter/JDBCConnectionSpec.html) result 301).
* [ ] http://site2.com with 2 occurrences migrated to:
  https://site2.com ([https](https://site2.com) result 301).
* [ ] http://sourceforge.net/projects/c3p0 with 2 occurrences migrated to:
  https://sourceforge.net/projects/c3p0 ([https](https://sourceforge.net/projects/c3p0) result 301).
* [ ] http://sourceforge.net/projects/javadiff with 1 occurrences migrated to:
  https://sourceforge.net/projects/javadiff ([https](https://sourceforge.net/projects/javadiff) result 301).
* [ ] http://springframework.org with 2 occurrences migrated to:
  https://springframework.org ([https](https://springframework.org) result 301).
* [ ] http://www-01.ibm.com/software/webservers/appserv/was/ with 1 occurrences migrated to:
  https://www-01.ibm.com/software/webservers/appserv/was/ ([https](https://www-01.ibm.com/software/webservers/appserv/was/) result 301).
* [ ] http://www.atomenabled.org/developers/syndication/ with 1 occurrences migrated to:
  https://www.atomenabled.org/developers/syndication/ ([https](https://www.atomenabled.org/developers/syndication/) result 301).
* [ ] http://www.eclipse.org/aspectj with 2 occurrences migrated to:
  https://www.eclipse.org/aspectj ([https](https://www.eclipse.org/aspectj) result 301).
* [ ] http://www.google.com/ig/calculator?q=1USD=?EUR with 1 occurrences migrated to:
  https://www.google.com/ig/calculator?q=1USD=?EUR ([https](https://www.google.com/ig/calculator?q=1USD=?EUR) result 301).
* [ ] http://www.gradle.org/ with 1 occurrences migrated to:
  https://www.gradle.org/ ([https](https://www.gradle.org/) result 301).
* [ ] http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html with 1 occurrences migrated to:
  https://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html ([https](https://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html) result 301).
* [ ] http://www.jboss.org/jbossas/ with 1 occurrences migrated to:
  https://www.jboss.org/jbossas/ ([https](https://www.jboss.org/jbossas/) result 301).
* [ ] http://www.junit.org/ with 1 occurrences migrated to:
  https://www.junit.org/ ([https](https://www.junit.org/) result 301).
* [ ] http://www.mnot.net/cache_docs with 1 occurrences migrated to:
  https://www.mnot.net/cache_docs ([https](https://www.mnot.net/cache_docs) result 301).
* [ ] http://www.oracle.com/technetwork/java/javase/downloads with 1 occurrences migrated to:
  https://www.oracle.com/technetwork/java/javase/downloads ([https](https://www.oracle.com/technetwork/java/javase/downloads) result 301).
* [ ] http://www.sf.net/home.view?siteLanguage=nl with 1 occurrences migrated to:
  https://www.sf.net/home.view?siteLanguage=nl ([https](https://www.sf.net/home.view?siteLanguage=nl) result 301).
* [ ] http://www.springframework.org with 7 occurrences migrated to:
  https://www.springframework.org ([https](https://www.springframework.org) result 301).
* [ ] http://www.springframework.org/ with 3 occurrences migrated to:
  https://www.springframework.org/ ([https](https://www.springframework.org/) result 301).
* [ ] http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html with 1 occurrences migrated to:
  https://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html ([https](https://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html) result 301).
* [ ] http://commons.apache.org/codec/ with 1 occurrences migrated to:
  https://commons.apache.org/codec/ ([https](https://commons.apache.org/codec/) result 302).
* [ ] http://download.oracle.com/javaee/6/api/javax/inject/Scope.html with 1 occurrences migrated to:
  https://download.oracle.com/javaee/6/api/javax/inject/Scope.html ([https](https://download.oracle.com/javaee/6/api/javax/inject/Scope.html) result 302).
* [ ] http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html with 4 occurrences migrated to:
  https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html ([https](https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html) result 302).
* [ ] http://download.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html with 1 occurrences migrated to:
  https://download.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html ([https](https://download.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html) result 302).
* [ ] http://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html with 1 occurrences migrated to:
  https://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html ([https](https://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html) result 302).
* [ ] http://download.oracle.com/javase/jndi/tutorial/beyond/misc/policy.html with 1 occurrences migrated to:
  https://download.oracle.com/javase/jndi/tutorial/beyond/misc/policy.html ([https](https://download.oracle.com/javase/jndi/tutorial/beyond/misc/policy.html) result 302).
* [ ] http://gafter.blogspot.nl/2006/12/super-type-tokens.html with 1 occurrences migrated to:
  https://gafter.blogspot.nl/2006/12/super-type-tokens.html ([https](https://gafter.blogspot.nl/2006/12/super-type-tokens.html) result 302).
* [ ] http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project with 1 occurrences migrated to:
  https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project ([https](https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project) result 302).
* [ ] http://git-scm.com/book/en/Git-Tools-Rewriting-History with 1 occurrences migrated to:
  https://git-scm.com/book/en/Git-Tools-Rewriting-History ([https](https://git-scm.com/book/en/Git-Tools-Rewriting-History) result 302).
* [ ] http://glassfish.dev.java.net/ with 1 occurrences migrated to:
  https://glassfish.dev.java.net/ ([https](https://glassfish.dev.java.net/) result 302).
* [ ] http://java.sun.com with 3 occurrences migrated to:
  https://java.sun.com ([https](https://java.sun.com) result 302).
* [ ] http://java.sun.com/docs/books/jls/third_edition/html/conversions.html with 1 occurrences migrated to:
  https://java.sun.com/docs/books/jls/third_edition/html/conversions.html ([https](https://java.sun.com/docs/books/jls/third_edition/html/conversions.html) result 302).
* [ ] http://java.sun.com/docs/books/jls/third_edition/html/expressions.html with 1 occurrences migrated to:
  https://java.sun.com/docs/books/jls/third_edition/html/expressions.html ([https](https://java.sun.com/docs/books/jls/third_edition/html/expressions.html) result 302).
* [ ] http://java.sun.com/j2se/ with 2 occurrences migrated to:
  https://java.sun.com/j2se/ ([https](https://java.sun.com/j2se/) result 302).
* [ ] http://java.sun.com/j2se/1.4.1/docs/tooldocs/solaris/javadoc.html with 1 occurrences migrated to:
  https://java.sun.com/j2se/1.4.1/docs/tooldocs/solaris/javadoc.html ([https](https://java.sun.com/j2se/1.4.1/docs/tooldocs/solaris/javadoc.html) result 302).
* [ ] http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html with 1 occurrences migrated to:
  https://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html ([https](https://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html) result 302).
* [ ] http://java.sun.com/j2se/javadoc with 1 occurrences migrated to:
  https://java.sun.com/j2se/javadoc ([https](https://java.sun.com/j2se/javadoc) result 302).
* [ ] http://java.sun.com/j2se/javadoc/ with 1 occurrences migrated to:
  https://java.sun.com/j2se/javadoc/ ([https](https://java.sun.com/j2se/javadoc/) result 302).
* [ ] http://java.sun.com/j2se/javadoc/faq.html with 1 occurrences migrated to:
  https://java.sun.com/j2se/javadoc/faq.html ([https](https://java.sun.com/j2se/javadoc/faq.html) result 302).
* [ ] http://java.sun.com/webservices/jaxb/ with 1 occurrences migrated to:
  https://java.sun.com/webservices/jaxb/ ([https](https://java.sun.com/webservices/jaxb/) result 302).
* [ ] http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd with 1 occurrences migrated to:
  https://java.sun.com/xml/ns/j2ee/connector_1_5.xsd ([https](https://java.sun.com/xml/ns/j2ee/connector_1_5.xsd) result 302).
* [ ] http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd with 2 occurrences migrated to:
  https://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd ([https](https://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd) result 302).
* [ ] http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd with 4 occurrences migrated to:
  https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd ([https](https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd) result 302).
* [ ] http://repo.spring.io/milestone/org/springframework/spring with 1 occurrences migrated to:
  https://repo.spring.io/milestone/org/springframework/spring ([https](https://repo.spring.io/milestone/org/springframework/spring) result 302).
* [ ] http://repo.spring.io/release with 1 occurrences migrated to:
  https://repo.spring.io/release ([https](https://repo.spring.io/release) result 302).
* [ ] http://repo.spring.io/release/org/springframework/spring with 1 occurrences migrated to:
  https://repo.spring.io/release/org/springframework/spring ([https](https://repo.spring.io/release/org/springframework/spring) result 302).
* [ ] http://repo.spring.io/snapshot/org/springframework/spring with 1 occurrences migrated to:
  https://repo.spring.io/snapshot/org/springframework/spring ([https](https://repo.spring.io/snapshot/org/springframework/spring) result 302).
* [ ] http://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download with 1 occurrences migrated to:
  https://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download ([https](https://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download) result 302).
* [ ] http://other.info/foo/bar (301) with 1 occurrences migrated to:
  https://weibo.com/otherinfo/foo/bar ([https](https://other.info/foo/bar) result 302).
* [ ] http://www.iana.org/assignments/http-status-codes with 1 occurrences migrated to:
  https://www.iana.org/assignments/http-status-codes ([https](https://www.iana.org/assignments/http-status-codes) result 302).
* [ ] http://www.sys-con.com/java with 1 occurrences migrated to:
  https://www.sys-con.com/java ([https](https://www.sys-con.com/java) result 302).

These URLs were intentionally ignored.

* http://Additional-namespace-name-URI with 1 occurrences
* http://Default-namespace-name-URI with 1 occurrences
* http://HOST:8080/remoting/AccountService with 1 occurrences
* http://Namespace-name-URI with 1 occurrences
* http://Unbound-namespace-name-URI with 1 occurrences
* http://anotherHost/mvc-showcase with 1 occurrences
* http://apache.org/xml/features/disallow-doctype-decl with 14 occurrences
* http://barfoo:8888 with 1 occurrences
* http://example/ with 1 occurrences
* http://fake-service with 7 occurrences
* http://foobar:8088 with 1 occurrences
* http://host:port/myApp/myEndpoint/ with 1 occurrences
* http://java.sun.com/jsp/jstl/core with 1 occurrences
* http://java.sun.com/xml/jaxp/properties/schemaLanguage with 1 occurrences
* http://java.sun.com/xml/ns/j2ee with 6 occurrences
* http://java.sun.com/xml/ns/javaee with 8 occurrences
* http://java.sun.com/xml/ns/persistence with 1 occurrences
* http://java.sun.com/xml/stream/properties/report-cdata-event with 1 occurrences
* http://jaxws.remoting.springframework.org/ with 4 occurrences
* http://localhost with 13 occurrences
* http://localhost/ with 14 occurrences
* http://localhost/42 with 1 occurrences
* http://localhost/?cookie=foo with 1 occurrences
* http://localhost/abc with 1 occurrences
* http://localhost/abc/def with 1 occurrences
* http://localhost/app%20/path/ with 1 occurrences
* http://localhost/app/path%20with%20spaces/ with 1 occurrences
* http://localhost/bar with 1 occurrences
* http://localhost/content with 1 occurrences
* http://localhost/content.atom with 1 occurrences
* http://localhost/context/a with 3 occurrences
* http://localhost/contextPath/main/path with 1 occurrences
* http://localhost/foo/bar with 1 occurrences
* http://localhost/forward with 1 occurrences
* http://localhost/hotels/42/bookings/21 with 4 occurrences
* http://localhost/input with 1 occurrences
* http://localhost/jquery-1.11.0.min.js with 5 occurrences
* http://localhost/messages/form with 1 occurrences
* http://localhost/mvc-showcase with 2 occurrences
* http://localhost/mvc-showcase/app with 1 occurrences
* http://localhost/mvc-showcase/data/foo%20bar with 1 occurrences
* http://localhost/mvc-showcase/data/param with 1 occurrences
* http://localhost/mvc-showcase/data/param?foo=123 with 2 occurrences
* http://localhost/myapp/main with 1 occurrences
* http://localhost/myapp/people/1/addresses/DE with 1 occurrences
* http://localhost/path;a=b/with/semicolon with 1 occurrences
* http://localhost/persons with 1 occurrences
* http://localhost/prefix with 1 occurrences
* http://localhost/prefix/app with 1 occurrences
* http://localhost/prefix/bar with 1 occurrences
* http://localhost/prefix/mvc-showcase with 3 occurrences
* http://localhost/query= with 1 occurrences
* http://localhost/query=foo@bar with 1 occurrences
* http://localhost/registration.html with 1 occurrences
* http://localhost/rest/books/6/pages/1.json with 1 occurrences
* http://localhost/something/1/foo with 1 occurrences
* http://localhost/something/optional-param with 1 occurrences
* http://localhost/test with 4 occurrences
* http://localhost/test/this with 3 occurrences
* http://localhost:7070/example/adminhandle.vm with 1 occurrences
* http://localhost:7070/example/bingo.html with 1 occurrences
* http://localhost:80/jquery-1.11.0.min.js with 1 occurrences
* http://localhost:8080 with 28 occurrences
* http://localhost:8080/ with 4 occurrences
* http://localhost:8080/OrderService with 3 occurrences
* http://localhost:8080/context with 1 occurrences
* http://localhost:8080/context/myapiresource with 1 occurrences
* http://localhost:8080/gamecast/admin/index.html with 1 occurrences
* http://localhost:8080/gamecast/display.html with 1 occurrences
* http://localhost:8080/gamecast/displayShoppingCart.html with 1 occurrences
* http://localhost:8080/jquery-1.11.0.min.js with 1 occurrences
* http://localhost:8080/mvc-showcase with 1 occurrences
* http://localhost:8080/myapiresource with 1 occurrences
* http://localhost:8080/myapp/js/sockjs-client.js with 1 occurrences
* http://localhost:8080/path with 1 occurrences
* http://localhost:8080/people with 2 occurrences
* http://localhost:8080/portfolio with 1 occurrences
* http://localhost:8080/test/ with 2 occurrences
* http://localhost:8888/AccountServiceEndpoint?WSDL with 1 occurrences
* http://localhost:9000 with 5 occurrences
* http://localhost:9090 with 18 occurrences
* http://localhost:9090/jquery-1.11.0.min.js with 2 occurrences
* http://localhost:9990/mail/messages/form with 1 occurrences
* http://localhost:9999/ with 1 occurrences
* http://localhost:9999/OrderService?wsdl with 4 occurrences
* http://localhosta/testbean with 6 occurrences
* http://myserver with 1 occurrences
* http://myurl with 12 occurrences
* http://remotehost:8080/remoting/AccountService with 2 occurrences
* http://samples.springframework.org/flight with 42 occurrences
* http://somethingDifferent with 1 occurrences
* http://springframework.org/spring-ws with 17 occurrences
* http://test.com with 1 occurrences
* http://test.com/ with 1 occurrences
* http://testng.org/ with 1 occurrences
* http://tiles.apache.org/tags-tiles with 1 occurrences
* http://www with 1 occurrences
* http://www.foo.com/schema/component with 6 occurrences
* http://www.mycompany.com/schema/myns with 4 occurrences
* http://www.springframework.org/schema/aop with 48 occurrences
* http://www.springframework.org/schema/beans with 340 occurrences
* http://www.springframework.org/schema/beans/test with 2 occurrences
* http://www.springframework.org/schema/c with 1 occurrences
* http://www.springframework.org/schema/cache with 15 occurrences
* http://www.springframework.org/schema/context with 44 occurrences
* http://www.springframework.org/schema/jdbc with 18 occurrences
* http://www.springframework.org/schema/jee with 24 occurrences
* http://www.springframework.org/schema/jms with 19 occurrences
* http://www.springframework.org/schema/lang with 26 occurrences
* http://www.springframework.org/schema/mvc with 22 occurrences
* http://www.springframework.org/schema/oxm with 16 occurrences
* http://www.springframework.org/schema/p with 5 occurrences
* http://www.springframework.org/schema/task with 14 occurrences
* http://www.springframework.org/schema/tool with 205 occurrences
* http://www.springframework.org/schema/tx with 35 occurrences
* http://www.springframework.org/schema/tx/spring-tx.xsd__ with 1 occurrences
* http://www.springframework.org/schema/util with 24 occurrences
* http://www.springframework.org/schema/websocket with 30 occurrences
* http://www.springframework.org/spring-ws with 1 occurrences
* http://www.springframework.org/tags with 4 occurrences
* http://www.springframework.org/tags/form with 2 occurrences
* http://www.w3.org/1999/XSL/Transform with 8 occurrences
* http://www.w3.org/2001/XMLSchema with 126 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 90 occurrences
* http://www.w3.org/2005/Atom with 4 occurrences
* http://www.w3.org/TR/html4/charset.html with 5 occurrences
* http://www.w3.org/TR/html4/sgml/entities.html with 14 occurrences
* http://www.w3.org/XML/1998/namespace with 21 occurrences
* http://xml.org/sax/features/ with 4 occurrences
* http://xml.org/sax/features/external-general-entities with 14 occurrences
* http://xml.org/sax/features/is-standalone with 1 occurrences
* http://xml.org/sax/features/namespace-prefixes with 13 occurrences
* http://xml.org/sax/features/namespaces with 12 occurrences
* http://xml.org/sax/features/namespaces-prefixes with 1 occurrences
* http://xml.org/sax/properties/lexical-handler with 13 occurrences

Closes gh-22678
2019-03-27 13:14:57 +01:00
Sam Brannen 949f674cda URL Cleanup - Fix broken tests
See gh-22672
2019-03-27 12:58:03 +01:00
Sam Brannen 52650d048a URL Cleanup - Polishing
See gh-22672
2019-03-27 12:58:03 +01:00
Sam Brannen fe887c86e6 URL Cleanup - remove obsolete ATOM schema location
See gh-22672
2019-03-27 12:28:49 +01:00
Spring Operator d40ed0942b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://castor.org/mapping.dtd (301) with 1 occurrences could not be migrated:
   ([https](https://castor.org/mapping.dtd) result AnnotatedConnectException).
* [ ] http://mydomain2.com (302) with 2 occurrences could not be migrated:
   ([https](https://mydomain2.com) result ConnectTimeoutException).
* [ ] http://www.foo.com/schema/component/component.xsd (404) with 1 occurrences could not be migrated:
   ([https](https://www.foo.com/schema/component/component.xsd) result SSLHandshakeException).

These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://www.kbcafe.com/rss/atom.xsd.xml (ConnectTimeoutException) with 1 occurrences migrated to:
  https://www.kbcafe.com/rss/atom.xsd.xml ([https](https://www.kbcafe.com/rss/atom.xsd.xml) result ConnectTimeoutException).
* [ ] http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd (ReadTimeoutException) with 5 occurrences migrated to:
  https://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd ([https](https://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd) result ReadTimeoutException).
* [ ] http://domain1.com (UnknownHostException) with 2 occurrences migrated to:
  https://domain1.com ([https](https://domain1.com) result UnknownHostException).
* [ ] http://domain2.com (UnknownHostException) with 1 occurrences migrated to:
  https://domain2.com ([https](https://domain2.com) result UnknownHostException).
* [ ] http://mydomain1.com,http://mydomain2.com (UnknownHostException) with 1 occurrences migrated to:
  https://mydomain1.com,http://mydomain2.com ([https](https://mydomain1.com,https://mydomain2.com) result UnknownHostException).
* [ ] http://mydomain3.com,http://mydomain4.com (UnknownHostException) with 1 occurrences migrated to:
  https://mydomain3.com,http://mydomain4.com ([https](https://mydomain3.com,https://mydomain4.com) result UnknownHostException).
* [ ] http://www.springframework.org/schema/beans/factory/xml/support/CustomNamespaceHandlerTests.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/factory/xml/support/CustomNamespaceHandlerTests.xsd ([https](https://www.springframework.org/schema/beans/factory/xml/support/CustomNamespaceHandlerTests.xsd) result 404).

These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://example.com with 1 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd (301) with 2 occurrences migrated to:
  https://hibernate.org/dtd/hibernate-mapping-3.0.dtd ([https](https://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd) result 200).
* [ ] http://testng.org/testng-1.0.dtd with 3 occurrences migrated to:
  https://testng.org/testng-1.0.dtd ([https](https://testng.org/testng-1.0.dtd) result 200).
* [ ] http://tiles.apache.org/dtds/tiles-config_2_0.dtd with 3 occurrences migrated to:
  https://tiles.apache.org/dtds/tiles-config_2_0.dtd ([https](https://tiles.apache.org/dtds/tiles-config_2_0.dtd) result 200).
* [ ] http://tiles.apache.org/dtds/tiles-config_2_1.dtd with 2 occurrences migrated to:
  https://tiles.apache.org/dtds/tiles-config_2_1.dtd ([https](https://tiles.apache.org/dtds/tiles-config_2_1.dtd) result 200).
* [ ] http://tiles.apache.org/dtds/tiles-config_3_0.dtd with 4 occurrences migrated to:
  https://tiles.apache.org/dtds/tiles-config_3_0.dtd ([https](https://tiles.apache.org/dtds/tiles-config_3_0.dtd) result 200).
* [ ] http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd with 1 occurrences migrated to:
  https://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd ([https](https://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd) result 200).
* [ ] http://www.springframework.org/dtd/spring-beans-2.0.dtd with 214 occurrences migrated to:
  https://www.springframework.org/dtd/spring-beans-2.0.dtd ([https](https://www.springframework.org/dtd/spring-beans-2.0.dtd) result 200).
* [ ] http://www.springframework.org/schema/aop/spring-aop-2.0.xsd with 69 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-2.0.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/aop/spring-aop-2.5.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-2.5.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/aop/spring-aop-3.0.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-3.0.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/aop/spring-aop.xsd with 7 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop.xsd ([https](https://www.springframework.org/schema/aop/spring-aop.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-2.0.xsd with 115 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-2.5.xsd with 44 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.5.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.0.xsd with 10 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.1.xsd with 34 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.2.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.1.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.2.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.2.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans-4.3.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-4.3.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-4.3.xsd) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans.xsd with 141 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/cache/spring-cache.xsd with 10 occurrences migrated to:
  https://www.springframework.org/schema/cache/spring-cache.xsd ([https](https://www.springframework.org/schema/cache/spring-cache.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-2.5.xsd with 42 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-2.5.xsd ([https](https://www.springframework.org/schema/context/spring-context-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-3.0.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.0.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-3.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.1.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.2.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-4.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-4.0.xsd ([https](https://www.springframework.org/schema/context/spring-context-4.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-4.2.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-4.2.xsd ([https](https://www.springframework.org/schema/context/spring-context-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context-4.3.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-4.3.xsd ([https](https://www.springframework.org/schema/context/spring-context-4.3.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd) result 200).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc.xsd) result 200).
* [ ] http://www.springframework.org/schema/jee/spring-jee-3.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jee/spring-jee-3.1.xsd ([https](https://www.springframework.org/schema/jee/spring-jee-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/jms/spring-jms-4.1.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms-4.1.xsd ([https](https://www.springframework.org/schema/jms/spring-jms-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/jms/spring-jms-4.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms-4.2.xsd ([https](https://www.springframework.org/schema/jms/spring-jms-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang-2.0.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang-2.0.xsd ([https](https://www.springframework.org/schema/lang/spring-lang-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang-2.5.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang-2.5.xsd ([https](https://www.springframework.org/schema/lang/spring-lang-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang-3.0.xsd ([https](https://www.springframework.org/schema/lang/spring-lang-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang-3.1.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang-3.1.xsd ([https](https://www.springframework.org/schema/lang/spring-lang-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang-4.2.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang-4.2.xsd ([https](https://www.springframework.org/schema/lang/spring-lang-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/lang/spring-lang.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang.xsd ([https](https://www.springframework.org/schema/lang/spring-lang.xsd) result 200).
* [ ] http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/mvc/spring-mvc.xsd with 26 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc.xsd) result 200).
* [ ] http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd ([https](https://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/task/spring-task-4.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task-4.1.xsd ([https](https://www.springframework.org/schema/task/spring-task-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/task/spring-task.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task.xsd ([https](https://www.springframework.org/schema/task/spring-task.xsd) result 200).
* [ ] http://www.springframework.org/schema/tx/spring-tx-2.5.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-2.5.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/tx/spring-tx-4.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-4.0.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-4.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/tx/spring-tx.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx.xsd ([https](https://www.springframework.org/schema/tx/spring-tx.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-2.0.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-2.0.xsd ([https](https://www.springframework.org/schema/util/spring-util-2.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-2.5.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-2.5.xsd ([https](https://www.springframework.org/schema/util/spring-util-2.5.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-3.0.xsd ([https](https://www.springframework.org/schema/util/spring-util-3.0.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-3.1.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-3.1.xsd ([https](https://www.springframework.org/schema/util/spring-util-3.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-4.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-4.1.xsd ([https](https://www.springframework.org/schema/util/spring-util-4.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util-4.2.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-4.2.xsd ([https](https://www.springframework.org/schema/util/spring-util-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/util/spring-util.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util.xsd ([https](https://www.springframework.org/schema/util/spring-util.xsd) result 200).
* [ ] http://www.springframework.org/schema/websocket/spring-websocket.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/websocket/spring-websocket.xsd ([https](https://www.springframework.org/schema/websocket/spring-websocket.xsd) result 200).
* [ ] http://www.w3.org/1999/02/22-rdf-syntax-ns with 2 occurrences migrated to:
  https://www.w3.org/1999/02/22-rdf-syntax-ns ([https](https://www.w3.org/1999/02/22-rdf-syntax-ns) result 200).
* [ ] http://mydomain1.com with 2 occurrences migrated to:
  https://mydomain1.com ([https](https://mydomain1.com) result 301).
* [ ] http://www.springframework.org with 1 occurrences migrated to:
  https://www.springframework.org ([https](https://www.springframework.org) result 301).
* [ ] http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a78d3275191014b41bae7c4a46d835/content.htm with 1 occurrences migrated to:
  https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a78d3275191014b41bae7c4a46d835/content.htm ([https](https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a78d3275191014b41bae7c4a46d835/content.htm) result 302).
* [ ] http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd with 1 occurrences migrated to:
  https://java.sun.com/xml/ns/j2ee/connector_1_5.xsd ([https](https://java.sun.com/xml/ns/j2ee/connector_1_5.xsd) result 302).
* [ ] http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd with 1 occurrences migrated to:
  https://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd ([https](https://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd) result 302).
* [ ] http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd with 12 occurrences migrated to:
  https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ([https](https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd) result 302).
* [ ] http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd with 1 occurrences migrated to:
  https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd ([https](https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd) result 302).
* [ ] http://purl.org/dc/dcmitype/StillImage with 2 occurrences migrated to:
  https://purl.org/dc/dcmitype/StillImage ([https](https://purl.org/dc/dcmitype/StillImage) result 302).

These URLs were intentionally ignored.

* http://creativecommons.org/ns with 2 occurrences
* http://java.sun.com/dtd/properties.dtd with 4 occurrences
* http://java.sun.com/xml/ns/j2ee with 2 occurrences
* http://java.sun.com/xml/ns/javaee with 2 occurrences
* http://java.sun.com/xml/ns/persistence with 27 occurrences
* http://localhost:8080 with 3 occurrences
* http://purl.org/dc/elements/1.1/ with 2 occurrences
* http://samples.springframework.org/flight with 7 occurrences
* http://schemas.microsoft.com/visio/2003/SVGExtensions/ with 7 occurrences
* http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd with 2 occurrences
* http://www.foo.com/schema/component with 2 occurrences
* http://www.greeting.com/goodbye/ with 1 occurrences
* http://www.greeting.com/hello/ with 1 occurrences
* http://www.inkscape.org/namespaces/inkscape with 2 occurrences
* http://www.quartz-scheduler.org/xml/JobSchedulingData with 2 occurrences
* http://www.springframework.org/schema/aop with 178 occurrences
* http://www.springframework.org/schema/beans with 717 occurrences
* http://www.springframework.org/schema/beans/test with 2 occurrences
* http://www.springframework.org/schema/c with 9 occurrences
* http://www.springframework.org/schema/cache with 20 occurrences
* http://www.springframework.org/schema/context with 130 occurrences
* http://www.springframework.org/schema/jdbc with 66 occurrences
* http://www.springframework.org/schema/jee with 2 occurrences
* http://www.springframework.org/schema/jms with 20 occurrences
* http://www.springframework.org/schema/lang with 33 occurrences
* http://www.springframework.org/schema/mvc with 60 occurrences
* http://www.springframework.org/schema/oxm with 2 occurrences
* http://www.springframework.org/schema/p with 16 occurrences
* http://www.springframework.org/schema/task with 14 occurrences
* http://www.springframework.org/schema/tx with 12 occurrences
* http://www.springframework.org/schema/util with 28 occurrences
* http://www.springframework.org/schema/websocket with 22 occurrences
* http://www.w3.org/2000/svg with 9 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 376 occurrences
* http://www.w3.org/2005/Atom with 2 occurrences

Closes gh-22672
2019-03-27 12:28:09 +01:00
Sam Brannen 4af5229a2c Verify that CssLinkResourceTransformer handles empty url() links
This commit introduces a test that verifies that
CssLinkResourceTransformer properly handles empty url() functions in
CSS files.

See gh-22602
2019-03-26 19:13:37 +01:00
Juergen Hoeller ae2ecf05ff Upgrade to Tomcat 8.5.39 2019-03-26 17:41:50 +01:00
Juergen Hoeller c192c14a9f Polishing 2019-03-26 17:41:29 +01:00
Sam Brannen d397d74ea5 Test fix in gh-22638 2019-03-26 14:18:22 +01:00
Sam Brannen b36935689c Avoid duplicate registration of [RequestBody|ResponseBody]Advice
Prior to this commit, if a @ControllerAdvice bean implemented both
RequestBodyAdvice and ResponseBodyAdvice, it was registered twice in
RequestMappingHandlerAdapter, leading to duplicate application of the
same logic.

This commit ensures that such instances are only registered once.

Fixes gh-22638
2019-03-26 14:15:47 +01:00
Sam Brannen 47e88aaf43 Allow ResponseBodyAdvice to implement RequestBodyAdvice
Prior to this commit, if a @ControllerAdvice bean implemented both
RequestBodyAdvice and ResponseBodyAdvice, it was only supported as
RequestBodyAdvice, meaning it was never invoked as ResponseBodyAdvice.

This commit revises RequestResponseBodyAdviceChain to ensure that a
single bean implementing both types of body advice is in fact handled
as both types of advice.

See gh-22638
2019-03-26 14:12:04 +01:00
Sam Brannen afe037e3f2 Update license.txt file
Closes gh-22659
2019-03-25 18:12:03 +01:00
Sam Brannen 41e9fcc118 Merge branch 'spring-operator-polish-urls-apache-license-4.3.x' into 4.3.x 2019-03-23 15:06:22 +01:00
Sam Brannen 3697b18766 URL Cleanup - license headers - target subpackages
This commit updates license headers for source files residing in
subpackages named `target`.

Closes gh-22632
2019-03-23 15:05:49 +01:00
Spring Operator 6c4f510496 URL Cleanup - license headers
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 5990 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

See gh-22632
2019-03-23 15:04:55 +01:00
Sebastien Deleuze 04223058f1 Fix Jackson builder modulesToInstall override behavior
This commit updates Jackson2ObjectMapperBuilder in order
to ensure that modules specified via modulesToInstall
eventually override the default ones.

Closes gh-22624
2019-03-21 11:23:09 +01:00
Rossen Stoyanchev 7e61826333 Fix @since typo 2019-03-19 14:39:25 -04:00
Rossen Stoyanchev dba9c90280 Ordered WebMvcConfigurer interceptor registrations
Closes gh-22434
2019-03-19 14:17:02 -04:00
Rossen Stoyanchev 58b17bff22 Remove framgent in ResourceUrlEncodingFilter
Closes gh-22552
2019-03-19 12:06:45 -04:00
Juergen Hoeller 86bf699121 Upgrade to Netty 4.1.34 2019-03-13 16:06:53 +01:00
Juergen Hoeller 2afaaf270d Polishing 2019-03-13 16:06:40 +01:00
Sam Brannen d9bc3b7e38 Merge branch 'spring-operator-polish-urls-build-4.3.x' into 4.3.x 2019-03-12 16:40:03 +01:00
Sam Brannen 0adabdbae0 Manual URL Cleanup
Closes gh-22520
2019-03-12 16:39:20 +01:00
Spring Operator 88390941d7 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://quartz-scheduler.org/api/2.2.1/ (301) migrated to:
  https://www.quartz-scheduler.org/api/2.2.1/ ([https](https://quartz-scheduler.org/api/2.2.1/) result 404).

## Fixed Success
These URLs were fixed successfully.

* http://commons.apache.org/proper/commons-codec/apidocs/ migrated to:
  https://commons.apache.org/proper/commons-codec/apidocs/ ([https](https://commons.apache.org/proper/commons-codec/apidocs/) result 200).
* http://commons.apache.org/proper/commons-dbcp/apidocs/ migrated to:
  https://commons.apache.org/proper/commons-dbcp/apidocs/ ([https](https://commons.apache.org/proper/commons-dbcp/apidocs/) result 200).
* http://commons.apache.org/proper/commons-lang/javadocs/api-2.5/ migrated to:
  https://commons.apache.org/proper/commons-lang/javadocs/api-2.5/ ([https](https://commons.apache.org/proper/commons-lang/javadocs/api-2.5/) result 200).
* http://dist.springsource.com/snapshot/STS/nightly-distributions.html migrated to:
  https://dist.springsource.com/snapshot/STS/nightly-distributions.html ([https](https://dist.springsource.com/snapshot/STS/nightly-distributions.html) result 200).
* http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ migrated to:
  https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ ([https](https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/) result 200).
* http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ migrated to:
  https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ ([https](https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/) result 200).
* http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/ migrated to:
  https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/ ([https](https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/) result 200).
* http://docs.oracle.com/javaee/7/api/ migrated to:
  https://docs.oracle.com/javaee/7/api/ ([https](https://docs.oracle.com/javaee/7/api/) result 200).
* http://docs.oracle.com/javase/8/docs/api/ migrated to:
  https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200).
* http://fasterxml.github.io/jackson-core/javadoc/2.8/ migrated to:
  https://fasterxml.github.io/jackson-core/javadoc/2.8/ ([https](https://fasterxml.github.io/jackson-core/javadoc/2.8/) result 200).
* http://fasterxml.github.io/jackson-databind/javadoc/2.8/ migrated to:
  https://fasterxml.github.io/jackson-databind/javadoc/2.8/ ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.8/) result 200).
* http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/ migrated to:
  https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/ ([https](https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/) result 200).
* http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ migrated to:
  https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/) result 200).
* http://issues.gradle.org/browse/GRADLE-1116 migrated to:
  https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200).
* http://portals.apache.org/pluto/portlet-2.0-apidocs/ migrated to:
  https://portals.apache.org/pluto/portlet-2.0-apidocs/ ([https](https://portals.apache.org/pluto/portlet-2.0-apidocs/) result 200).
* http://tiles.apache.org/framework/apidocs/ migrated to:
  https://tiles.apache.org/framework/apidocs/ ([https](https://tiles.apache.org/framework/apidocs/) result 200).
* http://tiles.apache.org/tiles-request/apidocs/ migrated to:
  https://tiles.apache.org/tiles-request/apidocs/ ([https](https://tiles.apache.org/tiles-request/apidocs/) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ migrated to:
  https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ ([https](https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/) result 200).
* http://ehcache.org/apidocs/ (301) migrated to:
  https://www.ehcache.org/apidocs/ ([https](https://ehcache.org/apidocs/) result 200).
* http://static.springframework.org/spring-framework/docs (301) migrated to:
  https://docs.spring.io/spring-framework/docs ([https](https://static.springframework.org/spring-framework/docs) result 301).
* http://download.eclipse.org/eclipse/downloads migrated to:
  https://download.eclipse.org/eclipse/downloads ([https](https://download.eclipse.org/eclipse/downloads) result 301).
* http://glassfish.java.net/nonav/docs/v3/api/ migrated to:
  https://glassfish.java.net/nonav/docs/v3/api/ ([https](https://glassfish.java.net/nonav/docs/v3/api/) result 301).
* http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/ migrated to:
  https://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/ ([https](https://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/) result 301).
* http://projects.spring.io/spring-framework migrated to:
  https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301).
* http://springframework.org/schema migrated to:
  https://springframework.org/schema ([https](https://springframework.org/schema) result 301).
* http://spring.io/tools/sts/all migrated to:
  https://spring.io/tools/sts/all ([https](https://spring.io/tools/sts/all) result 302).
2019-03-12 16:39:20 +01:00
Juergen Hoeller 6030014803 CollectionUtils.toIterator tolerates null Enumeration as input
See gh-22547
2019-03-08 23:04:42 +01:00
Juergen Hoeller a94c12ff9a Polishing 2019-03-07 18:43:02 +01:00
Juergen Hoeller 2b5434e46c Consistent local vs external resolution of https schema references
Closes gh-22504
2019-03-06 17:06:30 +01:00
Juergen Hoeller cebd899988 Fixed misformatted chapter id 2019-03-05 13:38:26 +01:00
Juergen Hoeller bc283ed7d7 Polishing 2019-02-28 15:59:47 +01:00
Juergen Hoeller f31f65408c Polishing 2019-02-28 14:54:23 +01:00
Juergen Hoeller 514c0b5c67 JdbcTemplate preserves order of stored procedure output parameters
Closes gh-22491
2019-02-28 14:53:57 +01:00
Juergen Hoeller 130f41028f Polishing 2019-02-27 18:12:05 +01:00
Juergen Hoeller 5c20c976df Polishing 2019-02-26 18:16:12 +01:00
Juergen Hoeller 82f1340c47 Polishing 2019-02-25 19:20:28 +01:00
Juergen Hoeller a3fb52e402 Only use payload if it actually matches declared event type
Closes gh-22426
2019-02-25 19:19:24 +01:00
Juergen Hoeller 3ec8080f36 Polishing 2019-02-15 17:59:38 +01:00
Juergen Hoeller 581b567864 Clarify role of 'aware' callback interfaces 2019-02-15 17:55:45 +01:00
Juergen Hoeller 109eaf3a16 DefaultConversionService properly converts Object[] to int[]
Closes gh-22410
2019-02-14 15:10:18 +01:00
Gemini Kim 3e1b3c32e3 Avoid duplicate Accept header values in RestTemplate
Prior to this commit, the various `HttpMessageConverter` instances
configured for a given `RestTemplate` instance could all contribute
`MediaType` values to the "Accept:" request header.

This could lead to duplicate media types in that request header,
cluttering for the HTTP request for no reason.

This commit ensures that only distinct values are added to the request.

Issue: SPR-16690
Closes gh-22320
Closes gh-21231
2019-02-11 13:00:44 +01:00
Juergen Hoeller 9865b0c080 Upgrade to Tomcat 8.5.38 2019-02-11 12:11:32 +01:00
Juergen Hoeller 95c99d63b6 Upgrade to Netty 4.1.33 2019-02-07 23:57:24 +01:00
Juergen Hoeller f3326291b1 Polishing 2019-02-07 23:57:14 +01:00
Juergen Hoeller af920544b4 AbstractAutoProxyCreator ignores unused early proxy references
Closes gh-22370
2019-02-07 23:48:55 +01:00
Juergen Hoeller 8c5cb77737 ApplicationListenerMethodAdapter uses target method for order lookup
Closes gh-22307
2019-02-07 23:48:31 +01:00
Juergen Hoeller 9a30748822 Avoid duplicate class introspection during findAnnotationOnBean
Closes gh-22318
2019-02-07 23:48:08 +01:00
Rossen Stoyanchev 596992ce3c Fix Javadoc typos
Closes gh-22261
2019-02-07 23:47:53 +01:00
Sebastien Deleuze b2ce55003a Fix truncated Value#value javadoc
Closes gh-22331
2019-02-06 19:31:09 +01:00
Spring Buildmaster d091b50720 Next Development Version 2019-01-09 09:00:51 +00:00
Juergen Hoeller a8f540ae8c Restored original log4j.properties file reference in 4.3.x branch 2019-01-08 21:18:09 +01:00
Juergen Hoeller 9767165c8d Upgrade to Tomcat 8.5.37 2019-01-08 20:58:23 +01:00
Juergen Hoeller 7be0aa0de5 Polishing 2019-01-08 20:58:10 +01:00
Juergen Hoeller e714fc533a DefaultListableBeanFactory checks for pre-converted Optional wrappers
Issue: SPR-17607
2019-01-08 20:55:55 +01:00
Juergen Hoeller c02446c5a8 Relaxed position assertion (for overflows in large inline maps)
Issue: SPR-17605

(cherry picked from commit b2756f5bd2)
2019-01-08 20:55:23 +01:00
Juergen Hoeller 21baa7287b Consistent support for EnumSet subclasses in CollectionFactory
Issue: SPR-17619

(cherry picked from commit 31a24720a6)
2019-01-08 20:55:10 +01:00
Sam Brannen 3c7887c2ae Provide external links to JUnit in published Javadoc API 2019-01-08 16:24:17 +01:00
Michel Schudel 21d3bf8db4 Fix XML parser default value handling
The xml parser does not fill in defaults provided in the XSD when
validation is disabled. As a result, attributes like default-lazy-init
will not receive the value "default" but an empty string.

With this commit, BeanDefinitionParserDelegate now takes this into
account, checking default values against empty string as well as
"default".

As a consequence, default-lazy-init attribute should now work correctly
even when the XSD validation is disabled.

Issue: SPR-8335
2019-01-08 15:07:41 +01:00
Juergen Hoeller ce05a5b5c0 Polishing 2018-12-12 13:04:59 +01:00
Juergen Hoeller b00f98fccf Revised SimpleEvaluationContext example
Issue: SPR-17581
2018-12-12 13:04:51 +01:00
Juergen Hoeller 7ff1b0e01d Clarified VfsResource constructor
Issue: SPR-17563

(cherry picked from commit 50e5bdb813)
2018-12-04 22:35:04 +01:00
Juergen Hoeller 792991a88b Cleanup after unexpected exception from external delegation call
Issue: SPR-17559

(cherry picked from commit c024bdcc6f)
2018-12-04 02:43:52 +01:00
Juergen Hoeller b8480ea011 Polishing 2018-12-04 01:21:16 +01:00
Juergen Hoeller bf9043c737 Upgrade to POI 3.17 (and Netty 4.1.32)
Issue: SPR-17385
2018-12-04 01:20:57 +01:00
Juergen Hoeller 4decaa2da6 Revised section on custom BeanPostProcessors
Issue: SPR-17556
2018-12-04 01:20:28 +01:00
Juergen Hoeller 9d504c8e1d Avoid log statements between resource opening and returning
Issue: SPR-17559

(cherry picked from commit 7854b7ac40)
2018-12-04 01:20:19 +01:00
Juergen Hoeller 191a2d3f25 JavaMailSenderImpl calls sendMessage with empty array instead of null
Issue: SPR-17540

(cherry picked from commit 16e9b83d43)
2018-12-04 01:20:11 +01:00
Spring Buildmaster a46a437299 Next Development Version 2018-11-27 07:40:08 +00:00
Juergen Hoeller 9600e015b7 Revised alias definition example in reference documentation
Issue: SPR-17536
2018-11-25 22:30:41 +01:00
Juergen Hoeller e9f7c357b7 ResolvableType-based matching consistently respects generic factory method return type (even for pre-initialized raw singleton instance)
Issue: SPR-17524

(cherry picked from commit ebbe14c363)
2018-11-25 22:30:33 +01:00
Juergen Hoeller cf8479c8ab Upgrade to Tomcat 8.5.35, Netty 4.1.31, Gson 2.8.5, Jackson 2.8.11.3
Also includes Apache HttpClient 4.5.6 and HttpAsyncClient 4.1.4.
2018-11-24 14:23:55 +01:00
Juergen Hoeller 1c1b94285d DefaultResponseErrorHandler detects non-standard error code as well
Issue: SPR-17439
2018-11-23 20:21:30 +01:00
Juergen Hoeller 85b5c5a134 Polishing 2018-11-22 20:20:36 +01:00
Juergen Hoeller ed9afa3686 FastByteArrayOutputStream.read byte-to-int conversion
Issue: SPR-17492
2018-11-22 20:20:26 +01:00
Juergen Hoeller 22f4b1ce6b SerializedBeanFactoryReference falls back to dummy with specific id
Issue: SPR-17508

(cherry picked from commit f5aeb81473)
2018-11-22 20:20:14 +01:00
Rossen Stoyanchev abacc6d29e BEST_MATCHING_HANDLER_ATTRIBUTE for spring-webmvc
Issue: SPR-17518
2018-11-21 09:38:59 -05:00
Juergen Hoeller 8d668acbb4 Up-to-date version and link in ASM/CGLIB/Objenesis package javadoc
Issue: SPR-16405
Issue: SPR-15600
2018-11-08 17:12:05 +01:00
Juergen Hoeller 4f5ae22a52 Consistently return empty array in case of empty batch arguments
Issue: SPR-17476

(cherry picked from commit 362c59c310)
2018-11-08 14:09:44 +01:00
Juergen Hoeller 8f1f36d6fb Upgrade to Animal Sniffer 1.17, Tiles 3.0.8, Tomcat 8.5.34 2018-11-05 23:52:07 +01:00
Juergen Hoeller 79e7ba71bb Polishing 2018-11-05 23:51:54 +01:00
Juergen Hoeller f002ebd976 Explicit notes on class/method-level semantics in class hierarchies
Issue: SPR-17445

(cherry picked from commit ea3250c8d6)
2018-11-05 23:51:48 +01:00
Juergen Hoeller b43e7335b8 Polishing 2018-10-27 16:14:53 +02:00
Juergen Hoeller 6711515ef5 Exclude FactoryBean implementation methods on CGLIB proxies as well
Issue: SPR-17374

(cherry picked from commit dc1e3b4628)
2018-10-27 16:14:31 +02:00
Juergen Hoeller 47ca7b39a2 Polishing 2018-10-24 22:10:05 +02:00
Juergen Hoeller 448182fa5c ConfigurableWebApplicationContext needed for contextClass parameter
Issue: SPR-17414
2018-10-24 22:06:48 +02:00
Juergen Hoeller 46bc145196 SpringFactoriesLoader tolerates whitespace around class names
Issue: SPR-17413

(cherry picked from commit dd2ce20687)
2018-10-24 22:06:35 +02:00
Juergen Hoeller 3a4fd2c832 Avoid stacktrace if root resource is not resolvable in file system
Issue: SPR-17417

(cherry picked from commit 83a54dba7e)
2018-10-24 22:06:26 +02:00
Juergen Hoeller cd664673ed Clarify FactoryBean initialization effect in getBeanNamesForAnnotation
Issue: SPR-17392

(cherry picked from commit da23505e94)
2018-10-24 22:06:19 +02:00
Juergen Hoeller a3bdeb2c53 Clarify destruction order effect in @DependsOn annotation javadoc
Issue: SPR-17384

(cherry picked from commit 00b7782b5f)
2018-10-24 22:06:11 +02:00
Brian Clozel 9efe37e649 Fix ResourceUrlEncodingFilter lifecycle
Prior to this commit, the `ResourceUrlEncodingFilter` would wrap the
response and keep a reference to the request. When
`HttpServletResponse.encodeURL` is later called during view rendering,
the filter looks at the request and extracts context mapping information
in order to resolve resource paths in views.

This approach is flawed, when the filter is used with JSPs - if the
request is forwarded to the container by the `InternalResourceView`,
the request information is overwritten by the container. When the view
is being rendered, the information available in the request is outdated
and does not allow to correctly compute that context mapping
information.

This commit ensures that that information is being extracted from the
request as soon as the `ResourceUrlProvider` is set as a request
attribute.

Issue: SPR-17421
(Cherry-picked from cf25efc7d3)
2018-10-24 21:20:29 +02:00
Rossen Stoyanchev 8e980d9a63 Restore log level for resolved exceptions
The fix for SPR-17178 switched from debug to warn level warning for
all sub-classes of AbstractHandlerExceptionResolver where the request
concerned the DefaultHandlerExceptionResolver only.

This commit restores the original DEBUG level logging that was in
AbstractHandlerExceptionResolver from before SPR-17178. In addition
DefaultHandlerExceptionResolver registers a warnLogCategory by default
which enables warn logging and hence fulfilling the original goal
for SPR-17178.

Issue: SPR-17383
2018-10-22 12:22:18 -04:00
Spring Buildmaster f7c625cfcc Next Development Version 2018-10-15 08:48:23 +00:00
Rossen Stoyanchev 044772641d HttpRange validates requested ranges
Issue: SPR-17318
2018-10-14 23:03:34 -04:00
Juergen Hoeller d15abfdb3f Revert support for concurrent BeanPostProcessor registration in 4.3.x
Issue: SPR-17286
2018-10-14 22:12:35 +02:00
Juergen Hoeller ebe3c270cb MethodValidationInterceptor excludes FactoryBean metadata methods
Issue: SPR-17374

(cherry picked from commit 5f2d47a17e)
2018-10-14 22:12:24 +02:00
Juergen Hoeller 6c9c8efc38 Polishing 2018-10-10 00:32:07 +02:00
Juergen Hoeller b53995b5d4 Resource.lastModified() propagates 0 value if target resource exists
Issue: SPR-17320
2018-10-10 00:31:49 +02:00
Rossen Stoyanchev 547b841172 Oops, add uncommitted change for last commit. 2018-10-09 12:23:25 -04:00
Rossen Stoyanchev f61f6f2ef0 More defensive check for MockAsyncContext
Avoid automatically unwrapping the request in TestDispatcherServlet,
if we find the MockAsyncContext.

Issue: SPR-17353
2018-10-09 12:00:36 -04:00
Juergen Hoeller de1139e6a0 Polishing 2018-09-29 17:55:10 +02:00
Juergen Hoeller e978f90a19 MockHttpServletRequest allows for removing registered header entries
Issue: SPR-17295
2018-09-29 17:55:03 +02:00
Juergen Hoeller ebd92fec6d Revised javadoc for up-to-date constructor autowiring semantics
Issue: SPR-17299

(cherry picked from commit 333e327289)
2018-09-29 17:54:54 +02:00
Juergen Hoeller fa06faa3ec Use local copy set into volatile field instead of CopyOnWriteArrayList
Keep supporting legacy usage of Iterator.remove on getBeanPostProcessors result List in AbstractBeanFactoryBasedTargetSourceCreator and ScriptFactoryPostProcessor (and similarly designed integrations).

Issue: SPR-17286
2018-09-18 23:32:14 +02:00
Juergen Hoeller e94624d439 Polishing 2018-09-18 22:09:07 +02:00
Juergen Hoeller 0d1bf52122 Defensively expect concurrent registration of BeanPostProcessors
Declaring beanPostProcessors (and also embeddedValueResolvers) as CopyOnWriteArrayList prevents ConcurrentModificationExceptions in case of concurrent registration/access attempts.

Issue: SPR-17286
2018-09-18 22:09:01 +02:00
Juergen Hoeller ec1aa5c6ea Polishing 2018-09-17 14:56:55 +02:00
Juergen Hoeller 4a51f6feef Polishing 2018-09-14 14:37:06 +02:00
Juergen Hoeller 4e9046ab6e Correct linkplain javadoc in BufferingClientHttpRequestFactory
Issue: SPR-17261

(cherry picked from commit e47355078c)
2018-09-11 15:16:59 +02:00
Juergen Hoeller e873004b52 Revise ServletUriComponentsBuilder javadoc
Issue: SPR-17255
2018-09-07 18:27:32 +02:00
Spring Buildmaster 5f465d056f Next Development Version 2018-09-07 14:10:07 +00:00
Juergen Hoeller 6a5d986b33 Fix SpEL compilation for non trivial elvis operand
Issue: SPR-17214
2018-09-07 13:19:47 +02:00
Juergen Hoeller 8ce9236b0f Polishing
(cherry picked from commit 95a56cd28d)
2018-08-31 13:22:55 +02:00
Juergen Hoeller 1a626ab948 SpelExpression consistently exposes EvaluationContext to compiled AST
Operator includes explicit support for Boolean comparisons now.

Issue: SPR-17229

(cherry picked from commit 51cee658d5)
2018-08-31 13:22:14 +02:00
Juergen Hoeller 56194a1051 Transactional timeout documented as seconds in annotation javadoc
Issue: SPR-17226

(cherry picked from commit 8c6f3505c4)
2018-08-31 13:21:37 +02:00
Juergen Hoeller a496836e46 Upgrade to Tomcat 8.5.33 and Netty 4.1.29 2018-08-24 13:28:55 +02:00
Juergen Hoeller 974e7b88ee Polishing 2018-08-24 13:28:29 +02:00
Juergen Hoeller 069704f4a0 Support Jackson filters in combination with serialization view
Issue: SPR-17209

(cherry picked from commit 03f1920106)
2018-08-24 13:28:23 +02:00
Juergen Hoeller d38eb9d6a0 SimpleAliasRegistry.hasAlias properly resolves multiple chained aliases
Issue: SPR-17191

(cherry picked from commit 2ac23badee)
2018-08-17 10:04:48 +02:00
Juergen Hoeller 5bd4f88af1 Polishing 2018-08-16 12:38:07 +02:00
Juergen Hoeller b16a3229bc Polishing 2018-08-15 18:10:25 +02:00
Rossen Stoyanchev a409233e80 Consistent logging of resolved exceptions
Issue: SPR-17178
2018-08-15 11:20:32 +03:00
Juergen Hoeller 7a97ba54ea Polishing 2018-08-14 22:03:05 +02:00
Juergen Hoeller 9de85f1336 MappingJackson2JsonView does not refer to "renderedAttributes" anymore
Issue: SPR-17182
2018-08-14 22:02:31 +02:00
Juergen Hoeller 484a2f3f2d Polishing 2018-08-13 14:23:41 +02:00
Juergen Hoeller 5bd5df3ec4 Post-processors consistently ignore ScopedObject/AopInfrastructureBean
Issue: SPR-17166
2018-08-12 20:40:26 +02:00
Juergen Hoeller b51685bf00 Post-processors consistently ignore ScopedObject/AopInfrastructureBean
Issue: SPR-17166
2018-08-11 22:58:36 +02:00
Juergen Hoeller 687d350b57 Polishing 2018-08-10 18:16:14 +02:00
Juergen Hoeller 73dfa9a968 Polishing 2018-08-09 19:01:14 +02:00
Juergen Hoeller 5a66a339a6 Polishing (typo fixes etc, aligned with 5.0.x) 2018-08-09 13:04:57 +02:00
Juergen Hoeller 45598ca53a Polishing 2018-08-09 02:56:56 +02:00
Juergen Hoeller 4b30fe2b44 Polishing 2018-08-09 02:34:12 +02:00
Juergen Hoeller e94c69149e AbstractAspectJAdvisorFactory uses AnnotationUtils.getValue 2018-08-09 01:52:16 +02:00
Juergen Hoeller c69fdfadfc Polishing 2018-08-09 01:17:10 +02:00
Juergen Hoeller bd060a19ac Expose checkbox field marker as 'hidden' to RequestDataValueProcessor
Issue: SPR-17147

(cherry picked from commit fa72186e28)
2018-08-09 01:17:05 +02:00
Juergen Hoeller 5515112f87 Polishing 2018-08-07 21:23:43 +02:00
Juergen Hoeller 89cadfa8d9 Polishing 2018-08-07 02:38:54 +02:00
Juergen Hoeller 73da153e5c DisposableBean javadoc refers to singletons as well as scoped beans
Issue: SPR-17131

(cherry picked from commit f155d21c95)
2018-08-07 02:37:02 +02:00
Juergen Hoeller 75b323e6c2 Polishing 2018-08-02 17:39:39 +02:00
Juergen Hoeller 13637ec3b5 Polishing
(cherry picked from commit dc36bb34c7)
2018-08-02 15:12:54 +02:00
Juergen Hoeller 7da02fb7e3 SchedulerAccessor catches cluster race conditions on job rescheduling
Issue: SPR-17114

(cherry picked from commit fa97aab8be)
2018-08-02 15:12:41 +02:00
Juergen Hoeller 92c210201e Polishing 2018-08-01 12:32:09 +02:00
Juergen Hoeller ae6d778c3e Polishing 2018-07-31 22:25:44 +02:00
Juergen Hoeller e24ac55480 Polishing 2018-07-30 23:05:57 +02:00
Juergen Hoeller b17a6f9e03 Polishing 2018-07-27 18:41:12 +02:00
Juergen Hoeller 4c050207e7 Polishing 2018-07-26 23:37:48 +02:00
Juergen Hoeller 7ac99c1c2d Revise BeanFactory vs ApplicationContext section in reference docs
Issue: SPR-17095
2018-07-26 19:02:12 +02:00
Juergen Hoeller 42e550a178 Polishing 2018-07-26 16:00:38 +02:00
Juergen Hoeller 1b78afe445 Properly identify event-related ClassCastExceptions on JDK 11
Issue: SPR-17093

(cherry picked from commit e458777925)
2018-07-26 15:15:47 +02:00
Juergen Hoeller 001cecd46a MethodBeforeAdviceInterceptor implements BeforeAdvice marker interface
Includes related polishing in the advice interceptor implementations.

Issue: SPR-17088

(cherry picked from commit 4e03d3fdcb)
2018-07-25 20:32:34 +02:00
Juergen Hoeller 21b7dc1ce4 Backport of WebMvcConfigurationSupport javadoc revision
Includes related polishing.
2018-07-25 15:54:02 +02:00
Juergen Hoeller a403a754e9 BeanFactoryAdvisorRetrievalHelper avoids synchronization for name cache
Issue: SPR-16570
2018-07-24 16:43:25 +02:00
Juergen Hoeller 2ae2249842 Polishing 2018-07-24 15:17:33 +02:00
Juergen Hoeller 484addb4f8 Polishing 2018-07-20 17:04:17 +02:00
Juergen Hoeller 65e423219e Polishing 2018-07-20 00:41:35 +02:00
Juergen Hoeller 22fc3255b7 Polishing 2018-07-19 13:47:03 +02:00
Juergen Hoeller 322b0f431f Javadoc update: ConfigurationClassPostProcessor is priority-ordered
Issue: SPR-17062

(cherry picked from commit c66f9d8)
2018-07-19 13:46:40 +02:00
Juergen Hoeller 1ff1c950fb Consistent exposure of nested parameter type in binding exceptions
(cherry picked from commit ed54895)
2018-07-18 20:11:30 +02:00
Juergen Hoeller 1e9b2b1c07 Update ref doc references to Number/Currency/PercentStyleFormatter
Issue: SPR-17022
2018-07-18 14:43:23 +02:00
Juergen Hoeller 19e944bd4f UrlBasedViewResolver exposes redirect prefix as bean name
Issue: SPR-17045
2018-07-18 14:43:14 +02:00
Stephane Nicoll e9e864b093 Fix typo
Issue: SPR-17042
2018-07-15 16:19:46 +02:00
Juergen Hoeller f4b644dfec Polishing 2018-07-06 15:28:15 +02:00
Juergen Hoeller b129fb4b62 Upgrade to Jackson 2.8.11.2 and SLF4J 1.7.25 2018-07-06 02:10:53 +02:00
Juergen Hoeller 50f7ffddf8 Polishing 2018-07-04 23:07:08 +02:00
Juergen Hoeller 4298744c4a Polishing 2018-07-03 17:06:35 +02:00
Juergen Hoeller 44b2657c8e ConcurrentReferenceHashMap caches EntrySet in volatile field
Includes an efficient implementation of isEmpty(), not relying on a full entry count but rather backing out once a non-empty hash segment has been found.

Issue: SPR-16994
2018-07-03 17:05:38 +02:00
Juergen Hoeller 9f69638420 Same method filtering in ConstructorResolver and getTypeForFactoryMethod
Issue: SPR-16999

(cherry picked from commit 0052c89)
2018-07-03 17:05:18 +02:00
Juergen Hoeller 740751bc01 Polishing 2018-06-29 23:05:40 +02:00
Juergen Hoeller de8d4e917d Upgrade to Tomcat 8.5.32 2018-06-29 21:21:31 +02:00
Juergen Hoeller fa8acfafbf Polishing 2018-06-29 21:21:19 +02:00
Juergen Hoeller d5bfddac69 Up-to-date coverage of task executor and scheduler variants
Includes a clarification of ThreadPoolExecutor configuration options and a note on early AsyncConfigurer initialization.

Issue: SPR-16944
Issue: SPR-16945

(cherry picked from commit d58c09b)

(cherry picked from commit 5a11112)
2018-06-29 21:21:11 +02:00
Juergen Hoeller 1b0d838a19 Support for new JsonMappingException wording in Jackson 2.9
Issue: SPR-16947

(cherry picked from commit 6d0f8bf)
2018-06-29 21:20:52 +02:00
Spring Buildmaster a0f52bf633 Next Development Version 2018-06-12 14:49:55 +00:00
Juergen Hoeller a9dd927870 Remove outdated HandlerAdapter references from annotation javadoc
Includes removal of PathVariable's MultiValueMap support claim.

Issue: SPR-16936
2018-06-12 11:48:45 +02:00
Brian Clozel 323ccf99e5 Restrict HTTP methods on Servlet HiddenHttpMethodFilter
This commit restricts the allowed HTTP methods on HiddenHttpMethodFilter
(Servlet variant) to the following: PUT, DELETE, PATCH.

This filter is meant to be used to simulate those methods from HTML
forms sent by browsers, so no other methods are allowed.

Issue: SPR-16836
(Cherry-picked from f64fa3dea1)
2018-06-11 19:18:28 +02:00
Juergen Hoeller 437eca0b25 Upgrade to Netty 4.1.25 2018-06-11 17:04:18 +02:00
Juergen Hoeller 965f3c6434 Polishing 2018-06-11 17:00:51 +02:00
Juergen Hoeller 6df7ba2447 Remove outdated javadoc references to SpEL lambda functions
Issue: SPR-16930
2018-06-11 16:55:52 +02:00
Juergen Hoeller 1d6f71718d AbstractMethodMessageHandler processes Error as MessageHandlingException
Issue: SPR-16912
2018-06-11 16:49:43 +02:00
Juergen Hoeller 4a6e9a5557 ReflectivePropertyAccessor caches sorted methods per class
Issue: SPR-16882
2018-06-11 16:47:52 +02:00
Juergen Hoeller 357ca21675 Correct code example for YamlProcessor.setDocumentMatchers
Issue: SPR-16849

(cherry picked from commit 455d8ac)
2018-06-11 16:46:45 +02:00
Sebastien Deleuze 874859493b Deprecate JSONP and disable it by default in Jackson view
Issue: SPR-16798
2018-06-08 12:33:27 +02:00
Sam Brannen 75a6f3b2b6 Document JUnit Jupiter options in Spring 4.3.x
Issue: SPR-16446
2018-06-04 15:05:27 +02:00
Stephane Nicoll 88456d4799 Fix faulty BeanPostProcessorChecker logs with @EnableCaching
Issue: SPR-16896
2018-06-04 15:03:04 +02:00
Rossen Stoyanchev c44de3c5df Minor update to STOMP chapter
Issue: SPR-16861
2018-05-23 21:57:53 -04:00
Juergen Hoeller 9d1789e718 Revised code examples for stored procedure type declarations
Issue: SPR-16811
2018-05-16 09:46:39 +02:00
Juergen Hoeller 849b6ccb8b SchedulerFactoryBean triggers shutdown after registration failure
Issue: SPR-16816
2018-05-16 09:46:31 +02:00
Juergen Hoeller 997ca5cd3f Query termination for JPA 2.1 StoredProcedureQuery.execute() method
Includes backported support for JPA 2.2 getResultStream() method.

Issue: SPR-16826
2018-05-16 09:46:11 +02:00
Spring Buildmaster a54bc6650e Next Development Version 2018-05-08 07:48:37 +00:00
Juergen Hoeller 70424a7e3d Polishing 2018-05-08 00:12:18 +02:00
Juergen Hoeller 318d04cd2b Explicit coverage of root vs cause exception matching in MVC ref docs
Issue: SPR-16743

(cherry picked from commit a200df6)
2018-05-08 00:02:56 +02:00
Juergen Hoeller d9ff109b0f Polishing
(cherry picked from commit b4f83db)
2018-05-07 15:01:22 +02:00
Juergen Hoeller 8501cef98d Upgrade to Tomcat 8.5.31 2018-05-05 16:37:20 +02:00
Juergen Hoeller c99a104919 Polishing 2018-05-05 16:36:52 +02:00
Juergen Hoeller 193c289080 ResponseEntityExceptionHandler rethrows unknown exception (for further processing in DispatcherServlet's HandlerExceptionResolver chain)
Issue: SPR-16743

(cherry picked from commit 7b894fe)
2018-05-05 16:32:08 +02:00
Juergen Hoeller 9c3270ad35 Upgrade to Netty 4.1.24 2018-05-02 17:21:35 +02:00
Juergen Hoeller e4a9ade991 Consistent SpelEvaluationException messages in findAccessorForMethod
Issue: SPR-16762

(cherry picked from commit 30363c8)
2018-05-02 17:21:07 +02:00
Juergen Hoeller fbd83015b1 Expose FactoryBean's raw object on retrieval during post-processing
Issue: SPR-16783

(cherry picked from commit 9281f82)
2018-05-02 17:20:31 +02:00
Juergen Hoeller 3a15595d0c Introspect originating bean definition as configuration class candidate
Issue: SPR-16756

(cherry picked from commit c8b6233)
2018-05-02 17:15:36 +02:00
Juergen Hoeller 289a6091f1 SimpleClientHttpResponse catches any Exception on close
Issue: SPR-16773

(cherry picked from commit 21fad8e)
2018-05-02 17:15:14 +02:00
Rossen Stoyanchev 3502f6fdc2 Validate contextPath in RedirectView
Issue: SPR-16752
2018-04-23 15:27:22 -04:00
Juergen Hoeller 8d67a982ec Correctly delegate to OrderUtils.getPriority for DecoratingProxy
Issue: SPR-16739
2018-04-17 23:45:24 +02:00
Juergen Hoeller c09e10405b Workaround for generic parameter types on inner class constructors
Issue: SPR-16734
2018-04-17 15:59:08 +02:00
Juergen Hoeller 6a727e1ed7 OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
Issue: SPR-16731

(cherry picked from commit d4a55a2)
2018-04-17 13:46:37 +02:00
Rossen Stoyanchev 246a6db1ca Selector header name is exposed for configuration
Issue: SPR-16732
2018-04-17 00:20:12 -04:00
Sam Brannen 8748ba4c4b Suppress warning in SpringFailOnTimeoutTests 2018-04-14 16:46:57 +02:00
Juergen Hoeller 2989f01013 Cache-safety check for sibling loaders resolving the same classes
Issue: SPR-16714
2018-04-12 21:38:57 +02:00
Juergen Hoeller c6a7732a30 Consistent getTypeForFactoryMethod result for parameterized method
Issue: SPR-16720

(cherry picked from commit 6184c4e)
2018-04-12 21:38:12 +02:00
Juergen Hoeller e54c9d4a93 Fine-tuned JCA MessageEndpoint exception logging and propagation
Issue: SPR-16717

(cherry picked from commit 8e1ecec)
2018-04-12 21:37:45 +02:00
Juergen Hoeller ac19c696fe Revised reference example for linkable controller method signature
Issue: SPR-16710

(cherry picked from commit 7ee6130)
2018-04-12 21:37:39 +02:00
Sam Brannen fecbcd4e93 Expand scope of SpringFailOnTimeoutTests
Issue: SPR-16716
2018-04-12 10:58:21 +02:00
Igor Suhorukov 59396e1a6f Throw exception from user code in SpringFailOnTimeout even if a timeout occurs
Issue: SPR-16717
2018-04-12 10:58:21 +02:00
Juergen Hoeller c4ef47b29f Upgrade to Tomcat 8.5.30 and Netty 4.1.23 2018-04-11 16:51:10 +02:00
Juergen Hoeller c2fdd56107 Polishing 2018-04-11 16:50:48 +02:00
Juergen Hoeller 98536e1387 Proper exception for controller method return types that do not work with MvcUriComponentsBuilder (e.g. final classes)
Issue: SPR-16710
2018-04-11 16:50:38 +02:00
Spring Buildmaster ba13950d3a Next Development Version 2018-04-09 14:57:59 +00:00
Rossen Stoyanchev 0009806deb Re-use EvaluationContext in DefaultSubscriptionRegistry
Rather than create a new EvaluationContext instance per evaluation, we
now create a statically shared instance, without the root object in it,
and re-use it for all evalutations.
2018-04-09 10:05:50 -04:00
Rossen Stoyanchev 6deee3e818 TestDispatcherServlet unwraps to find mock request
Issue: SPR-16695
2018-04-06 11:21:25 -04:00
Andy Clement d3acf45ea4 Modify SpEL code gen to take account of null safe refs
With this change the code generation for method and property
references is modified to include branching logic in the
case of null safe dereferencing (?.). This is complicated
by the possible usage of primitives on the left hand side
of the dereference. To cope with this case primitives are
promoted to boxed types when this situation occurs enabling
null to be passed as a possible result.

Issue: SPR-16489
2018-04-05 14:36:36 -07:00
Spring Buildmaster 573f1d77f2 Next Development Version 2018-04-03 20:10:45 +00:00
Juergen Hoeller 1ca06537c1 Polishing 2018-04-03 13:20:09 +02:00
Juergen Hoeller 1ab0850303 Revised mime.types file with cpp extension and updated modification docs
Issue: SPR-16678

(cherry picked from commit 9601d4b)
2018-04-03 13:19:34 +02:00
Juergen Hoeller 2a9eaab674 Remove outdated declarations from spring-aspects build 2018-03-31 23:32:20 +02:00
Juergen Hoeller 1fbd38c2d8 Upgrade to Groovy 2.4.15 2018-03-31 19:54:41 +02:00
Juergen Hoeller 49eafe4261 Polishing 2018-03-31 19:54:12 +02:00
Juergen Hoeller b0ed385f84 Polishing 2018-03-31 17:06:33 +02:00
Juergen Hoeller 5d54adfb9a Selective backport of annotation retrieval refinements (from 5.0.5)
In particular AnnotationTypeFilter's ignoring of standard Java interfaces, AnnotationUtils.clearCache() and a few extra common classes in ClassUtils.

Issue: SPR-16667
Issue: SPR-16675
2018-03-31 17:03:59 +02:00
Juergen Hoeller 1cbc353dd1 Consistent Ordered.LOWEST_PRECEDENCE declarations for default order
(cherry picked from commit 6393e5c)
2018-03-31 17:02:41 +02:00
Juergen Hoeller 4cf1795359 Consistent to/cc/bcc array handling and revised hashCode without text
Issue: SPR-16671

(cherry picked from commit 1cc513d)
2018-03-31 17:02:12 +02:00
Juergen Hoeller 5629fa2c9f Pass type name into PreparedStatement.setNull in case of Types.OTHER
Issue: SPR-16669

(cherry picked from commit 9a722b4)
2018-03-31 17:01:47 +02:00
Sam Brannen 2903cb7f50 Polishing 2018-03-30 11:35:07 +02:00
Rossen Stoyanchev 986d219391 Replaces rather than prepend contextPath
Issue: SPR-16650
2018-03-29 18:26:31 -04:00
Rossen Stoyanchev de4da5ea4e Improve docs on forwarded headers
Issue: SPR-16660
2018-03-29 16:26:58 -04:00
Rossen Stoyanchev e8c656d2bc Reject invalid forwarded headers
Issue: SPR-16660
2018-03-29 16:16:20 -04:00
Juergen Hoeller bcda243f63 Polishing 2018-03-29 17:34:28 +02:00
Juergen Hoeller 64f304c333 Consistent references to primitive types (in alphabetical order)
(cherry picked from commit 08dad4e)
2018-03-29 17:33:13 +02:00
Juergen Hoeller 5f6b04251e Workaround for inner class constructor parameter annotation bug in javac
Issue: SPR-16652

(cherry picked from commit 53d0139)
2018-03-29 17:30:07 +02:00
Juergen Hoeller 618cb6155c Correct description for doWithLocalFields
Issue: SPR-16658

(cherry picked from commit 3ac46da)
2018-03-29 17:29:58 +02:00
nkjackzhang f3dd22da5b NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly
In my opinion, we should parse ":{x}" style parameter as "x" is parameter using "NamedParameterUtils.parseSqlStatement",
so the condition "j - i > 2" is the correct condition, not "j - i > 3", because if "i" is the index of
":" in ":{x}", and "j" is the index of "}" in ":{x}",  "j - i == 3" is true.
Also add a test case for SPR-16663.

(cherry picked from commit 82cb5db)
2018-03-29 17:21:00 +02:00
Rossen Stoyanchev 6e4bbac6f7 MvcResult returns asyncResult after asyncDispatch
Issue: SPR-16648
2018-03-28 22:27:30 -04:00
Rossen Stoyanchev 2e4963fca3 Revert "Always specify charset for form data requests"
This reverts commit 1897d8e858.

Issue: SPR-16613
2018-03-28 11:58:24 -04:00
Juergen Hoeller 4d0adc7d95 Upgrade to Tomcat 8.5.29 2018-03-28 11:48:58 +02:00
Juergen Hoeller 3b3f27d5ff DefaultResponseErrorHandler.hasError avoids exception for unknown status
Issue: SPR-16604
2018-03-28 11:42:43 +02:00
Juergen Hoeller f32b13c5b3 Restored original 4.3.x expectation for property access on null target 2018-03-28 11:40:24 +02:00
Rossen Stoyanchev 1897d8e858 Always specify charset for form data requests
Issue: SPR-16613
2018-03-27 20:04:53 -04:00
Rossen Stoyanchev 71126faae0 MimeTypeUtils trims parameter names / values
Issue: SPR-16630
2018-03-27 20:04:53 -04:00
Juergen Hoeller 9cc03fa8b0 Polishing 2018-03-28 02:03:31 +02:00
Juergen Hoeller 59189e5957 Backported core container concurrency refinements
Issue: SPR-16620
Issue: SPR-16625
Issue: SPR-16627
2018-03-28 01:23:50 +02:00
Juergen Hoeller 65a8aa1c09 Backported DataBindingPropertyAccessor and DataBindingMethodResolver
Issue: SPR-16588
2018-03-28 01:22:59 +02:00
Juergen Hoeller f046a066ec Simplified separator check within isInvalidEncodedPath
Issue: SPR-16616
2018-03-28 01:22:01 +02:00
Juergen Hoeller 6e1cac9145 AcceptHeaderLocaleResolver keeps language match among supported locales
Issue: SPR-16599
2018-03-28 01:21:36 +02:00
Juergen Hoeller 7cafa6764c Validate declared annotations before deciding between reflection and ASM
Issue: SPR-16564
2018-03-28 01:20:59 +02:00
Juergen Hoeller c1cb0311aa Avoid triggering lazy resolution in MultipartResolver.cleanupMultipart
Issue: SPR-16640

(cherry picked from commit 10cb2cc)
2018-03-28 01:19:22 +02:00
Juergen Hoeller f2478cf8cf Contextual BeanCreationException in case of depending on a missing bean
Issue: SPR-16628

(cherry picked from commit 937cd48)
2018-03-28 01:19:12 +02:00
Juergen Hoeller 977084a6b8 Correct documentation of default HttpMessageConverters in RestTemplate
Issue: SPR-7885

(cherry picked from commit 442ddb0)
2018-03-28 01:18:42 +02:00
Juergen Hoeller 0e7e49bab0 Deprecate TableMetaDataContext.getSimulationQueryForGetGeneratedKey
(cherry picked from commit 2c7efbb)
2018-03-28 01:18:28 +02:00
Juergen Hoeller 301ba01427 CallMetaDataContext handles 'procedureColumnResult' as return parameter
Issue: SPR-16611

(cherry picked from commit b7c4238)
2018-03-28 01:18:20 +02:00
Juergen Hoeller 881817678f Scope annotation in class hierarchies vs XML bean definition inheritance
Issue: SPR-16602

(cherry picked from commit 914b247)
2018-03-28 01:18:05 +02:00
Juergen Hoeller b8c92ce931 Consistent volatile access to running flag in Lifecycle implementations
Issue: SPR-16596
Issue: SPR-16488

(cherry picked from commit d4a8f76)
2018-03-28 01:17:53 +02:00
Juergen Hoeller 6158634d67 Clarified repeatable PropertySource annotation vs use as meta-annotation
Issue: SPR-16592

(cherry picked from commit c4e9ce8)
2018-03-28 01:17:18 +02:00
Juergen Hoeller 8d8bb04783 ConcurrentReferenceHashMap properly handles getOrDefault for null values
Issue: SPR-16584

(cherry picked from commit 356ef45)
2018-03-28 01:17:09 +02:00
Juergen Hoeller 2cac3a8255 InterceptingClientHttpRequest adapts to StreamingHttpOutputMessage
Issue: SPR-16582

(cherry picked from commit 4173022)
2018-03-28 01:16:59 +02:00
Juergen Hoeller 25a3019234 URIEditor uses straight ClassPathResource.getURI() access
Issue: SPR-16581

(cherry picked from commit 499128d)
2018-03-28 01:16:50 +02:00
Juergen Hoeller 3dff1b3f6e SimpleAliasRegistry fully synchronizes registerAlias and removeAlias
Issue: SPR-16577

(cherry picked from commit 1b1a69a)
2018-03-28 01:16:35 +02:00
Juergen Hoeller b1295d0499 TransactionTemplate equality for same transaction manager only
Issue: SPR-16572

(cherry picked from commit df80614)
2018-03-28 01:16:24 +02:00
Juergen Hoeller eeeb0a6546 Consistent result synchronization in WebAsyncManager
Issue: SPR-16571

(cherry picked from commit cf74b1b)
2018-03-28 01:16:13 +02:00
Juergen Hoeller 1bde920cce Quick access to volatile field (full synchronization only for lazy init)
Issue: SPR-16570

(cherry picked from commit 50253f6)
2018-03-28 01:16:06 +02:00
Rossen Stoyanchev e02ff3a0da MimeTypeUtils uses SecureRandom
The prevailing current wisdom is to use the default constructor for
secure and let it pick the best algorithm for the OS.

On Java 8 (Oracle), Linux this results in "NativePRNG" which uses
/dev/random (potentially blocking) for the initial seed, and
/dev/urandom (non-blocking) for subsequent calls to nextInt.

Issue: SPR-16635
2018-03-23 21:52:30 -04:00
Rossen Stoyanchev ff377a3836 Minor typo in docs 2018-03-23 11:11:40 -04:00
Rossen Stoyanchev ddb2bdf8c6 Improve docs on @Controller methods in STOMP section
Issue: SPR-16631
2018-03-23 11:07:42 -04:00
Rossen Stoyanchev b9ebdaaf37 Backport clean duplicate separators in resource URLs
Issue: SPR-16616
2018-03-21 23:18:36 -04:00
Rossen Stoyanchev 4187e04b69 Backport doc change 2018-03-21 22:47:13 -04:00
Rossen Stoyanchev d512cca3fd Reactor2TcpClient constructor with address supplier
Issue: SPR-12452
2018-03-20 11:41:54 -04:00
Rossen Stoyanchev 4bc3e0c2b4 Add SimpleEvaluationContext
Issue: SPR-16588
2018-03-14 16:10:28 -04:00
Sam Brannen d57d914b26 Make method params final for use in anonymous inner class
Issue: SPR-16587
2018-03-13 17:10:54 +01:00
Sam Brannen 68463e2018 Support target type in JsonPath assertions for MockMvc results
This commit picks up where SPR-14498 left off by adding support for an
explicit target type when using JsonPath to perform an assertion against
the response content using a Hamcrest Matcher.

Specifically, there is a new overloaded value(Matcher<T>, Class<T>)
method in JsonPathResultMatchers for use with Hamcrest matchers where
the target type (i.e., Class<T>) can be specified.

Issue: SPR-16587
2018-03-13 16:06:39 +01:00
Brian Clozel 6fa9539ae2 Don't implicitly check preconditions on PUT requests
Prior to this commit, the `HttpEntityMethodProcessor` would check HTTP
conditions on non-safe requests (i.e. not GET/HEAD). This would prevent
Controllers from returning `ResponseEntity` containing response headers
with updated values of `"Last-Modified"` or `ETag` once the resource has
been updated.

This commit avoids those checks for non GET/HEAD requests - this code
can still be leveraged from Controllers themselves using
`ServletWebRequest::checkNotModified` methods.

Issue: SPR-15780
(cherry picked from ed7684d2b2)
2018-03-08 20:10:25 +01:00
Yannik Hampe ff53a26333 Make MockRestRequestMatchers independent of JUnit (#1720)
MockRestRequestMatchers was using org.junit.Assert.assertNotNull
and thus could not be used in projects that use e.g. TestNG instead
of JUnit 4.
2018-03-08 13:37:26 +01:00
Juergen Hoeller b70d400c71 Strong recommendation for OpenPDF 1.0.5 instead of iText 2.1.7
Issue: SPR-16107
2018-03-07 16:54:04 +01:00
Juergen Hoeller 346d0e271d Polishing 2018-03-07 16:24:40 +01:00
Juergen Hoeller c15f23bf0c Reliably expose nested cause exception message for PersistenceException
Issue: SPR-16559

(cherry picked from commit eb9c43d)
2018-03-07 16:23:12 +01:00
Juergen Hoeller 0962c66592 Consistent incrementer arrangement for PostgreSQL, DB2 and SAP HANA
Includes related polishing in core.metadata and datasource.embedded and a revision of the corresponding database definitions in sql-error-codes.

Issue: SPR-16558

(cherry picked from commit 82515a3)
2018-03-07 16:22:52 +01:00
Juergen Hoeller b643f7836c Drop version check in isGetGeneratedKeysSimulated (for PostgreSQL 10)
Issue: SPR-16556

(cherry picked from commit 4a4f2c2)
2018-03-07 16:22:39 +01:00
Brian Clozel 56fdda167e Guard against invalid paths in ResourceUrlProvider
This commit makes sure that no `StringIndexOutOfBoundsException` is
thrown when `getForRequestUrl` is called with a URL that's shorter than
the expected context path.

Issue: SPR-16526
(cherry picked from commit 6d26e61ac7)
2018-03-05 15:28:36 +01:00
Juergen Hoeller 017f2a8ccc Upgrade to Animal Sniffer 1.16 2018-03-05 13:54:55 +01:00
Juergen Hoeller f7898951bd Correct description for class-level @Transactional with AspectJ
Includes isolation level clarifications.

Issue: SPR-16552
Issue: SPR-16463
2018-03-05 13:40:24 +01:00
Juergen Hoeller bd6b7b08f3 Concurrency and exception message refinements for test transactions
(cherry picked from commit a0cc800)
2018-03-05 13:40:13 +01:00
Juergen Hoeller bc043245cc Polishing 2018-03-03 17:18:44 +01:00
Juergen Hoeller 6e8a3fb4db Upgrade to Groovy 2.4.14 2018-03-03 17:18:32 +01:00
Juergen Hoeller 1f12214b45 Polishing 2018-03-02 13:11:31 +01:00
Juergen Hoeller c6bd0c9f3d Revert MessageConsumer interrupt calls (just log wait count on shutdown)
Issue: SPR-16536
2018-03-02 13:09:59 +01:00
Rossen Stoyanchev fb22915563 Correct log level
Issue: SPR-16528
2018-03-01 15:58:20 -05:00
Juergen Hoeller c5c27f2963 Polishing 2018-03-01 01:48:26 +01:00
Juergen Hoeller 3e6cfb7c6d WebApplicationContextFacesELResolver.isReadOnly returns true for WAC
Issue: SPR-16543

(cherry picked from commit 4781627)
2018-03-01 01:43:19 +01:00
Juergen Hoeller 8e68ac44d2 Polishing 2018-03-01 01:12:30 +01:00
Juergen Hoeller 81c50dc674 Polishing 2018-02-28 16:29:46 +01:00
Juergen Hoeller 57aa3d1e3b Consistent but local aspect instantiation in AspectJProxyFactory (4.3.x) 2018-02-28 15:49:48 +01:00
Juergen Hoeller 2c45b09263 Polishing 2018-02-28 15:08:09 +01:00
Juergen Hoeller 59f12635f9 Interrupt listener invoker threads on shutdown (after initial wait step)
Issue: SPR-16536

(cherry picked from commit 95aad9c)
2018-02-28 15:07:53 +01:00
Juergen Hoeller 901d48c803 Support for ResolvableType.getType().getTypeName() on Java 8
Issue: SPR-16535

(cherry picked from commit 6663d0f)
2018-02-26 17:31:12 +01:00
Juergen Hoeller 0bc7c47bea Polishing 2018-02-26 13:24:50 +01:00
Juergen Hoeller 06e2bada0a ConcurrentMapCache.get(key, valueLoader) avoids race condition
Issue: SPR-16533
2018-02-26 13:24:25 +01:00
Juergen Hoeller 8181c0237f Enforce GMT timezone for testBindInstantFromJavaUtilDate
Issue: SPR-16534

(cherry picked from commit 7d89de0)
2018-02-26 13:23:02 +01:00
Juergen Hoeller d4af8c86b2 Polishing 2018-02-25 21:44:34 +01:00
igor-suhorukov 39ddd0f349 Polish: String function use should be optimized for single characters
(cherry picked from commit 49fd724)
2018-02-25 21:44:00 +01:00
Juergen Hoeller 073e78b68d Polishing 2018-02-25 15:04:19 +01:00
Juergen Hoeller f9754f92f4 Mark Castor tests as deprecated
Issue: SPR-16219

(cherry picked from commit 85984f3)
2018-02-25 15:04:11 +01:00
igor-suhorukov d5f358c33c Polish: Array designators "[]" should be on the type, not the variable
(cherry picked from commit c782075)
2018-02-25 15:03:54 +01:00
Juergen Hoeller 295df21f06 Polishing 2018-02-25 00:48:00 +01:00
Juergen Hoeller 57a9e8e6dd Efficiently merge bean name result with parent result (possibly empty)
(cherry picked from commit 7f58d9ede0)
2018-02-25 00:41:51 +01:00
Juergen Hoeller e83491fbe9 GsonHttpMessageConverter keeps output stream open (for SseEmitter)
Issue: SPR-16529
2018-02-23 11:02:34 +01:00
Juergen Hoeller 37ee264fbf Local mergeStringArrays variant for Portlets (superseding StringUtils) 2018-02-22 15:48:35 +01:00
Juergen Hoeller 8b5563ecab Deprecated StringUtils.mergeStringArrays
(cherry picked from commit 0f74052)
2018-02-22 15:26:06 +01:00
Juergen Hoeller 0a3a82fd83 Upgrade to Netty 4.1.22 2018-02-22 14:30:01 +01:00
Juergen Hoeller 8b071633d3 Consistent use of ClassUtils.toClassArray (and related polishing) 2018-02-22 14:27:57 +01:00
Juergen Hoeller caed04473e Consistent HttpMethod identity comparisons
(cherry picked from commit 0de36d2)
2018-02-18 22:28:37 +01:00
Juergen Hoeller 87abdb92da Polishing 2018-02-16 21:02:00 +01:00
Juergen Hoeller 6d11b40353 Consistent use of StringUtils.toStringArray 2018-02-16 19:48:43 +01:00
Juergen Hoeller 350f318d2e FormTag skips rendering of hidden fields in case of empty Map
Issue: SPR-16498

(cherry picked from commit 6d75732)
2018-02-16 19:47:44 +01:00
Rossen Stoyanchev 608ef46516 ForwardedHeaderFilter handles query+fragment correctly
Issue: SPR-16506
2018-02-16 12:41:23 -05:00
Juergen Hoeller d60446a4fe Explicit documentation notes on transacted sessions vs AUTO_ACKNOWLEDGE
Issue: SPR-16487

(cherry picked from commit 95f7180)
2018-02-14 16:38:46 +01:00
Juergen Hoeller 722cb36e01 Consistent Class array vs vararg declarations (and related polishing)
(cherry picked from commit 3b810f3)
2018-02-14 16:38:28 +01:00
Juergen Hoeller 5ba37762fe Consistent ControllerAdvice applicability against user-declared class
Issue: SPR-16496

(cherry picked from commit 46cbdff)
2018-02-14 16:38:21 +01:00
Juergen Hoeller f2dc075335 Defensively handle DatabaseMetaData.getConnection() returning null
Issue: SPR-16495

(cherry picked from commit 766e602)
2018-02-14 16:37:55 +01:00
Juergen Hoeller 3b0eca921c Refined exception messages 2018-02-13 14:58:34 +01:00
Juergen Hoeller efe2539cf3 Upgrade to Tomcat 8.5.28 and Jackson 2.8.11.1 2018-02-13 14:21:11 +01:00
Juergen Hoeller 0030ff8711 Polishing 2018-02-13 14:20:07 +01:00
Juergen Hoeller f93ca28884 Avoid unused arguments for internal delegates
(cherry picked from commit b449928)
2018-02-13 14:17:59 +01:00
Juergen Hoeller 4be416e2ca SubProtocolWebSocketHandler closes sessions outside of lifecycle monitor
Issue: SPR-16488

(cherry picked from commit 3c631f8)
2018-02-13 14:17:52 +01:00
Rossen Stoyanchev 2033f50f22 Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.

Issue: SPR-16486
2018-02-12 22:03:37 -05:00
Juergen Hoeller e33fb892f1 Upgrade to Netty 4.1.21 2018-02-12 13:50:06 +01:00
Juergen Hoeller afe461609c Polishing (selective backports from master) 2018-02-12 13:45:53 +01:00
Juergen Hoeller 33d655a634 Consistent handling of InterruptedException (plus setSchedulerFactory)
Issue: SPR-16479
Issue: SPR-16439

(cherry picked from commit 39201ad)
2018-02-12 13:44:54 +01:00
Juergen Hoeller 2654dbfcf1 Relaxed procedure existence check on Oracle (for non-exposed synonyms)
Issue: SPR-16478

(cherry picked from commit fc93f99)
2018-02-12 13:44:45 +01:00
Juergen Hoeller 14440949b3 Test with all-negated profile condition
Issue: SPR-16465

(cherry picked from commit 285b01f)
2018-02-12 13:44:24 +01:00
Juergen Hoeller 05dec6d23e Consistent use of @throws instead of @exception
(cherry picked from commit 5c813a3)
2018-02-12 13:44:17 +01:00
Juergen Hoeller cc77b4b995 Explicit notes on isolation level handling in participating transactions
Issue: SPR-16463

(cherry picked from commit 0ac117f)
2018-02-12 13:43:46 +01:00
Juergen Hoeller fd964ca4b1 Consistent object type exposure for JSON rendering (workaround for Gson)
Issue: SPR-16461

(cherry picked from commit 817a836)
2018-02-12 13:43:28 +01:00
Juergen Hoeller 5fd761ee39 MimeType.compareTo uses case-insensitive Charset (analogous to equals)
Issue: SPR-16458

(cherry picked from commit cfe7ff1)
2018-02-12 13:43:14 +01:00
Juergen Hoeller 8fda96cadb AcceptHeaderLocaleResolver falls back to language-only match among its supported locales
Issue: SPR-16457

(cherry picked from commit 4dc9645)
2018-02-12 13:42:33 +01:00
Juergen Hoeller 9926b68473 Avoid String concatenation for not-null assertion in BeanProperty/DirectFieldBindingResult
Issue: SPR-16455

(cherry picked from commit 9c069f6)
2018-02-12 13:41:50 +01:00
Juergen Hoeller d8a2672505 CachingConnectionFactory makes its Session caching inactive during reset
Issue: SPR-16450

(cherry picked from commit b6ecfcf)
2018-02-12 13:41:28 +01:00
Juergen Hoeller b125b5e398 Properly analyze Java 9 class cast messages for lambda event listeners
Issue: SPR-16435

(cherry picked from commit 89d2bd9)
2018-02-12 13:41:05 +01:00
Juergen Hoeller 65743a68e6 Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean
Issue: SPR-16427

(cherry picked from commit 7772b91)
2018-02-12 13:40:38 +01:00
Juergen Hoeller f187ca6413 Notes about HibernateJpaVendorAdapter settings vs native Hibernate rules
Issue: SPR-16428

(cherry picked from commit e1fa65a)
2018-02-12 13:40:32 +01:00
Juergen Hoeller 13c213481a @EnableAspectJAutoProxy: per application context, requires aspectjweaver
Issue: SPR-14753
Issue: SPR-15801

(cherry picked from commit 0e734d8)
2018-02-12 13:40:19 +01:00
Juergen Hoeller ce9402618c Doc: no "useCodeAsDefaultMessage" for setValidationMessageSource
Issue: SPR-15986

(cherry picked from commit 37ab8a7)
2018-02-12 13:40:08 +01:00
Juergen Hoeller a041769799 AbstractClientSockJsSession.close propagates IOException from disconnect
Issue: SPR-16415

(cherry picked from commit cf100d4)
2018-02-12 13:39:30 +01:00
Juergen Hoeller 09cb7f4c31 Fine-tuned logging of WebSocket close exceptions
Issue: SPR-16409

(cherry picked from commit 8e2be91)
2018-02-12 13:39:23 +01:00
Juergen Hoeller 04f954956c ServletServerHttpRequest.getURI() ignores malformed query string
The resolved URI instance is also being cached now. This should not make a difference in a real Servlet environment but does affect tests which assumed they could modify an HttpServletRequest path behind a pre-created ServletServerHttpRequest instance. Our WebSocket test base class has been revised accordingly, re-creating the ServletServerHttpRequest in such a case.

Issue: SPR-16414

(cherry picked from commit 0e6f8df)
2018-02-12 13:39:11 +01:00
Rossen Stoyanchev fe4472dbeb MockHttpServletRequestBuilder decodes pathInfo
Previously MockHttpServletRequestBuilder calculated the pathInfo from the
provided URL without decoding the value. This meant that the pathInfo
incorrectly included URL encoded values.

Now MockHttpServletRequestBuilder properly decodes the pathInfo.

Backport of #0cd427bdd35e668dda6332ae2885d94c222d9c49.

Fixes: SPR-16453
2018-02-02 15:17:58 -05:00
Spring Buildmaster b708027e94 Next Development Version 2018-01-23 09:03:47 +00:00
Juergen Hoeller 333449598f Upgrade to Apache HttpClient 4.5.5 and Tomcat 8.5.27 2018-01-22 21:46:42 +01:00
Juergen Hoeller 03b2d9399e Polishing 2018-01-22 21:39:16 +01:00
Juergen Hoeller 4ccf33e36b Javadoc format and related polishing
(cherry picked from commit 9d0e62e)
2018-01-22 13:08:03 +01:00
Juergen Hoeller 5eebe946bd Upgrade to Netty 4.1.20 and Tomcat 8.5.24 2018-01-22 13:06:41 +01:00
Juergen Hoeller 13fa69bdaf Upgrade to ASM 6.0 level (for CGLIB 3.2.6)
Issue: SPR-16405

(cherry picked from commit 185c2bf)
2018-01-20 16:19:56 +01:00
Juergen Hoeller 4aeca67c4d Upgrade to CGLIB 3.2.6
Issue: SPR-16267
2018-01-20 14:46:46 +01:00
Rossen Stoyanchev b695b15243 Update STOMP docs on using dot as separator
Issue: SPR-16275
2018-01-19 22:35:56 -05:00
Rossen Stoyanchev ef4b62caa0 Refine "." separator support for STOMP messaging
After this commit DefaultUserDestinationResolves no longer looks at
whether AntPathMatcher is configured with "." as separator and rather
expects to be explicitly told whether to keep the leading slash in
translated destinations which actually depends on what the message
broker supports (e.g. RabbitMQ "/", Artemis ".") or how it is
configured (simple broker could be either way).

There is also a minor improvement in SimpMessagingTemplate to ensure
user destinations are correctly formed based on what the
DefaultUserDestinationResolver expects. When using "." as separtor it
allows sending messages to "queue.q1" rather than "/queue.q1".

Issue: SPR-16275
2018-01-19 22:35:49 -05:00
Rossen Stoyanchev 238e9ae59f Polish MessageBrokerConfigurationTests 2018-01-19 22:24:21 -05:00
Juergen Hoeller 347f2890df Upgrade to Jackson 2.8.11 2018-01-19 19:35:27 +01:00
Juergen Hoeller 8b5a013423 Polishing 2018-01-19 19:35:02 +01:00
Juergen Hoeller a73d9bbed5 Scheduled/JmsAnnotationBeanPostProcessor properly deals with nested proxies
Issue: SPR-16196
2018-01-19 19:13:38 +01:00
Juergen Hoeller c1bc74c83f ResponseEntityResponseExtractor tolerates unknown HTTP status codes
Issue: SPR-16371
2018-01-19 19:13:16 +01:00
Juergen Hoeller f68fdd4454 Proper null path checks in HierarchicalUriComponents
Issue: SPR-16364
2018-01-19 19:13:06 +01:00
Juergen Hoeller 19640ec3f9 Log non-loadable TestExecutionListener classes at debug level only
Issue: SPR-16369
2018-01-19 19:10:31 +01:00
Juergen Hoeller 69c882cfbc BridgeMethodResolver properly resolves all declared interfaces
Issue: SPR-16288
2018-01-19 19:08:17 +01:00
Juergen Hoeller 64af3a0f64 Use ArrayList instead of LinkedList for known size
Issue: SPR-16378
2018-01-19 19:07:10 +01:00
Juergen Hoeller d7959edb3e Improve performance of some string operations
Issue: SPR-16293
2018-01-19 19:05:07 +01:00
Juergen Hoeller 0b77c8835c Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
Issue: SPR-16264
2018-01-19 19:04:57 +01:00
Timo Meinen 28f15057ac Log SQL parameters in EclipseLink when using showSql
As of EclipseLink 2.4.0 - Juno this is not sufficient to log
SQL parameter binding. Additionally,
eclipselink.logging.parameters must be enabled.

Issue: SPR-16383

(cherry picked from commit 823a16c)
2018-01-19 18:43:18 +01:00
Skelotron e5025419c2 Fix transaction timeout value overflow
Issue: SPR-16316

(cherry picked from commit b9e03cb)
2018-01-19 18:42:43 +01:00
Juergen Hoeller d53ede9bd3 CacheProxyFactoryBean exposes all relevant CacheInterceptor callbacks
Issue: SPR-16295

(cherry picked from commit b160f93)
2018-01-19 18:41:45 +01:00
Juergen Hoeller 092b3d4a52 Warning instead of error for non-present type filter class
Issue: SPR-16356

(cherry picked from commit 4adc820)
2018-01-19 18:41:18 +01:00
Juergen Hoeller bf4cadadda CachingConnectionFactory does not cache producer for temporary queue/topic
Issue: SPR-16353

(cherry picked from commit 72590db)
2018-01-19 18:41:06 +01:00
Juergen Hoeller a9bad580d9 FunctionReference's method field is volatile
Issue: SPR-16255

(cherry picked from commit 6a1fe0b)
2018-01-19 18:38:13 +01:00
Juergen Hoeller 6f6ff33202 Consider enum subclasses as simple value types as well
Issue: SPR-16278

(cherry picked from commit d3e0f4d)
2018-01-19 18:37:30 +01:00
Juergen Hoeller 4bb837582e Support for static field access on non-public enums
Issue: SPR-16284

(cherry picked from commit 9beb978)
2018-01-19 18:37:11 +01:00
Juergen Hoeller 3368dcae22 Avoid extra existence check in SimpleMetadataReaderFactory
Issue: SPR-16281

(cherry picked from commit 7ad69bf)
2018-01-19 18:37:00 +01:00
Rossen Stoyanchev 86704112b0 Update docs on stomp.js library
This is a backport of #357fb4.

Issue: SPR-15624
2018-01-18 14:51:40 -05:00
Rossen Stoyanchev d62dd2dd8d Polish MockRestServiceServer code
Cherry picked from #7ab4d0ca08
2018-01-17 13:04:32 -05:00
sdeleuze e935018b0c Fix SockJs CorsConfiguration for forbidden origins
After this commit, AbstractSockJsService uses the configured allowed
origins when generating the CorsConfiguration instead of "*".

As a consequence, forbidden origin requests still result in a 403
response but now with no CORS headers in order to improve consistency
between the status code and the headers.

Issue: SPR-16304
2018-01-15 18:17:08 +01:00
Stephane Nicoll 0747cd6a70 Make sure endpoint settings override default factory settings
Issue: SPR-16338
2018-01-15 15:45:55 +01:00
Rossen Stoyanchev 0a30b71dc3 Fix failing tests caused by previous commit 2018-01-12 12:36:24 -05:00
Rossen Stoyanchev 03118542f4 MockHttpInputMessage respects getBody contract
Issue: SPR-16367
2018-01-12 11:44:42 -05:00
sdeleuze 1b3b058ebd Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.

"Forwarded" header support has been updated accordingly since it
also supports similar use case, as described in SPR-15504.

Issue: SPR-16262
2018-01-09 14:56:23 +01:00
Stephane Nicoll 8aa94aee27 Fix SpEL syntax
Issue: SPR-16315
2018-01-08 08:47:57 +01:00
Rossen Stoyanchev 6dbc828aa1 MappingJackson2MessageConverter uses generic type
This is a backport of the #583201 minus use of GenericTypeResolver
which in 5.0 has been refactored to provide a getJavaType method.

Issue: SPR-16252
2018-01-04 13:17:34 -05:00
nkjackzhang 3c31e0378f Polish Javadoc
Closes gh-1627
2017-12-23 14:20:49 +01:00
sdeleuze e6e6b8f4ad Allow interceptors to add existing header values
Additional commit to provide support of requests
that have a body.

Issue: SPR-15066
2017-12-13 09:47:55 +01:00
Rossen Stoyanchev 4fe94dffc0 Fix regression in StompHeaderAccessor
Issue: SPR-16265
2017-12-11 16:42:27 -05:00
sdeleuze 4b8a937bee Allow interceptors to add existing header values
Provide a fully mutable HttpHeaders to ClientHttpRequestInterceptors
of a RestTemplate when headers are set using HttpEntity. This avoids
UnsupportedOperationException if both HttpEntity and
ClientHttpRequestInterceptor add values for the same HTTP header.

Issue: SPR-15066
2017-12-11 17:56:48 +01:00
Spring Buildmaster 55fc731c59 Next Development Version 2017-11-27 10:39:19 +00:00
Juergen Hoeller 40a61277e1 Upgrade to Groovy 2.4.13 2017-11-26 17:57:04 +01:00
Juergen Hoeller 8c499cb10b Polishing 2017-11-26 17:56:35 +01:00
Juergen Hoeller 723b2b19a6 Consistent checks in DataAccessUtils (plus nullability hints in javadoc)
Issue: SPR-16225
2017-11-26 17:55:03 +01:00
Juergen Hoeller f09e252417 Polishing 2017-11-21 15:25:33 +01:00
Juergen Hoeller f3b8d7138c Consistent use of tabs for sample code in the reference documentation 2017-11-21 15:25:26 +01:00
Juergen Hoeller 47383fce97 Unit tests for configuration superclass inclusion
Issue: SPR-16217

(cherry picked from commit 08c95fb)
2017-11-21 15:25:17 +01:00
Juergen Hoeller 8206f0652b Deprecate Castor support
Issue: SPR-16219

(cherry picked from commit 08c7855)
2017-11-21 15:25:09 +01:00
jianglei 1b58fad228 Fix copy/paste in Javadoc
Closes gh-1601
2017-11-21 06:59:12 +01:00
Juergen Hoeller a58ef88f1d SqlParameterSourceUtils.createBatch polishing (partial backport)
Issue: SPR-16215
2017-11-20 13:33:50 +01:00
Juergen Hoeller 1d060ecff0 Document common use cases for @Order vs @Priority vs @DependsOn
Issue: SPR-16213

(cherry picked from commit 84699c8)
2017-11-20 13:33:23 +01:00
Juergen Hoeller 122a3fe9fd ResourceHttpRequestHandler uses EmbeddedValueResolverAware
(cherry picked from commit 20fcefc)
2017-11-20 13:32:50 +01:00
Rossen Stoyanchev 2a309a031a Revise charset by location support for static resources 2017-11-17 12:55:11 -05:00
Juergen Hoeller 03fef655ff Restored support for placeholders in mvc namespace resource locations
With the recent charset mechanism in place, we cannot rely on implicit placeholder parsing during String-to-Resource conversion anymore.

(cherry picked from commit 7af9910)
2017-11-16 10:03:14 +01:00
Juergen Hoeller a9e2040831 HibernateJpaVendorAdapter properly checks connectionReleaseOnClose
Issue: SPR-16162
2017-11-14 17:17:24 +01:00
Juergen Hoeller ffbaa26b4f End of first-class JDK 6 support
Issue: SPR-16185
2017-11-14 12:32:06 +01:00
Juergen Hoeller 586912792a Upgrade to Netty 4.1.17 and Undertow 1.3.33 2017-11-14 12:31:19 +01:00
Juergen Hoeller 640c8ff693 Polishing 2017-11-14 12:31:01 +01:00
Juergen Hoeller d52d9fd268 HibernateJpaVendorAdapter preserves connection release mode for JTA
Issue: SPR-16162
2017-11-14 12:30:49 +01:00
Juergen Hoeller f861f182fa Reduce access on headers for STOMP messaging
Issue: SPR-16165
2017-11-14 12:30:24 +01:00
Juergen Hoeller d5f34ed641 Correctly handle NVARCHAR, LONGNVARCHAR and NCLOBs
Issue: SPR-16154
2017-11-14 12:30:13 +01:00
Juergen Hoeller a88c47a120 Properly handle follow-up request after failure
Issue: SPR-16132
2017-11-14 12:30:04 +01:00
Juergen Hoeller 6dc73469f9 MethodReference treats proxy-targeting expressions as non-compilable
Issue: SPR-16191

(cherry picked from commit c30145d)
2017-11-14 12:28:15 +01:00
Juergen Hoeller 59d654b0cf Unit tests for unresolvable generics with partial mismatch
Issue: SPR-16179

(cherry picked from commit e2bb06e)
2017-11-14 12:27:51 +01:00
Juergen Hoeller 9779b8b2ab SpringValidatorAdapter skips value retrieval for Set field without index
Issue: SPR-16177

(cherry picked from commit 3091fee)
2017-11-14 12:27:42 +01:00
Juergen Hoeller 2c8a6bb6f5 Explicitly document UriTemplate as thread-safe
Issue: SPR-16173

(cherry picked from commit de78202)
2017-11-14 12:27:31 +01:00
Juergen Hoeller 5800c7a18a Comprehensive documentation on injection point matching
Issue: SPR-16142

(cherry picked from commit a5da05c)
2017-11-14 12:27:21 +01:00
Juergen Hoeller dc0a934c99 MockHttpServletResponse.getDateHeader returns -1 for non-existent header
Includes consistent getDateHeader results in both MockHttpServletResponse variants (spring-test and spring-web)

Issue: SPR-16160

(cherry picked from commit 80a0cf7)
2017-11-14 12:26:32 +01:00
Juergen Hoeller 9ca4de1ccf MockHttpServletRequest.getRequestURL aligns with getServerName/Port
Issue: SPR-16138

(cherry picked from commit 0edf4d6)
2017-11-14 12:25:55 +01:00
Juergen Hoeller 519195cf66 AbstractApplicationContext silently ignores non-initialized ApplicationEventMulticaster/LifecycleProcessor on destruction
Issue: SPR-16149

(cherry picked from commit 1611ce7)
2017-11-14 12:25:30 +01:00
Juergen Hoeller 573ff2c58d ClassPathResource uses specific constructors in createRelative
Issue: SPR-16146

(cherry picked from commit d00e4f1)
2017-11-14 12:25:18 +01:00
Rossen Stoyanchev 9470719cdb Support charset config by (static) resource location
This commit adds support for configuring static resource locations
with a charset to be applied to relative paths.
2017-11-09 14:51:49 -05:00
Rossen Stoyanchev 97bc2762e1 Handle errors via AsyncListener
This is a limited backport of commit #e0678b mainly providing the fix without
exposing the onError callbacks.

Issue: SPR-16058
2017-11-08 23:10:16 -05:00
Juergen Hoeller 5867ea0c3c Correct SpEL example (matching its comment)
Issue: SPR-16111
2017-10-27 11:31:03 +02:00
Juergen Hoeller 9cc3349e2d Introspect interface-declared methods in case of proxy (for varargs)
Issue: SPR-16122

(cherry picked from commit 419b444)
2017-10-27 11:30:52 +02:00
Juergen Hoeller 8904de2149 Drive letter case alignment in addClassPathManifestEntries
Issue: SPR-16117

(cherry picked from commit a2f5e12)
2017-10-27 11:30:43 +02:00
Juergen Hoeller 4208ec0ba8 Polishing
(cherry picked from commit 7e8c8f0)
2017-10-27 11:30:34 +02:00
Juergen Hoeller ab19c227d3 DefaultResponseErrorHandler.hasError tolerates unknown status codes
Issue: SPR-16108
2017-10-24 15:44:37 +02:00
Juergen Hoeller be5b9354a9 Polishing 2017-10-24 14:34:56 +02:00
Juergen Hoeller c92393b168 Compatibility with OpenPDF as alternative to iText 2.1.7
Issue: SPR-16107

(cherry picked from commit 9efdadc)
2017-10-24 14:34:37 +02:00
Juergen Hoeller 75a813aff6 WebSphereUowTransactionManager logs overridden application exceptions
Issue: SPR-16102

(cherry picked from commit efe943d)
2017-10-24 14:34:00 +02:00
Juergen Hoeller 6446ffd063 BridgeMethodResolver properly resolves interface hierarchies
Issue: SPR-16103

(cherry picked from commit 182da15)
2017-10-24 14:33:19 +02:00
Juergen Hoeller db7d71503d Polishing 2017-10-23 19:03:56 +02:00
Juergen Hoeller 99d39eb2ee Avoid temporary String creation in StringUtils.starts/endsWithIgnoreCase
Issue: SPR-16095
2017-10-23 19:03:42 +02:00
Juergen Hoeller c32c9ecb61 Explicit notes on advice mode proxy vs aspectj
Issue: SPR-16092
2017-10-23 19:03:36 +02:00
Juergen Hoeller 40f3fb20c2 SchedulingConfigurer and JmsListenerConfigurer respect @Order
Issue: SPR-16090
2017-10-23 19:03:30 +02:00
Juergen Hoeller 268ccb6b6b SubProtocolWebSocketHandler provides protected decorateSession method
Issue: SPR-16089
2017-10-23 19:03:24 +02:00
Haruki Okada 9c7141a24a Fix wrong javadoc example
Closes gh-1575
2017-10-23 09:21:10 +02:00
Juergen Hoeller b0ae8f6058 ModelAttributeMethodProcessor detects re-enabled binding declaration
Issue: SPR-16083

(cherry picked from commit bec1fc1)
2017-10-18 13:29:41 +02:00
Juergen Hoeller d473506d32 Explicit notes on ExceptionHandler root vs cause resolution
Issue: SPR-16074

(cherry picked from commit ea00c7c)
2017-10-18 13:28:59 +02:00
Juergen Hoeller 6f65b638de Defensive resolution of getParameterType (actually never returning null)
Covers use of ResolvableType in overridden getParameterType variants.

Issue: SPR-16072
2017-10-17 12:15:51 +02:00
Juergen Hoeller 97c63857c4 Allow PropertyEditor conversion as fallback for enums
Issue: SPR-16082

(cherry picked from commit ef6aef9)
2017-10-17 12:15:37 +02:00
Drummond Dawson 4cc8f4c4d8 Missing some double backticks with apostrophes
Closes gh-1566
2017-10-17 08:35:24 +02:00
Juergen Hoeller dff2c84ed1 Clarify destroy method suppression for DisposableBean vs (Auto)Closeable
Issue: SPR-16078
2017-10-16 23:11:19 +02:00
Juergen Hoeller 17fb4fed09 Extended coverage of full vs lite mode for configuration classes
Issue: SPR-16076
2017-10-16 23:02:35 +02:00
Juergen Hoeller 77bab959a3 Polishing 2017-10-16 19:59:34 +02:00
Juergen Hoeller c2438cb932 Defensive resolution of getParameterType (actually never returning null)
Includes defensive access to volatile field for resolved parameter type.

Issue: SPR-16072
2017-10-16 19:59:07 +02:00
Juergen Hoeller 03be8095ca Consistent handling of null array for arguments
Issue: SPR-16075

(cherry picked from commit c29b6f5)
2017-10-16 19:58:49 +02:00
Spring Buildmaster 4daf685eee Next Development Version 2017-10-10 13:54:37 +00:00
Rossen Stoyanchev b6ca8a9018 HandlerMappingIntrospector is a bean 2017-10-09 10:44:38 -04:00
Juergen Hoeller 8071f13481 Upgrade to OpenJPA 2.4.2 2017-10-09 15:41:28 +02:00
Juergen Hoeller 565b20d638 Polishing 2017-10-09 15:41:10 +02:00
Juergen Hoeller 7610210a0e Consistently sort BeanDefinitionRegistryPostProcessors
Issue: SPR-16043

(cherry picked from commit ad4c8e7)
2017-10-09 15:40:04 +02:00
Juergen Hoeller a4803d8b0f Convenient forType methods for ParameterizedTypeReference
Issue: SPR-16054

(cherry picked from commit 53091c7)
2017-10-09 15:39:07 +02:00
Juergen Hoeller ab081c4fab Latest applicable dependency updates (Gson 2.8.2, Rome 1.7.4, Netty 4.1.16, Tomcat 8.5.23) 2017-10-04 13:20:05 +02:00
Juergen Hoeller dbc04282e2 Polishing 2017-10-04 13:18:39 +02:00
Juergen Hoeller bb41ccefc0 Deprecate HibernateJpaSessionFactoryBean (against Hibernate 5.2)
Issue: SPR-16016

(cherry picked from commit 66a6fda)
2017-10-04 13:18:17 +02:00
Juergen Hoeller d0d4421aea Tokenizer uses single process step and length-based exhaustion check
Issue: SPR-16032

(cherry picked from commit 03b6828)
2017-10-04 13:18:04 +02:00
Tom Fitzhenry 1a1d767d59 Fix typo in exception message: quite -> quiet
Closes gh-1547
2017-10-03 08:25:27 +02:00
Robin Wang 1bf3e7c021 Fix typo
Closes gh-1545
2017-10-01 09:23:47 +02:00
Juergen Hoeller 40ba95f82e Consistent configurer access in WebMvcConfigurationSupport
Issue: SPR-16017
2017-09-27 19:00:51 +02:00
Juergen Hoeller cc70fdcbeb Backport further refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 15:20:17 +02:00
Juergen Hoeller 5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller 9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller 18a3322d2f Lenient tolerance of unknown HTTP status codes behind RestTemplate
Issue: SPR-15978
2017-09-27 00:09:42 +02:00
Juergen Hoeller 87df393f91 MockPart backport
Issue: SPR-15854
2017-09-27 00:09:09 +02:00
Juergen Hoeller 963dd3f804 Clarify @Bean return type recommendation in case of multiple interfaces
Issue: SPR-15973
2017-09-27 00:09:00 +02:00
Juergen Hoeller 8e3a55ba89 Latest applicable dependency updates (Tomcat 8.5.21, JRuby 1.7.27, Rhino 1.7.7.2, WebJars Locator 0.32-1) 2017-09-27 00:08:54 +02:00
Juergen Hoeller a839477d4a Explicit check for duplicates in addClassPathManifestEntries
Issue: SPR-15989

(cherry picked from commit 9d8e3d4)
2017-09-27 00:08:12 +02:00
Juergen Hoeller 53a9697ff1 Consistent conversion of Optional array/list arrangements
Issue: SPR-15918
Issue: SPR-15919
Issue: SPR-15676

(cherry picked from commit 15c82af)
2017-09-27 00:07:55 +02:00
Juergen Hoeller d11bd64e0d TaskExecutorRegistration does not apply its default settings to a user-provided executor
Also, ChannelRegistration.setInterceptors is deprecated now: in favor of a fluently named interceptors(...) method which is documented to add the given interceptors to the channel's current list.

Issue: SPR-15962
Issue: SPR-15976

(cherry picked from commit ac9cfef)
2017-09-26 23:58:57 +02:00
Juergen Hoeller dedecb9daa HttpEntityMethodProcessor lets entity headers override existing headers (again)
Issue: SPR-15952

(cherry picked from commit 5bdcb89)
2017-09-26 23:58:49 +02:00
Stephane Nicoll 35af7ff854 Reuse JmsTemplate's MessageConverter in JmsMessagingTemplate
This commit makes sure that any custom MessageConverter set in a
JmsTemplate used by a JmsMessagingTemplate is reused as the payload
converter of the message.

Issue: SPR-15965

(cherry picked from commit b275a06)
2017-09-26 23:58:03 +02:00
Xavier Downs 5e904ddcaa Fix Javadoc typo
Closes gh-1531
2017-09-20 09:33:42 +02:00
Spring Buildmaster 74532a24a4 Next Development Version 2017-09-11 08:17:11 +00:00
Juergen Hoeller c0ee1ff896 Javadoc syntax fixes 2017-09-10 21:08:03 +02:00
Juergen Hoeller f944815d92 Ignore Hibernate Validator style ".<collection element>" suffix for field path
Issue: SPR-15916
2017-09-10 20:48:49 +02:00
Juergen Hoeller 0d0399ac02 Defensively ignore AbstractMethodError from parameterNameProvider
Issue: SPR-15856
2017-09-10 20:48:25 +02:00
Juergen Hoeller d1f42ac729 Unwrap Validator proxy for access to forExecutables (if necessary)
Issue: SPR-15807
2017-09-10 20:47:57 +02:00
Juergen Hoeller 17f42fc97a Polishing 2017-09-08 19:42:32 +02:00
Juergen Hoeller fa2c377405 Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support
Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15)

Issue: SPR-15836
Issue: SPR-15880
2017-09-08 19:41:27 +02:00
Juergen Hoeller 9dcdfec2e2 Properly retrieve and expose HttpServletResponse for async requests
Issue: SPR-15867
2017-09-08 19:40:46 +02:00
Juergen Hoeller 07a0a31565 Heart-beat log message potentially without session id
Issue: SPR-15937
(cherry picked from commit aa4ae7a)
2017-09-08 19:39:05 +02:00
Juergen Hoeller f3a2f57696 SimpleAsyncTaskExecutor properly respects NO_CONCURRENCY
Issue: SPR-15895
(cherry picked from commit 204ddeb)
2017-09-08 19:38:59 +02:00
Juergen Hoeller 80bf394fdc @Lazy falls back to empty map/list/set for non-required collection dependency
Issue: SPR-15858
(cherry picked from commit ec1eafc)
2017-09-08 19:38:53 +02:00
Juergen Hoeller f948742781 Leniently handle lambda-defined listeners with ErrorHandler as well
Issue: SPR-15838
(cherry picked from commit dd2bbcb)
2017-09-08 19:38:46 +02:00
Juergen Hoeller 0088922dfd checkConfigurationClassCandidate explicitly skips factory method definitions
Issue: SPR-14603
(cherry picked from commit 1fbd047)
2017-09-08 19:38:19 +02:00
Juergen Hoeller 57fbdc0ad5 Consistent logging in Environment and PropertySource implementations
Issue: SPR-15825
(cherry picked from commit fac83b2)
2017-09-08 19:38:03 +02:00
Brian Bohl f5d689e764 Fix StringIndexOutOfBoundsException in RestTemplate
Backport for commits #81dfad and #3d61f7

Issue: SPR-15900
2017-09-01 17:00:23 -04:00
Rossen Stoyanchev 681ced8fd3 Cancel WebAsyncManager thread on request timeout
Issue: SPR-15852
2017-08-16 09:42:39 +02:00
Rossen Stoyanchev 8b64ad3192 Use exact type name in doc sample
Issue: SPR-15863
2017-08-15 14:45:57 +02:00
Rossen Stoyanchev 35248498ae Fix regression in HttpPutFormContentFilter
Re-arrange the checks so that if there is no form parameter, then
immediately and unconditionally delegate to super.getParameterValues().
Or reversely if there is no super.getParameterValues() then return the
form parameter.

So the only remaining case is when combining values present in both.
In that case we'll take both only if a queryString exists.

One extra fix is to not even wrap the request if we did not parse any
form parameters at all which can happen with HttpHiddenMethodFilter.

Issue: SPR-15828, 15835
2017-08-01 12:41:45 +02:00
Rossen Stoyanchev 5f07434360 Improve check for "Broken pipe" error message
Issue: SPR-15802
2017-07-25 10:34:30 +02:00
Rossen Stoyanchev cd602e5904 Deprecate setContentDispositionFormData method
The method was orginally added under SPR-14547 but the example in it
was probably intended for use with Content-Disposition server response
header (file download) and not for a Content-Disposition header
within the body of a multipart request.

In a Spring application a multipart request is typically serialized
by the FormHttpMessageConverter and hence the Content-Disposition is
not explicitly set by the application.
2017-07-20 17:58:52 +02:00
Spring Buildmaster 0e8bd71d53 Next Development Version 2017-07-20 11:57:27 +00:00
Juergen Hoeller c752ba5b38 Polishing 2017-07-19 23:55:47 +02:00
Juergen Hoeller 12978b8185 Ignore (Auto)Closeable for interface-based proxy decisions
Issue: SPR-15779
(cherry picked from commit 118d147)
2017-07-19 23:55:18 +02:00
Juergen Hoeller 40b4276475 UriUtils.extractFileExtension properly handles all fragments
Issue: SPR-15786
(cherry picked from commit 13080f0)
2017-07-19 23:54:57 +02:00
Rossen Stoyanchev 4160ced64c Backport of relative redirect filter support
Issue: SPR-15717
2017-07-19 23:54:32 +02:00
Juergen Hoeller a032e86355 Explicit error message for bean name clash with containing configuration class
Issue: SPR-15775
(cherry picked from commit bca5a36)
2017-07-19 23:54:04 +02:00
Juergen Hoeller 4b2bad96ce Polishing
(cherry picked from commit efc5b47)
2017-07-14 17:41:26 +02:00
Juergen Hoeller 1513c4a952 Expression javadoc alignment
(cherry picked from commit 1ad6180)
2017-07-14 17:12:50 +02:00
Juergen Hoeller bb6d9fabee Expression alignment and related polishing (backported from master) 2017-07-14 15:41:38 +02:00
Juergen Hoeller bffcd33ea3 PropertyOrFieldReference checks cached PropertyAccessor against current EvaluationContext
Issue: SPR-15769
(cherry picked from commit bcf9f21)
2017-07-14 15:40:52 +02:00
Juergen Hoeller c9ffa64140 DefaultListableBeanFactory falls back to empty DLBF instance on deserialization
Issue: SPR-15766
2017-07-13 13:02:29 +02:00
Juergen Hoeller aa0d7a61b6 AbstractTraceInterceptor provides logExceptionStackTrace flag and writeToLog delegates
Issue: SPR-15763
2017-07-13 13:01:35 +02:00
Juergen Hoeller e138d7d29f Page-level JSTL time zone support for JSP tags
Issue: SPR-15746
2017-07-12 22:59:42 +02:00
Juergen Hoeller 50f8b6b3ab Revised assertions and $[invocationTime] support for exceptionMessage
Issue: SPR-15763
(cherry picked from commit 19a8efc)
2017-07-12 22:59:34 +02:00
Juergen Hoeller 121a3bf670 Always invoke Jackson serialization with AtomicReference cause
Issue: SPR-15760
(cherry picked from commit 5f767a8)
2017-07-12 22:59:29 +02:00
Juergen Hoeller e4031f290e Efficient log checks in STOMP encoder/decoder
(cherry picked from commit 122ee30)
2017-07-12 22:59:18 +02:00
Juergen Hoeller 55fa5f2b65 ReflectionTestUtils does not require spring-aop on the classpath
Issue: SPR-15757
(cherry picked from commit dd43b6a)
2017-07-12 22:59:12 +02:00
Juergen Hoeller 3802aca474 LinkedCaseInsensitiveMap exposes its locale for key conversion
Issue: SPR-15752
(cherry picked from commit 9b5132c)
2017-07-12 22:59:03 +02:00
Juergen Hoeller a9a4d7cf78 Perform onException delegation outside of connection monitor
Issue: SPR-15738
(cherry picked from commit 6d55b3a)
2017-07-12 22:58:53 +02:00
Juergen Hoeller 17382aec6d AbstractValueAdaptingCache subclasses may reuse NullValue.INSTANCE
Issue: SPR-15693
(cherry picked from commit 59c26f6)
2017-07-12 22:58:40 +02:00
Juergen Hoeller 8ad3c958e1 Reliably detect event listener conditions on proxied beans
Issue: SPR-15678
(cherry picked from commit eb928ce)
2017-07-12 22:58:34 +02:00
Rossen Stoyanchev 8d743181da Fix MockMvc + HttpPutFormContentFilter issue
Issue: SPR-15753
2017-07-11 12:03:07 +02:00
Juergen Hoeller f92ab75bc9 Latest dependency updates (AspectJ 1.8.10, Gson 2.8.1, Commons FileUpload 1.3.3, JsonPath 2.3) 2017-07-05 11:25:39 +02:00
Juergen Hoeller 092b5f7556 Clarified role of postProcessAfterInstantiation
Issue: SPR-15732
2017-07-05 11:23:34 +02:00
Brian Clozel d4d609318d Include port info in HTTP headers for Netty client
This commit adds the port information in the "Host" HTTP request header
for the Netty-based HTTP client.

Issue: SPR-15706
(cherry-picked from commit baaa84e90)
2017-07-04 12:19:54 +02:00
Juergen Hoeller 501891c749 FactoryBean object cache cleared on shutdown
Issue: SPR-15722
(cherry picked from commit 6534359)
2017-06-30 21:01:09 +02:00
Juergen Hoeller 2b0dc8d7ff Upgrade to Objenesis 2.6
Includes latest dependency updates (Groovy 2.4.12, Jackson 2.8.9, Jetty 9.4.6, Netty 4.1.12, Tomcat 8.5.16)

Issue: SPR-15600
2017-06-30 16:07:52 +02:00
Juergen Hoeller 674e2320a8 CronSequenceGenerator.isValidExpression actually validates cron fields
Issue: SPR-15604
(cherry picked from commit 5f4d1a4)
2017-06-30 16:07:30 +02:00
Juergen Hoeller fee259a3c5 WebAsyncManager defensively ignores attribute type mismatch
Issue: SPR-15709
(cherry picked from commit c4694c3)
2017-06-30 16:07:14 +02:00
Juergen Hoeller 016b7d753c Fine-tune HTTP/RMI Invoker exception handling
Issue: SPR-15684
(cherry picked from commit 535103c)
2017-06-30 16:06:53 +02:00
Juergen Hoeller a17255a2e3 SimpleRequestExpectationManager properly handles sequential requests with different count
Issue: SPR-15672
(cherry picked from commit efb735a)
2017-06-30 16:06:39 +02:00
Juergen Hoeller 35efdf6b51 HttpComponentsAsyncClientHttpRequestFactory supports plain HttpAsyncClient as well
Issue: SPR-15664
(cherry picked from commit 7b5f96c)
2017-06-30 16:06:26 +02:00
Juergen Hoeller b35c238d27 Cleanup of duplicate semicolons
Issue: SPR-15654
(cherry picked from commit 779deb0)
2017-06-30 16:06:05 +02:00
Spring Buildmaster db1fd516ea Next Development Version 2017-06-07 19:29:40 +00:00
Juergen Hoeller b7337b304e Correct native Validator reference for fallback in SpringValidatorAdapter
Issue: SPR-15629
2017-06-07 18:40:52 +02:00
Juergen Hoeller 7cac1f1e6e Latest applicable dependency updates (Netty 4.1.11, Tomcat 8.5.15, Undertow 1.3.30) 2017-06-07 17:56:58 +02:00
Juergen Hoeller fa09cd3737 Avoid inefficient keySet iteration in messaging classes
Issue: SPR-15553
2017-06-07 17:56:51 +02:00
Juergen Hoeller be93ee77e4 Debug-level log entry for any Jackson exception during canConvert
Issue: SPR-15582
2017-06-07 17:56:47 +02:00
Juergen Hoeller 8330134757 Unwrap SpringValidatorAdapter (e.g. CustomValidatorBean) to native Validator
Issue: SPR-15629
2017-06-07 17:56:42 +02:00
Juergen Hoeller 9cb9884533 Consistently accept "taskExecutor" bean of type Executor (as stated in @EnableAsync's javadoc)
Issue: SPR-15566
(cherry picked from commit 3cc94ae)
2017-06-07 17:56:36 +02:00
Juergen Hoeller ac25db6d2b LocalValidatorFactoryBean properly supports unwrap at ValidatorFactory level
Issue: SPR-15561
(cherry picked from commit cb3d1be)
2017-06-07 17:56:31 +02:00
Juergen Hoeller 22bf9febcc Close InputStreams in writeResourceRegionCollection (analogous to writeResourceRegion)
Issue: SPR-15559
(cherry picked from commit eaac348)
2017-06-07 17:56:21 +02:00
Juergen Hoeller c6deeb31ec ResourceUtils.extractArchiveURL properly deals with top-level war URLs
Issue: SPR-15556
(cherry picked from commit 7b3f5fd)
2017-06-07 17:56:16 +02:00
Juergen Hoeller f80b2d9a94 Revised png and jpeg mappings
Issue: SPR-15546
Issue: SPR-15557
(cherry picked from commit e835f4d)
2017-06-07 17:56:09 +02:00
Rossen Stoyanchev 8c206bf477 Improve docs on forwarded headers
Issue: SPR-15612
2017-06-01 22:37:34 -04:00
Christoph Dreis 6aeb8ef56d Optimize DefaultUserDestinationResolver.resolveDestination()
Issue: SPR-15602
2017-06-01 16:08:49 -04:00
Rossen Stoyanchev 04a96ffa27 Add removeOnly mode to ForwardedHeaderFilter
Issue: SPR-15610
2017-06-01 15:48:39 -04:00
Jay Bryant 2677584658 Add introductory paragraphs where missing
Issue: SPR-15585
2017-05-25 12:06:45 -04:00
Rossen Stoyanchev 99236759ec ExceptoinWebSocketHandlerDecorator uses ERROR level
Issue: SPR-15537
2017-05-24 15:01:36 -04:00
skarafaz e2aa117ff9 Find exact matches in WebJarsResourceResolver
Prior to this commit, resolving resources from webjars using the
`WebJarAssetLocator.getFullPath` could lead to multiple candidates,
since this method is trying to find *any* resource matching that path
under the given webjar location.

This commit replaces that call with
`WebJarAssetLocator.getFullPathExact`, which avoids those multiple
matches and only resolves resources if the given path is exact.

Issue: SPR-15526
2017-05-24 10:45:38 +02:00
Rossen Stoyanchev 8deec9569c Protect against NPE in DefaultSubscriptionRegistry
Follow-up fix on the recent commit:
https://github.com/spring-projects/spring-framework/commit/4fc41e

Issue: SPR-15543
2017-05-22 16:12:49 -04:00
Andrey Kaipov 0f8bf10aa8 Minor typo fix: form -> from
Closes gh-1411
2017-05-20 14:50:47 +02:00
Martin Švorc e0a7b074ed Use original query string of forwarded request
Prior to this commit, the AbstractFlashMapManager has used the
originating URI but the query string of the forwarded request. That
resulted to FlashMap not being matched even when both originating
URI and query string matched the FlashMap attributes. The originating
query string is now used to match the forwarded request.

Issue: SPR-15505
2017-05-19 17:07:17 -04:00
Bao Tran 4fc41eeeb9 Fix duplicate STOMP subscription id issue
Issue: SPR-15543
2017-05-19 15:15:01 -04:00
Juergen Hoeller 81143a80c4 Wrap IOException as HttpMessageNotReadableException for RestTemplate usage
In the 4.3.x line, conversion exceptions do not get wrapped as RestClientException yet, so the expectation remains to receive a HttpMessageNotReadableException for conversion-level IOExceptions.

Issue: SPR-13592
2017-05-08 08:42:06 +02:00
Juergen Hoeller 9572859a35 Expect IOException instead of HttpMessageNotReadableException 2017-05-07 22:10:55 +02:00
Juergen Hoeller 78931ee3ea Polishing 2017-05-07 21:41:26 +02:00
Juergen Hoeller e522fec611 HandlerExecutionChain.toString() includes reliable interceptor number
Issue: SPR-15525
(cherry picked from commit 92f18a4)
2017-05-07 21:26:01 +02:00
Juergen Hoeller a12bbde87e Latest dependency updates (EhCache 2.10.4 & 3.1.4, Groovy 2.4.11, Jetty 9.4.5, Netty 4.1.10, OkHttp 3.7, Rome 1.7.2, Tomcat 8.5.14) 2017-05-04 14:16:24 +02:00
Juergen Hoeller 50235be746 Avoid JDK 7+ AssertionError constructor in 4.3.x line 2017-05-04 14:14:56 +02:00
Juergen Hoeller 1332482c40 Polishing 2017-05-04 14:09:15 +02:00
Juergen Hoeller 799589ec1c Revised javadoc
Issue: SPR-15466
2017-05-04 14:08:14 +02:00
Juergen Hoeller 16fdda00c1 Debug log messages for value retrieval exceptions
Issue: SPR-15481
2017-05-04 14:08:00 +02:00
Juergen Hoeller d2985613d1 Proper resolution of Tomcat war URL
Issue: SPR-15485
(cherry picked from commit d43dfc7)
2017-05-04 14:07:14 +02:00
Juergen Hoeller beac891ff0 Honor @Autowired(required=false) at parameter level
Issue: SPR-15268
(cherry picked from commit d74542e)
2017-05-04 14:07:07 +02:00
Juergen Hoeller 2d1b551248 Common root cause introspection algorithm in NestedExceptionUtils
Issue: SPR-15510
(cherry picked from commit 9d8e9cf)
2017-05-04 14:05:03 +02:00
Juergen Hoeller aa8cf190d3 Property actually throws exception for no write method found
Issue: SPR-15507
(cherry picked from commit 817e80c)
2017-05-04 14:03:30 +02:00
Juergen Hoeller d643e57318 ResolvableType.clearCache() clears SerializableTypeWrapper cache as well
Issue: SPR-15503
(cherry picked from commit 7ca0094)
2017-05-04 14:03:22 +02:00
Juergen Hoeller 84d2e5a3c8 Optimize AntPathMatcher when checking for potential matches
Issue: SPR-15477
(cherry picked from commit baa7b1c)
2017-05-04 14:02:43 +02:00
Juergen Hoeller dab56dbb05 GenericFilterBean lazily initializes its default environment
Alignment with HttpServletBean; consistent use of EnvironmentCapable.

Issue: SPR-15469
(cherry picked from commit 1ea54eb)
2017-05-04 14:01:09 +02:00
Juergen Hoeller 9b647021f7 Allow for HttpOnly cookie result matcher
Issue: SPR-15488
(cherry picked from commit 04f0f13)
2017-05-04 14:00:37 +02:00
Juergen Hoeller 38089d8e66 Correct attributeHasNoErrors message in ModelResultMatchers
Includes consistent name quoting.

Issue: SPR-15487
(cherry picked from commit 0479dc9)
2017-05-04 14:00:15 +02:00
Gregory Vandenbroucke 554c3f3d7e Full "Forwarded" header support including port number
Issue: SPR-15504
2017-05-02 17:00:48 -04:00
Phillip Webb ee40310c92 Defer Charset.availableCharsets() call
Change the `StringHttpMessageConverter` to defer calling
Charset.availableCharsets() until absolutely necessary to help improve
startup times.

Issue: SPR-15502
2017-05-02 17:19:19 +02:00
Stephane Nicoll 226cddadef Add getTargetDataSource to TransactionAwareCacheDecorator
Issue: SPR-15479
2017-04-27 11:36:43 +02:00
Stephane Nicoll 5a80f4f16e Polish 2017-04-27 11:36:35 +02:00
John Ryan bb63ce9935 Remove extraneous asterisk
Closes gh-1397
2017-04-21 09:48:56 +02:00
Fredrik Sundberg 1b4289803b Fix Selenium links in testing.adoc
Selenium wiki & javadoc moved from google code to github.
Also a fix to a link for Geb.

Closes gh-1392
2017-04-19 09:23:14 +02:00
Spring Buildmaster 3d7576df7f Next Development Version 2017-04-18 14:46:26 +00:00
Juergen Hoeller 8b9e9202f1 Upgrade to Hibernate ORM 5.2.10 2017-04-17 19:42:10 +02:00
Juergen Hoeller afe11e7919 Revised logging documentation for the 4.3.x line 2017-04-17 19:41:59 +02:00
Juergen Hoeller 665e6cf6ca Refined log message for interface-implementing method
Issue: SPR-15436
2017-04-17 19:29:01 +02:00
Juergen Hoeller fd1d8aeeb4 Polishing
(cherry picked from commit 91df065)
2017-04-17 15:39:06 +02:00
Juergen Hoeller 9b2f9e655e CglibAopProxy logs explicit warning for interface-implementing method marked as final
Issue: SPR-15436
(cherry picked from commit 0d0b879)
2017-04-17 15:38:59 +02:00
Juergen Hoeller 6c370ed28d Recommendation for consistent @Profile declarations on overloaded @Bean methods
Issue: SPR-15266
(cherry picked from commit 5d3249f)
2017-04-17 15:38:53 +02:00
Juergen Hoeller a2b356162e Explicitly replace target ApplicationListener with singleton proxy, if any (avoiding double registration/invocation)
Issue: SPR-15452
(cherry picked from commit 9abf249)
2017-04-17 15:38:46 +02:00
Stephane Nicoll 71f7fdd632 Polish "Improve unless condition in caching doc"
Closes gh-1387
2017-04-13 17:51:20 +02:00
Michael J. Simons c35ddf905a Improve unless condition in caching doc
See gh-1387
2017-04-13 17:51:12 +02:00
Michael J. Simons d866715556 Polish condition in caching examples
Closes gh-1386
2017-04-13 17:51:02 +02:00
Juergen Hoeller a9a1f783c5 Polishing 2017-04-13 15:59:15 +02:00
Juergen Hoeller 65d52a4b97 Correctly process Postgresql ?| and ?& operator
Issue: SPR-15382
2017-04-13 15:59:07 +02:00
Juergen Hoeller 3c8fc46568 Backported JSON converter alignment (supports method, exception messages)
Includes deprecation of getTypeToken method in GsonHttpMessageConverter.

Issue: SPR-15381
2017-04-13 15:58:53 +02:00
Juergen Hoeller 421fabb2c4 Configurable locale/timezone attribute name for SessionLocaleResolver
Issue: SPR-15450
(cherry picked from commit cec36fe)
2017-04-13 15:56:07 +02:00
Juergen Hoeller 811d523211 FreeMarkerConfigurationFactory falls back to SpringTemplateLoader on any exception
Issue: SPR-15445
(cherry picked from commit a55a0f2)
2017-04-13 15:56:01 +02:00
Juergen Hoeller 40232f4e22 ASM annotation visitor defensively accesses enum constants
Issue: SPR-15442
(cherry picked from commit 4838f06)
2017-04-13 15:55:53 +02:00
Juergen Hoeller 80fa3ac907 ShadowingClassLoader can be constructed without default excludes
Issue: SPR-15439
(cherry picked from commit 1735ba2)
2017-04-13 15:55:44 +02:00
Juergen Hoeller 54180f90e2 UnknownHostException as resource-not-found for properties files
Plus first-class declaration of FileNotFoundException in Resource javadoc.

Issue: SPR-15433
(cherry picked from commit c4e0d6c)
2017-04-13 15:55:29 +02:00
Juergen Hoeller 865953f145 Optimize StringUtils.replace/deleteAny for common no-op case
Issue: SPR-15430
(cherry picked from commit ce4eff3)
2017-04-13 15:55:11 +02:00
Juergen Hoeller 93fac8882f Undeprecate TypeVariableMap methods on GenericTypeResolver
Issue: SPR-15429
(cherry picked from commit 7fbc20e)
2017-04-13 15:55:02 +02:00
Juergen Hoeller a3d199f4dd AcceptHeaderLocaleResolver returns default locale in case of no supported locale found
Issue: SPR-15426
(cherry picked from commit ea98ee8)
2017-04-13 15:54:46 +02:00
Juergen Hoeller 597fe0720f HandlerMethod evaluates ResponseStatus annotation for early caching
Issue: SPR-15227
(cherry picked from commit 5986f88)
2017-04-13 15:54:35 +02:00
Juergen Hoeller 8321f01bf8 SettableTask.checkCompletingThread() only resets marker after match
Issue: SPR-15409
(cherry picked from commit 8cb24e0)
2017-04-13 15:54:22 +02:00
Juergen Hoeller 7e736b69b7 UrlResource applies StringUtils.getFilename against cleaned URL path
Issue: SPR-15411
(cherry picked from commit 702e01a)
2017-04-13 15:54:03 +02:00
Juergen Hoeller 8b054840fc Minimize reflective interaction with annotation instances during retrieval
Issue: SPR-15387
(cherry picked from commit 3037277)
2017-04-13 15:53:46 +02:00
Juergen Hoeller 7f3d0b3e6e Test for BeanPropertySqlParameterSource with collection
Issue: SPR-15390
(cherry picked from commit af6f688)
2017-04-13 15:53:39 +02:00
Rossen Stoyanchev 546d7ddd07 Update @ControllerAdvice Javadoc
Issue: SPR-15432
2017-04-12 17:53:42 -04:00
Rob Winch 95099fd709 Fix ForwardedHeaderFilter preserves semicolon content
Previously a requestURI that contained ';' would have the value incorrectly stripped out when using
ForwardedHeaderFilter.

This commit ensures that the ';' is preserved when using ForwardedHeaderFilter.

Issue: SPR-15428
2017-04-10 09:15:15 -05:00
Rob Winch f65e1edd58 Polish
Group all contextPath tests together
2017-04-10 09:15:07 -05:00
Rob Winch 0a9f98f0df Add test to ensure ForwardedHeaderFilter contextPath preserves encoding
Add a test to verify that the ForwardedHeaderFilter contextPath override preserves URL encoding
as it should.

Issue SPR-15422
2017-04-10 09:13:41 -05:00
Rob Winch 46cf4f9ba1 ForwardedHeaderFilter requestURI preserve encoding
Previously ForwardedHeaderFilter would override the requestURI with a URL decoded value. This would cause
problems when using a URL encoded requestURI since downstream Filters would not see the URL encoded
value as they should.

This commit resolves this issue by ensuring that the requestURI is properly encoded.

Issues SPR-15422
2017-04-10 09:11:08 -05:00
Kirill Gavrilov 2b930e3858 Fix typo
Closes gh-1383
2017-04-10 09:54:44 +02:00
Stephane Nicoll bde2ddbeb1 Update copyright header
Closes gh-1382
2017-04-09 09:48:47 +02:00
John S. Ryan 4eb929c105 Fix typo in AfterReturningAdviceInterceptor JavaDoc
See gh-1382
2017-04-09 09:48:38 +02:00
Bryan Kelly d0d7a88233 Fix ForwardedHeaderFilter getRequestURL()
Previously ForwardedHeaderFilter would return the same StringBuffer for every invocation. This
meant that users that modified the StringBuffer changed the state of the HttpServletRequest.

This commit ensures that a new StringBuffer is always returned for ForwardedHeaderFilter.

Issue: SPR-15423
2017-04-07 15:45:23 -05:00
Rossen Stoyanchev f7548a87ed Deprecations related to reactive type support in 5.0
Issue: SPR-15365
2017-04-03 09:26:46 -04:00
QBNemo e0fe7cdc44 Fix typo
Closes gh-1354
2017-03-27 10:12:53 +02:00
Connor Lin 8289bf0aff Remove a redundant word
Closes gh-1361
2017-03-27 10:10:14 +02:00
Grant Hutchins 79d747410d Fix typo
Closes gh-1364
2017-03-27 10:05:49 +02:00
Brian Clozel 70bca99da8 VersionResourceResolver should delegate to the chain
Prior to this commit, the `VersionResourceResolver` implementation of
`resolveUrlPathInternal` would delegate to the resolver chain but would
never use the give result if the current request didn't match a
configured version strategy pattern.

This is a problem if the resolver supposed to resolve the resource path
is configured after a `VersionResourceResolver` in the resolver chain;
this means that other resolver never gets to participate in the result
of the chain.

Issue: SPR-15372
(cherry picked from commit fdd5031)
2017-03-24 14:27:29 +01:00
Juergen Hoeller 83617f382c Latest dependency updates (Hibernate ORM 5.2.9, Hibernate Validator 5.2.5, Undertow 1.3.28, Jetty 9.4.3, Joda-Time 2.9.9) 2017-03-24 13:41:57 +01:00
Juergen Hoeller 21ac764e5c Polishing 2017-03-24 13:41:34 +01:00
Juergen Hoeller c4fda0e811 Up-to-date guidelines for serialization-based endpoints
Issue: SPR-15317
(cherry picked from commit 2236262)
2017-03-24 13:41:19 +01:00
Juergen Hoeller 66670cfd56 Clarification: Spring AOP pointcuts may match non-public methods
Issue: SPR-15354
(cherry picked from commit b90d3d0)
2017-03-24 13:41:08 +01:00
Juergen Hoeller c31bfe65aa Drop outdated DeferredQueryInvocationHandler.finalize() implementation
Issue: SPR-15363
(cherry picked from commit b2a6a57)
2017-03-24 13:40:58 +01:00
Juergen Hoeller 22ddb35258 HeaderValueHolder.toString() exposes underlying list of header values
Issue: SPR-15375
(cherry picked from commit 15bff8f)
2017-03-24 13:40:43 +01:00
Juergen Hoeller d0177b0f55 Revised supportedMethods null handling in HttpRequestMethodNotSupportedException
Issue: SPR-15377
(cherry picked from commit 5ea4abd)
2017-03-24 13:40:35 +01:00
Juergen Hoeller 2233ec04ff StandardMultipartFile.transferTo falls back to manual copy
Issue: SPR-15257
(cherry picked from commit b73153c)
2017-03-24 13:40:29 +01:00
Juergen Hoeller e9ff3bb4e3 DefaultResponseErrorHandler delegate methods declared as protected
Also revises copyToByteArray/String in FileCopyUtils/StreamUtils for lenient null handling.

Issue: SPR-15329
(cherry picked from commit ab7db41)
2017-03-24 13:40:19 +01:00
Juergen Hoeller 57c8c759ae Avoid pattern misdetection in Tomcat "war:" URL separator
Issue: SPR-15332
(cherry picked from commit 012c56a)
2017-03-24 13:39:42 +01:00
Juergen Hoeller cfd9b3461f Process NULLABLE column as integer instead of boolean
Issue: SPR-15333
(cherry picked from commit 79ea779)
2017-03-24 13:39:10 +01:00
Rossen Stoyanchev d3324c8d4f Trap exception from SockJS HeartbeatTask
Issue: SPR-15307
2017-03-16 18:02:44 -04:00
Rossen Stoyanchev ffe9bae138 Update Javadoc on exception resolvers in MVC config
Issue: SPR-15324
2017-03-07 20:51:22 -05:00
Juergen Hoeller 020e51cb96 Polishing
(cherry picked from commit 94a7624)
2017-03-07 16:04:46 +01:00
Juergen Hoeller a78066830b Retrieve newly created attribute from underlying request (marking it for update)
Issue: SPR-15300
(cherry picked from commit f30c498)
2017-03-07 16:04:39 +01:00
Juergen Hoeller 77c771e874 Lookup methods work on configuration classes as well
Issue: SPR-15316
(cherry picked from commit fc2e635)
2017-03-07 16:04:16 +01:00
Juergen Hoeller 227ac3faa4 Explicit notes on transaction phase processing
Issue: SPR-15323
(cherry picked from commit 8b74150)
2017-03-07 16:04:09 +01:00
Juergen Hoeller 98dbc17591 Polishing 2017-03-07 10:33:48 +01:00
Juergen Hoeller e58b17a3a1 Adapt to JRuby 9.1.7+ RubyException.getMessage() method at runtime
Issue: SPR-15322
2017-03-07 10:33:34 +01:00
Juergen Hoeller 9de97614a0 Adapt to HtmlUnit 2.25 getCharset() return type at runtime
Issue: SPR-15319
2017-03-07 10:33:26 +01:00
Juergen Hoeller 015e00b5dd Upgrade to CGLIB 3.2.5
Includes Jetty 9.4.2, Netty 4.1.8, Commons I/O 1.4 as well.

Issue: SPR-15147
(cherry picked from commit 0d7b25f)
2017-03-07 10:23:57 +01:00
Stephane Nicoll 0bc59225d8 Polish contribution
Closes gh-1349
2017-03-05 09:35:09 +01:00
Aviskar Basnet d8acc27afb Polish doc
See gh-1349
2017-03-05 09:34:58 +01:00
Stephane Nicoll a1e4afe338 Update copyright header
Closes gh-1343
2017-03-03 09:35:29 +01:00
nkjackzhang 3b9faee335 Remove unecessary "<<"
See gh-1343
2017-03-03 09:35:16 +01:00
Spring Buildmaster 0048ff84ea Next Development Version 2017-03-01 08:53:20 +00:00
Juergen Hoeller c3f131325d Upgrade to Groovy 2.4.9 2017-02-28 14:01:09 +01:00
Juergen Hoeller b945e0f202 Polishing
(cherry picked from commit 6d6cf01)
2017-02-28 14:00:59 +01:00
Juergen Hoeller ce3cf3251d Tests for annotation lookups in interfaces (currently ignored for CGLIB proxies)
Issue: SPR-15271
Issue: SPR-14949
Issue: SPR-14322
(cherry picked from commit d003f66)
2017-02-28 14:00:39 +01:00
Juergen Hoeller d69fb06852 Skip transaction/caching metadata retrieval for java.lang.Object methods
Also retrieves CacheConfig as merged annotation now, aligned with other caching annotations.

Issue: SPR-15296
(cherry picked from commit d4a1b59)
2017-02-28 14:00:33 +01:00
Rossen Stoyanchev e9de3bb85b Fix wrong access modifier in MockMvc standalone setup
Issue: SPR-15248
2017-02-23 16:12:14 -05:00
Juergen Hoeller e6a51e3d29 Upgrade to Jackson 2.8.7 2017-02-22 16:32:51 +01:00
Juergen Hoeller c734c3a3fe Polishing 2017-02-22 16:32:21 +01:00
Juergen Hoeller a48a956c0c ConfigurationClassEnhancer explicitly handles non-interceptable FactoryBeans
Issue: SPR-15275
(cherry picked from commit 7fb0ad3)
2017-02-22 16:31:48 +01:00
Juergen Hoeller e5010a823b Test for expected behavior of getAllMergedAnnotations vs findAllMergedAnnotations
Issue: SPR-15271
(cherry picked from commit 6108ab1)
2017-02-22 16:31:40 +01:00
stonio 1db42081e5 Use String#isEmpty()
Closes gh-1335
(cherry picked from commit 7d062df)
2017-02-22 16:31:35 +01:00
Juergen Hoeller 34a0857628 Polishing
(cherry picked from commit d2cc97a)
2017-02-21 23:03:16 +01:00
Rossen Stoyanchev ba0484fcac Add equals/hashcode for STOMP Subscription
Issue: SPR-15229
2017-02-21 15:10:27 -05:00
Juergen Hoeller f1133a8e56 Upgrade to Hibernate ORM 5.2.8 2017-02-20 23:15:41 +01:00
Juergen Hoeller 35e37f6b60 Polishing 2017-02-20 23:15:05 +01:00
Juergen Hoeller f117b804a8 ServletRequestMethodArgumentResolver passes null references through (again)
Issue: SPR-15214
(cherry picked from commit fc11321)
2017-02-20 23:14:54 +01:00
Stephane Nicoll 278199d467 Revert "Improve allowNullValue handling when a null value is provided"
This reverts commit fd568f3e96.
2017-02-20 16:36:23 +01:00
Stephane Nicoll fd568f3e96 Improve allowNullValue handling when a null value is provided
This commit improves `AbstractValueAdaptingCache` to throw a dedicated
exception if `allowNullValues` is `false` and a `null` value is provided
anyway. This avoid a lower-level exception from the cache library that
will miss some context.

Issue: SPR-15173
2017-02-20 16:24:34 +01:00
Brian Clozel 45b27a85f4 Ignore HEAD requests in ShallowEtagHeaderFilter
Prior to this commit, the `ShallowEtagHeaderFilter` could participate in
the response and set its ETag/Content-Length headers, even for HEAD
requests. Since the response body is empty, the filter implementation
would set a `"Content-Length: 0"`.

The RFC states that responses to HEAD requests should exhibit identical
response headers to GET (with the possible exception of payload related
headers such as Content-Length.

With this commit, `ShallowEtagHeaderFilter` now ignores HEAD requests
since the proper values may be set already for payload related headers
by the handler. The filter has no way to generate a proper ETag value
nor calculate the content length without the actual body.

Issue: SPR-15261
(cherry picked from commit b732251)
2017-02-20 12:23:06 +01:00
Juergen Hoeller 0f71f58616 Polishing 2017-02-18 00:52:12 +01:00
Juergen Hoeller 9834c42b5c MutableMessageHeaders serializes itself as regular MessageHeaders
Issue: SPR-15262
(cherry picked from commit 74bdcd8)
2017-02-18 00:51:02 +01:00
Andy Clement 7879bdfc1d Fix compilation of SpEL elvis/ternary expressions
Without this fix the compiled version of elvis
actual behaved differently to the interpreted version
if the value being queried was an empty string. This
is now fixed. It also now correctly handles the
query value being a primitive and addresses the
findings of SPR-15192 where some type inferencing
logic was trying to be too clever, that code has
been deleted.

Issue: SPR-15192
(cherry picked from commit d41d28f)
2017-02-18 00:50:30 +01:00
Juergen Hoeller dfa8a7c358 Polishing 2017-02-16 15:57:52 +01:00
Juergen Hoeller 427fd9b19a OracleTableMetaDataProvider tries Connection.unwrap as well
Issue: SPR-14670
2017-02-16 15:57:39 +01:00
Juergen Hoeller 6417ed47ab Latest dependency updates (Apache HttpAsyncClient 4.1.3, BeanShell 2.0b5) 2017-02-16 14:20:54 +01:00
Juergen Hoeller b0ef80c3ff Polishing 2017-02-16 14:20:40 +01:00
Juergen Hoeller 7ed4884eaa Recent dialects for MySQL and SQL Server (as far as possible in 4.3.x)
Issue: SPR-15255
2017-02-16 14:20:33 +01:00
Juergen Hoeller c3cc42d4d3 Avoid double encoding of URIs
Issue: SPR-15254
2017-02-16 14:20:15 +01:00
Juergen Hoeller 860e2bcc2d Revised isInstanceOf/isAssignable message concatenation
Issue: SPR-15196
(cherry picked from commit 22322fd)
2017-02-16 14:20:07 +01:00
Juergen Hoeller 06231721c3 Consistently support CompletionStage next to CompletableFuture
Issue: SPR-15258
(cherry picked from commit 50d93d3)
2017-02-16 14:20:02 +01:00
Juergen Hoeller 4d2360e5b5 Defensively ignore multipart parsing failure in case of error dispatch
Issue: SPR-15231
(cherry picked from commit d44325e)
2017-02-16 14:19:57 +01:00
Stephane Nicoll 4f52174674 Update copyright header
Closes gh-1327
2017-02-14 10:41:03 +01:00
hengyunabc 7d7c5c9d9c Fix typo
See gh-1327
2017-02-14 10:40:51 +01:00
Brian Clozel 08b9e7b83e Avoid duplicate Content-Length headers in Netty client
This commit checks that a "Content-Length" request header isn't already
present before adding one in `Netty4ClientHttpRequestFactory`.
`HttpMessageConverter` implementations can write that request header so
the Netty request factory should only write that value when the header
is missing.

If that header is not written (and since we're not dealing with
the HTTP exchange in a chunked-based fashion), the HTTP client might not
send the request body at all.

Issue: SPR-15241
2017-02-13 21:19:51 +01:00
Juergen Hoeller e24c530705 Upgrade to Undertow 1.3.27 2017-02-10 11:48:18 +01:00
Juergen Hoeller 5017c05c23 Polishing
(cherry picked from commit e9019cd)
2017-02-10 11:47:28 +01:00
Juergen Hoeller 6e93834e27 Correct explanation of example patterns
Issue: SPR-15240
(cherry picked from commit e1bb697)
2017-02-10 11:47:10 +01:00
Juergen Hoeller 5f90a7eee9 Delegate to common ClassUtils.getQualifiedName
Issue: SPR-15237
(cherry picked from commit 81aca78)
2017-02-10 11:47:00 +01:00
Juergen Hoeller eff285eb3b MockHttpServletRequest exposes "HTTP/1.1" as default protocol
Issue: SPR-15232
(cherry picked from commit ed85337)
2017-02-10 11:46:42 +01:00
Juergen Hoeller da7d79b3a1 Test for ObjectFactory injection at constructor level
Issue: SPR-15222
(cherry picked from commit 65d8d69)
2017-02-10 11:46:32 +01:00
Juergen Hoeller d6216fb74a Consistent logging in ignoreResourceNotFound scenarios
Issue: SPR-15218
(cherry picked from commit 448ea4c)
2017-02-10 11:46:24 +01:00
Juergen Hoeller 941f3e7166 Clear synchronization before triggering afterCompletion callbacks
Issue: SPR-15194
Issue: SPR-11590
(cherry picked from commit b630c9b)
2017-02-10 11:46:13 +01:00
Stephane Nicoll e80c251c7a Update copyright header 2017-02-09 16:07:14 +01:00
Masayasu Yamamoto 56abc4a429 Fix Javadoc in ContentResultMatchers
Closes gh-1322
2017-02-09 16:07:05 +01:00
Stephane Nicoll dde9e27630 Polish 2017-02-06 15:31:39 +01:00
Stephane Nicoll 15b174a522 Polish contribution
Closes gh-1292
Issue: SPR-15188
2017-02-06 15:31:31 +01:00
David Brimley 1fcb2608fb Honour ErrorHandler if Cache.put fails
This commit makes sure that the `ErrorHandler` is invoked if the cache
fails to put an element (be it in the main cache or the exception cache).

See gh-1292
Issue: SPR-15188
2017-02-06 15:31:18 +01:00
Juergen Hoeller c15d687bf0 Polishing
(cherry picked from commit acf511a)
2017-02-02 21:20:27 +01:00
Juergen Hoeller e038631a6d Support for read-only transactions through explicit SET TRANSACTION statement
Issue: SPR-15210
(cherry picked from commit 02195f5)
2017-02-02 21:20:17 +01:00
Juergen Hoeller d5daa8e3a7 Skip default Content-Length if Transfer-Encoding header has been set
Issue: SPR-15212
(cherry picked from commit 9b3131f)
2017-02-02 21:19:53 +01:00
Juergen Hoeller 6014ca9140 ServletRequestMethodArgumentResolver validates argument type match
Issue: SPR-15214
(cherry picked from commit e44533f)
2017-02-02 21:19:45 +01:00
Juergen Hoeller d4010573af MockHttpServletRequest returns empty BufferedReader in case of no content
Issue: SPR-15215
(cherry picked from commit 0da964f)
2017-02-02 21:16:44 +01:00
Juergen Hoeller e3cd5c8ef0 SettableListenableFuture centralizes state in ListenableFutureTask subclass
Issue: SPR-15216
(cherry picked from commit c9b99da)
2017-02-02 21:16:36 +01:00
Juergen Hoeller dec1c93b24 SettableListenableFuture consistently tracks cancellation state
Issue: SPR-15202
(cherry picked from commit 9666fcc)
2017-01-31 16:11:23 +01:00
Juergen Hoeller 3ef6697536 Refined assertion messages
Issue: SPR-15196
(cherry picked from commit 9b26fcd)
2017-01-31 16:07:09 +01:00
Juergen Hoeller 8207c53b9a Polishing 2017-01-31 11:36:52 +01:00
Juergen Hoeller e3be94c961 Add headers in InterceptingClientHttpRequest
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.

Issue: SPR-15166
2017-01-31 11:32:21 +01:00
Juergen Hoeller b40f016de2 Latest dependency updates (OkHttp 3.6, Apache HttpClient 4.5.3) 2017-01-31 10:29:21 +01:00
Juergen Hoeller 28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Spring Buildmaster b386be1529 Next Development Version 2017-01-25 13:34:40 +00:00
Juergen Hoeller a98a61852f HandlerMethod pre-resolves parameter types at construction time
Issue: SPR-15186
(cherry picked from commit 8038fb9)
2017-01-25 11:12:27 +01:00
Juergen Hoeller 3304efd64d Consistent type variable resolution for arrays/collections (in particular at field level)
Deprecating GenericCollectionTypeResolver in favor of direct ResolvableType usage.

Issue: SPR-15160
(cherry picked from commit 5e946c2)
2017-01-24 19:31:41 +01:00
Juergen Hoeller b97e7d53bc Revised CookieLocaleResolver parse exception handling
Issue: SPR-15182
(cherry picked from commit e8776f8)
2017-01-24 19:28:47 +01:00
Juergen Hoeller 4af6d58d8d Upgrade to Objenesis 2.5.1
Includes Hibernate ORM 5.2.7, Rome 1.7.1, Jetty 9.4.1, Undertow 1.3.26

Issue: SPR-15146
2017-01-23 23:47:22 +01:00
Juergen Hoeller e2d06eaae5 Deprecate outdated abstractions/delegates in core/util
Issue: SPR-15159
2017-01-23 23:47:14 +01:00
Juergen Hoeller fcfacd9f83 Polishing
(cherry picked from commit f095aa2)
2017-01-23 23:47:01 +01:00
Juergen Hoeller bddcc669b3 WebSocketSession.getExtensions consistently exposes unmodifiable/empty list
Issue: SPR-15180
(cherry picked from commit e94fa3f)
2017-01-23 23:33:04 +01:00
Juergen Hoeller 2024b37e65 HiddenHttpMethodFilter defensively proceeds with original request in case of error dispatch
Issue: SPR-15179
(cherry picked from commit a0df36d)
2017-01-23 23:32:20 +01:00
Juergen Hoeller fb3191904a DispatcherServet.checkMultipart considers MultipartException cause as well
Issue: SPR-15178
(cherry picked from commit ecc22f7)
2017-01-23 23:31:55 +01:00
Juergen Hoeller 9e4d74c502 Consider abstract classes with @Lookup methods as candidate components
Issue: SPR-14550
(cherry picked from commit 7d3fcaa)
2017-01-23 23:31:31 +01:00
Juergen Hoeller 9b221f58b9 Document further configuration class restrictions
Issue: SPR-14602
(cherry picked from commit 6fe7e56)
2017-01-23 23:31:03 +01:00
Juergen Hoeller f7c3b814e3 Only expose ASM-driven method order if the methods match
Issue: SPR-14505
(cherry picked from commit 253060c)
2017-01-23 23:30:36 +01:00
Juergen Hoeller 155bbb8466 Clear nonAnnotatedClasses cache in afterSingletonsInstantiated
Issue: SPR-15175
(cherry picked from commit e566e25)
2017-01-23 23:30:13 +01:00
Juergen Hoeller 4f690eea2a Drop classes folder (accidentally added in 35b67a5) 2017-01-23 22:37:39 +01:00
Rossen Stoyanchev 70a1ecba7f Documentation update related to Reactor version
Issue: SPR-15129
2017-01-23 15:02:01 -05:00
Rossen Stoyanchev c8b0ff2fca Add ExpectedCount#never()
Issue: SPR-15168
2017-01-20 17:11:09 -05:00
Stephane Nicoll f9a4856c3b Backport log4j doc improvements
Issue: SPR-15170
2017-01-20 17:38:20 +01:00
Brian Clozel 35b67a54d2 Upgrade to Tomcat 8.5.11 2017-01-20 09:55:33 +01:00
Rossen Stoyanchev 78a23be9bc Polish Reactor2TcpStompClient 2017-01-18 11:46:36 -05:00
Juergen Hoeller 09c5958608 Polishing 2017-01-18 00:53:59 +01:00
Juergen Hoeller ffb295971a Polishing 2017-01-18 00:27:04 +01:00
Rossen Stoyanchev 77bb7e6030 Add accessor methods to HttpPutFormContentFilter
Issue: SPR-14503
2017-01-17 17:18:03 -05:00
Rossen Stoyanchev 75daf781c2 Well-known names for beans in message broker XML config
Issue: SPR-15068
2017-01-17 17:08:45 -05:00
Rossen Stoyanchev fcead670f0 Add locking to AbstractRequestExpectationManager
This commit ensures that verifying a request, which includes finding
and updating expectations, is done synchronously to avoid concurrent
modification exceptions.

Technically SimpleRequestExpectationManager is not even expected to see
concurrent requests by definition but with
UnorderedRequestExpectationManager it can happen.

Issue: SPR-15029
2017-01-17 16:48:26 -05:00
Juergen Hoeller 801b93a078 Clarify WebContentInterceptor path mappings and efficiently match them
Issue: SPR-15096
2017-01-17 21:12:54 +01:00
Juergen Hoeller 4beeeb8118 ContentCachingRequestWrapper supports content cache limit
Issue: SPR-14829
(cherry picked from commit ad53867)
2017-01-17 20:57:28 +01:00
Juergen Hoeller 64d4afad9f SimpleApplicationEventMulticaster defensively swallows ClassCastException without message
Issue: SPR-15145
(cherry picked from commit 976d32f)
2017-01-17 20:43:59 +01:00
Rossen Stoyanchev 48f57e3bb2 Explicitly manage event loop in Reactor2TcpStompClient
Reactor2TcpStompClient now explicitly manages a Netty EventLoopGroup
which prevents resource leaks on attempts to reconnect.

Issue: SPR-15035
2017-01-17 14:19:36 -05:00
Juergen Hoeller d92f69747b Remove outdated groovy-bean-definition-dsl id in whats-new
Issue: SPR-15153
2017-01-17 16:23:55 +01:00
Juergen Hoeller 315698b50e Clarified cookieMaxAge default
Issue: SPR-15155
(cherry picked from commit 874b653)
2017-01-17 15:36:33 +01:00
Juergen Hoeller 6deccf123d Reference documentation for Groovy bean definition DSL
Issue: SPR-15153
(cherry picked from commit 2047f8d)
2017-01-17 15:35:24 +01:00
Juergen Hoeller 391ebc8eda Correct reference to XJC classpath
(cherry picked from commit 54da4a8)
2017-01-17 15:35:03 +01:00
Brian Clozel 28c7f65a25 Add SNI support in Netty4ClientHttpRequestFactory
This commit changes the `Bootstrap` to create a SSL Handler with
advisory peer information; this enables support for SNI.

Issue: SPR-15101
(cherry picked from commit 0c99346)
2017-01-17 11:32:10 +01:00
Juergen Hoeller caebe72083 Proper resolution of Optional.empty() for header arguments
Issue: SPR-15151
(cherry picked from commit e9db4d6)
2017-01-17 11:04:43 +01:00
Juergen Hoeller f79baec5ff Polishing
(cherry picked from commit 46fc7fb)
2017-01-16 23:14:12 +01:00
Vedran Pavić d1c0ea7d74 Set MockSessionCookieConfig#maxAge default to -1
Issue: SPR-15142
(cherry picked from 83beb9d57d)
2017-01-16 23:07:26 +01:00
Juergen Hoeller 53e2d7d160 Upgrade to Objenesis 2.5
(plus Groovy 2.4.8, Jackson 2.8.6, Netty 4.1.7)

Issue: SPR-15146
2017-01-16 22:44:07 +01:00
Juergen Hoeller 8c62a2f11a Polishing
(cherry picked from commit 95330d0)
2017-01-16 22:43:54 +01:00
Juergen Hoeller 8656e30550 Revised InvocableHandlerMethod exception messages (controller vs endpoint vs handler)
Introduces dedicated MethodArgumentResolutionException for spring-messaging invocations.

Issue: SPR-15139
(cherry picked from commit 047786a)
2017-01-16 22:43:48 +01:00
Juergen Hoeller 0655d73f8e SimpleApplicationEventMulticaster defensively handles ClassCastException without message
Issue: SPR-15145
(cherry picked from commit 153fd82)
2017-01-16 22:43:35 +01:00
Juergen Hoeller 24ebd15f9c Introspect FactoryBean class declaration if no early instantiation possible
Issue: SPR-15125
(cherry picked from commit 32fc855)
2017-01-16 22:43:18 +01:00
Juergen Hoeller cce84711c6 MockHttpServletRequestBuilder reliably detects form body content type again
Issue: SPR-15116
(cherry picked from commit e88e8f1)
2017-01-16 22:43:01 +01:00
Juergen Hoeller 7f127300f9 Polishing 2017-01-12 23:43:27 +01:00
Juergen Hoeller 1521094c5b MimeTypeUtils constants cleanup: deprecated web media types
Issue: SPR-15137
2017-01-12 23:43:00 +01:00
Juergen Hoeller 0b8134049c Upgrade to Joda-Time 2.9.7 2017-01-12 22:55:23 +01:00
Juergen Hoeller 70a980db58 Polishing 2017-01-12 22:54:23 +01:00
Juergen Hoeller 8b960099f1 Introduce media types for application/rss+xml
Issue: SPR-15109
2017-01-12 22:53:38 +01:00
Juergen Hoeller cc53d597c0 MySQLMaxValueIncrementer supports "useNewConnection" mode for INNODB tables
Issue: SPR-15107
2017-01-12 22:53:10 +01:00
Juergen Hoeller 5982f732b4 Improve performance of StringUtils.capitalize()
Issue: SPR-15094
2017-01-12 22:51:56 +01:00
Juergen Hoeller c5500b2332 MockHttpServletRequestBuilder supports multiple locales
Includes revised content type handling.

Issue: SPR-15116
(cherry picked from commit 02d727f)
2017-01-12 22:50:50 +01:00
Juergen Hoeller de611cb3a9 SpringValidatorAdapter properly handles HV-5-style list constraint violations
Issue: SPR-15082
(cherry picked from commit d0e9328)
2017-01-12 22:50:33 +01:00
Juergen Hoeller 72a76367f2 AbstractMessageSource does not attempt to format code-as-default-message
Issue: SPR-15123
(cherry picked from commit b06423a)
2017-01-12 22:50:22 +01:00
Juergen Hoeller 5afc3a3a50 Map resolution for multiple beans applies to plain Map interface declaration only
Issue: SPR-15117
(cherry picked from commit 8084da5)
2017-01-12 22:50:04 +01:00
Juergen Hoeller 2f2ef00d1f BeanDefinitionBuilder supports factory method on factory bean
Issue: SPR-15098
(cherry picked from commit 9e6aa0f)
2017-01-12 22:49:44 +01:00
Juergen Hoeller de7eea4498 GenericTableMetaDataProvider falls back to single schema as default
Issue: SPR-15090
(cherry picked from commit de43497)
2017-01-12 22:49:32 +01:00
Juergen Hoeller e9a87de965 LinkedCaseInsensitiveMap provides case-insensitive keySet again
Issue: SPR-15026
(cherry picked from commit 50e5a65)
2017-01-12 22:49:25 +01:00
Gary Russell db7b74feac Implement MessagingException.toString()
Issue: SPR-15091
Closes gh-1284
2017-01-05 10:25:55 +01:00
Philippe Marschall f7d126043b Remove use of Boolean constructors
Codacy warns us that there are several references to Boolean
constructors in the tests. Direct usage of the Boolean constructor is
discouraged and even deprecated in Java 9 [1]. Boolean constructor use
can easily be replaced with the constant instances.

This commit contains the following changes:

 - replace references to Boolean constructors with boolean constants in
   JSP tag tests
 - update the copyright year where necessary
 - BooleanComparatorTests is intentionally left unchanged as it should
   also work with the non-constant instances correctly

 [1] http://download.java.net/java/jdk9/docs/api/java/lang/Boolean.html#Boolean-boolean-

Issue: SPR-15076
2017-01-04 09:32:32 +01:00
Philippe Marschall 55b44b4f86 Avoid use of double constructor of BigDecimal
Codacy warns about an Error Prone [1] use of the double constructor of
BigDecimal in tests. The reason given is that it is a source of
precision loss if the number does not have an exact double
representation. The recommendation is to use the String constructor of
BigDecimal instead as it does not require using a lossy argument.

This commit contains the following changes:

 - replace usage of the double constructor of BigDecimal with the
   String constructor of BigDecimal in JdbcTemplateQueryTests
 - update the copyright year

 [1] http://errorprone.info/bugpattern/BigDecimalLiteralDouble

Issue: SPR-15077
2017-01-04 09:32:23 +01:00
Rob Winch 523370b6f2 Fix ForwardedHeaderFilter with non-empty contextPath
Issue: SPR-15088
2017-01-03 14:52:50 -06:00
Philippe Marschall 131d2c2051 Remove String#toCharArray from ScriptUtils
ScriptUtils contains two calls to String#toCharArray for the sole
purpose to iterating over all chars in a String. Not only is this
unnecessary and can be replaced with String#charAt it also causes
additional allocator and heap pressure because String#toCharArray
rather than returning the backing array (which is gone in Java 9)
creates a copy.

This commit contains the following changes:

 - remove String#toCharArray from ScriptUtils and replace with
   String#charAt

Issue: SPR-15075
2017-01-03 18:02:45 +01:00
Brian Clozel 7f05c2a18c Fix default content-type for ResourceRegion HTTP responses
Prior to this commit, the `ResourceRegionHttpMessageConverter` would
rely on the default implementation of `getDefaultContentType` to guess
the default Content-Type of the resource region to be written to the
HTTP response. That implementation fetches the first media type
provided in the HTTP request "Accept" header.

This behavior is not correct when converting resources and this commits
aligns this converter with the `ResourceHttpMessageConverter` which uses
JAF to guess the correct Content-Type of the given resource, or just
returns "application/octet-stream" as a default value.

Issue: SPR-15041
2017-01-03 11:18:40 +01:00
Juergen Hoeller 8fc65ab0a5 Clarified setAutowireCandidate semantics (plus attribute reordering in BeanDefinition)
Issue: SPR-15072
(cherry picked from commit e8a082f)
2016-12-30 11:55:55 +01:00
Juergen Hoeller b6108e3b2d Upgrade to ASM 5.2
Issue: SPR-15071
(cherry picked from commit ccabff6)
2016-12-30 11:55:50 +01:00
Juergen Hoeller 26a4aef417 Polishing
(cherry picked from commit fc629bb)
2016-12-29 23:12:11 +01:00
Juergen Hoeller 050f2c746d Track bean dependencies for calls between @Bean methods within @Configuration classes
Issue: SPR-15069
(cherry picked from commit a5c6658)
2016-12-29 23:12:05 +01:00
Juergen Hoeller fd21e0e69a @Scheduled reliably applies after other post-processors and shuts down before TaskScheduler
Issue: SPR-14692
Issue: SPR-15067
(cherry picked from commit edc62be)
2016-12-29 23:12:00 +01:00
Juergen Hoeller 794580ffcd TypeDescriptor efficiently matches equal annotations as well
Issue: SPR-15060
(cherry picked from commit e38c020)
2016-12-28 23:21:14 +01:00
Juergen Hoeller d44bc27c9a Avoid FactoryBean initialization on isSingleton check for decorated bean definition
Issue: SPR-14892
Issue: SPR-15042
(cherry picked from commit 209e7a7)
2016-12-28 23:20:15 +01:00
Juergen Hoeller 243e21a3ea Backport streamlined ClassPathBeanDefinitionScanner setup
Issue: SPR-15061
2016-12-27 18:32:03 +01:00
Juergen Hoeller 20aaa8841c PATCH does not work with the standard JDK HTTP library
Issue: SPR-15052
(cherry picked from commit 0480981)
2016-12-27 18:31:14 +01:00
Juergen Hoeller d77ab67c56 AbstractNestablePropertyAccessor's setPropertyValue refactored into several delegate methods
Issue: SPR-15053
(cherry picked from commit 64d6561)
2016-12-27 18:31:05 +01:00
Sebastien Deleuze dd2b6a0fc5 Avoid NPE in AutoProxyRegistrar when no attribute found
Issue: SPR-15055
2016-12-27 16:34:29 +01:00
Juergen Hoeller f949461297 Polishing
(cherry picked from commit a8741dd)
2016-12-26 11:40:49 +01:00
Juergen Hoeller 9a39a25bb5 Detect generic type match behind interface-based proxy as well
Issue: SPR-14097
(cherry picked from commit f805427)
2016-12-26 11:40:40 +01:00
Juergen Hoeller 4b018407c1 Expose reflection metadata with ASM-driven method order
Issue: SPR-14505
(cherry picked from commit 0208198)
2016-12-26 11:40:33 +01:00
Juergen Hoeller 28e114b569 Clarify programmatic contract (no annotation-driven injection)
Issue: SPR-8704
(cherry picked from commit fd41f63)
2016-12-26 11:40:25 +01:00
Juergen Hoeller 99226e0fa6 Polishing 2016-12-23 21:16:43 +01:00
Juergen Hoeller 4a84ee07be ConfigurationClassParser enforces @Bean declaration order through ASM metadata
Issue: SPR-14505
(cherry picked from commit 3295a4e)
2016-12-23 20:46:11 +01:00
Juergen Hoeller 505480cf63 LinkedCaseInsensitiveMap delegates to LinkedHashMap instead of extending it
Issue: SPR-15026
(cherry picked from commit 8147c11)
2016-12-23 20:46:07 +01:00
Juergen Hoeller fa2bfdd326 Remove unused Log object from MessageHeaderAccessor
Issue: SPR-15045
(cherry picked from commit 5c48daa)
2016-12-22 23:44:34 +01:00
Juergen Hoeller afe022853c Reintroduced initDefaultStrategies callback for compatibility with old MessageListenerAdapter subclasses
Issue: SPR-15043
2016-12-22 22:17:01 +01:00
Juergen Hoeller 41b834f76e Consistent ClassLoader propagation and ConcurrentHashMap setup for AspectJ pointcuts
Issue: SPR-15040
(cherry picked from commit d64d9ab)
2016-12-22 22:16:54 +01:00
Spring Buildmaster a88436c806 Next Development Version 2016-12-21 11:11:53 +00:00
Brian Clozel e2d6e709c3 Normalize resource URL in ResourceServlet
Issue: SPR-14946
2016-12-21 10:21:28 +01:00
Juergen Hoeller bd7fee5a77 Upgrade to Hibernate ORM 5.2.6 2016-12-21 10:10:49 +01:00
Juergen Hoeller 709d4ba6e7 Avoid explicit DecoratedObjectFactory setup in JettyRequestUpgradeStrategy
Issue: SPR-14940
2016-12-21 09:47:29 +01:00
Juergen Hoeller 8d55c7d60a Backported DataBinder configuration tests
Issue: SPR-15009
2016-12-21 09:31:55 +01:00
Juergen Hoeller 9cb4de8b5e Polishing 2016-12-20 21:11:07 +01:00
Juergen Hoeller 8662c61a17 Polishing
(cherry picked from commit 154ef8b)
2016-12-20 20:14:25 +01:00
Juergen Hoeller 935671ae32 Defensively catch any exception from match attempts (for compatibility with AspectJ 1.8.10)
Issue: SPR-15019
(cherry picked from commit 97ea22c)
2016-12-20 12:25:30 +01:00
Juergen Hoeller a5ce965d22 ConfigurationClassPostProcessor programmatically registers unified ImportAwareBeanPostProcessor
Issue: SPR-14931
(cherry picked from commit f6b2a21)
2016-12-20 12:25:22 +01:00
Juergen Hoeller 1e58c80fe7 MBeanExporter silently ignores null beans
Issue: SPR-15031
(cherry picked from commit 9c55d22)
2016-12-19 16:57:48 +01:00
Juergen Hoeller a92ae4ba30 Fixed backport gaps 2016-12-19 02:09:05 +01:00
Juergen Hoeller b5f2e56e38 Polishing 2016-12-19 01:51:57 +01:00
Juergen Hoeller 594f4d56b8 RestTemplate provides patchForObject operations
Issue: SPR-14857
2016-12-19 01:51:47 +01:00
Juergen Hoeller 2d83ca61e7 JdbcTemplate consistently delegates to getColumnMapRowMapper
Issue: SPR-15018
2016-12-19 01:49:58 +01:00
Juergen Hoeller 307e37a69f Flexible setMessageCodesResolver and deprecated setExtractOldValueForEditor at DataBinder level
Issue: SPR-15009
2016-12-19 01:49:38 +01:00
Juergen Hoeller 8310eb3b1f Latest dependency updates (OkHttp 3.5, Jackson 2.8.5, Jetty 9.3.14, Tomcat 8.5.9) 2016-12-19 01:49:12 +01:00
Juergen Hoeller b9c4f1fa95 ResolvableType-based matching respects generic factory method return type
Includes consistent use of ResolvableType.resolve() wherever applicable.

Issue: SPR-15011
(cherry picked from commit 4c005e6)
2016-12-19 01:12:14 +01:00
Juergen Hoeller faab4f9e28 Consistent DeferredResultHandler invocation outside of result lock
Issue: SPR-14978
(cherry picked from commit 37c734e)
2016-12-19 01:10:38 +01:00
Juergen Hoeller 271b0abc45 LocaleContextHolder provides support for framework-level default settings
Issue: SPR-15017
(cherry picked from commit 23f0418)
2016-12-19 01:10:09 +01:00
Juergen Hoeller f0c3d50408 Defensively catch IllegalStateException from match attempts (for compatibility with AspectJ 1.8.10)
Issue: SPR-15019
(cherry picked from commit 3370f41)
2016-12-19 01:09:36 +01:00
Juergen Hoeller f0fdff1f07 OkHttpClientHttpRequestFactory allows POST request without body
Issue: SPR-15015
(cherry picked from commit 2954385)
2016-12-19 01:09:06 +01:00
Juergen Hoeller d15df3489e Avoid proxy replacement for generic return type signatures
Issue: SPR-15010
(cherry picked from commit 6d1cae2)
2016-12-19 01:04:00 +01:00
Juergen Hoeller f3cc4ab09d @RequestBody supports java.util.Optional
Issue: SPR-15007
(cherry picked from commit eeb7ae5)
2016-12-19 01:03:18 +01:00
Juergen Hoeller 442d8a68a6 TypeDescriptor properly narrows ResolvableType for non-typed collection elements
Issue: SPR-14971
(cherry picked from commit aef1460)
2016-12-19 01:02:18 +01:00
Juergen Hoeller 934fffec68 AutowiredAnnotationBeanPostProcessor tolerates annotated no-arg constructors
Issue: SPR-15005
(cherry picked from commit 8b5ee4e)
2016-12-19 01:01:59 +01:00
Juergen Hoeller 8190e7838f SQLErrorCodesFactory provides unregisterDatabase method
This commit also migrates from a WeakHashMap to a ConcurrentReferenceHashMap, allowing for concurrent access to existing cache entries.

Issue: SPR-15006
(cherry picked from commit b825528)
2016-12-19 01:01:41 +01:00
Juergen Hoeller 4571975414 Collection injection may refer back to factory methods on same bean again
Issue: SPR-14996
(cherry picked from commit 547b963)
2016-12-19 01:01:16 +01:00
Juergen Hoeller 5115c61b03 CommonsMultipartFile.getOriginalFilename() can be configured to preserve header-specified filename as-is
Issue: SPR-14613
(cherry picked from commit aa29495)
2016-12-19 00:59:28 +01:00
Juergen Hoeller 54c7a9ee95 Revised Jetty 9.3 vs 9.4 differentiation
Issue: SPR-14940
(cherry picked from commit 52799c0)
2016-12-19 00:58:53 +01:00
Juergen Hoeller 0296c7c5b6 Stronger explanation of default rollback rules
Issue: SPR-14994
(cherry picked from commit 953bc18)
2016-12-19 00:58:44 +01:00
Juergen Hoeller 84d8135cbb MimeType parsing properly handles quoted semicolons
Issue:  SPR-14986
(cherry picked from commit 7714eec)
2016-12-19 00:58:23 +01:00
Juergen Hoeller dd3c370bca ImportRegistry properly tracks excluded superclasses
Issue: SPR-14972
(cherry picked from commit a7ec6dc)
2016-12-19 00:57:45 +01:00
Juergen Hoeller 4e41f74925 Explicit support for retrieving enum values
Issue: SPR-14990
(cherry picked from commit 278a625)
2016-12-19 00:56:44 +01:00
Juergen Hoeller c6663f59b8 HttpInvokerClientInterceptor propagates client-side Error as-is
Issue: SPR-14985
(cherry picked from commit ee30ce9)
2016-12-19 00:56:06 +01:00
Juergen Hoeller ced7503d95 Revised forClass argument names
Issue: SPR-14976
(cherry picked from commit 8ab977e)
2016-12-19 00:55:39 +01:00
Juergen Hoeller 04af30daed JPA/Hibernate docs: transaction management, JTA setup
Issue: SPR-14957
(cherry picked from commit 2f80b84)
2016-12-19 00:55:19 +01:00
Juergen Hoeller 5ccc8e341c SpEL docs: supported literals, null comparisons
Issue: SPR-14361
Issue: SPR-14987
(cherry picked from commit 05579fd)
2016-12-19 00:55:03 +01:00
Juergen Hoeller 71977e8f9d Consistent use of "URI variables" terminology
Issue: SPR-14969
(cherry picked from commit 6517c53)
2016-12-19 00:54:49 +01:00
Rob Winch 5e774e0b44 Add Support for ForwardedHeaderFilter sendRedirect
Previously ForwrdedHeaderFilter did not ensure that
HttpServletResponse.sendRedirect worked properly based on
X-Forwarded-* headers.

This commit updates ForwardedHeaderFilter to overrided the
HttpServletResponse.sendRedirect method to ensure
X-Forwarded-* headers are honored.

Issue SPR-15020
2016-12-15 19:38:40 -05:00
Rossen Stoyanchev e16d753439 Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.

After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.

Issue: SPR-14690
2016-12-13 16:17:05 -05:00
Rossen Stoyanchev b14d189db9 MockRestRequestMatchers can match query params
Issue: SPR-14995
2016-12-13 16:07:19 -05:00
Brian Clozel 14de29c031 Improve VersionResourceResolve javadoc
The `pathPatterns` args are relative to the patterns configured for the
resource handler.

Issue: SPR-14817
Cherry-picked from: 52f664139
2016-12-13 11:01:14 +01:00
Brian Clozel b59455b63c Do not include URL hash in resource paths
When getting the lookup path of a resource, both query params and hashes
should be removed from the request path.

This commit fixes the public path resolution for paths like
`/resources/main.svg#icon-hamburgermenu`.

Issue: SPR-14928
2016-12-12 15:23:23 +01:00
Brian Clozel 1a6dc86fed Allow RedirectAttributes on ExceptionHandlers
Prior to this commit, `@ExceptionHandler` methods could not be injected
with `RedirectAttributes` arguments. This would make it impossible to
handle an error by redirecting to another view and add flashmap
attributes, to be included in the model when the next view is called.

Here is an example:

```
@ExceptionHandler(MyException.class)
public String handleException(MyException ex, RedirectAttributes
    redirectAttributes) {

  redirectAttributes.addFlashAttribute("errorMessage",
      "This is an error message");
  return "redirect:/";
}
```

This commit adds a new `RedirectAttributesMethodArgumentResolver`
instance in the list of pre-configured `HandlerMethodArgumentResolver`
in `ExceptionHandlerExceptionResolver`.

Issue: SPR-14651
Cherry-picked from: 17089d6
2016-12-12 09:09:35 +01:00
Brian Clozel 35b0c8b577 Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 4.3 websocket officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-09 14:58:18 +01:00
Brian Clozel 75034c3710 Revert "Update websocket support for Jetty 9.3+"
This reverts commit 305cea28c5.
2016-12-08 22:48:06 +01:00
Brian Clozel 305cea28c5 Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 4.3 officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-08 21:44:31 +01:00
Rossen Stoyanchev 69ba85b051 Backport of STOMP message header encoding improvements
Issue: SPR-14901
2016-12-08 11:33:16 -05:00
Sebastien Deleuze 5700d65a53 Append "data:" after line breaks for SSE JSON data fields
Issue: SPR-14899
2016-12-08 14:16:41 +01:00
bedrin e707c40e0b Add consumes attribute to @GetMapping
Issue: SPR-14988
2016-12-07 17:51:05 -05:00
Brian Clozel 9d37472f23 Fix Netty4ClientHttpRequestFactory POST/PUT requests
This commit ensures that POST/PUT requests sent by the Netty client have
a Content-Length header set.

Integration tests have been refactored to use mockwebserver instead of
Jetty and have been parameterized to run on all available supported
clients.

Issue: SPR-14860
Cherry-picked from: ec8391a7fb
2016-12-07 09:24:13 +01:00
Juergen Hoeller eb97335c6f Polishing 2016-12-01 20:19:49 +01:00
Juergen Hoeller 0028b29760 Polishing 2016-12-01 19:09:26 +01:00
Juergen Hoeller 1ded1e38e8 Latest dependency updates (Caffeine 2.3.5, Hibernate ORM 5.2.5, Joda-Time 2.9.6, Tomcat 8.5.8, JOpt Simple 5.0.3) 2016-12-01 19:08:57 +01:00
Juergen Hoeller 149acdae7d @UsesJava8
Issue: SPR-14958
2016-12-01 14:23:59 +01:00
Juergen Hoeller 5fee5f39ea Polishing 2016-12-01 14:13:23 +01:00
Juergen Hoeller f16d453805 PathMatchingResourcePatternResolver converts manifest entries to absolute paths and tries all root URLs (any file extension) as jar file
Issue: SPR-14934
Issue: SPR-14936
2016-12-01 14:12:56 +01:00
Juergen Hoeller 2b0293578f Consistent use of "URI variables" terminology
Issue: SPR-14969
(cherry picked from commit 7a8ec4f)
2016-12-01 14:12:07 +01:00
Juergen Hoeller 66aeeedaef Test injection point match for narrow target return type
Issue: SPR-14960
(cherry picked from commit 845dbf0)
2016-12-01 14:12:00 +01:00
Juergen Hoeller af41dd1ed6 Efficient ISO_LOCAL_* variants for printing LocalDate/LocalTime/LocalDateTime
Issue: SPR-14958
(cherry picked from commit 1ae17c2)
2016-12-01 14:11:49 +01:00
Juergen Hoeller 17f7f1fc15 Consistent catching of Throwable for introspection failures
Issue: SPR-12889
(cherry picked from commit 0186809)
2016-12-01 14:11:43 +01:00
Juergen Hoeller cbc512f3be Efficient type plus annotation comparisons during converter retrieval
Issue: SPR-14926
Issue: SPR-12926
(cherry picked from commit f6b8b84)
2016-12-01 14:11:34 +01:00
Juergen Hoeller 7ac9f92bc2 Various DefaultListableBeanFactory clarifications
* getBeanDefinitionNames defensively returns a copy of the bean definition names array.
* copyConfigurationFrom provides an independent AutowireCandidateResolver instance and copies a ConversionService and dependency comparator configuration as well.
* findAutowireCandidates only considers a self reference fallback for direct dependency declarations, not as a collection element.

Issue: SPR-14897
Issue: SPR-14921
Issue: SPR-14965
(cherry picked from commit ac5933a)
2016-12-01 14:11:08 +01:00
Juergen Hoeller a7ba63d425 Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
(cherry picked from commit 80931b2)
2016-12-01 14:10:39 +01:00
Juergen Hoeller 5ca10b1d67 Consistent ExpressionException-style quoting of expression string and position
Issue: SPR-14942
(cherry picked from commit 14eba50)
2016-12-01 14:10:23 +01:00
Juergen Hoeller f22a4a4e80 No warn logging for propagated original exception
Issue: SPR-14907
(cherry picked from commit 96bfc14)
2016-12-01 14:10:01 +01:00
Juergen Hoeller b53ee13662 JdbcUtils explicitly extracts SQL date/time for JSR-310 LocalDate/Time
Issue: SPR-14898
(cherry picked from commit a0fee46)
2016-12-01 14:09:53 +01:00
Christoph Dreis 8de100b116 Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
(cherry picked from commit a929e9c)
2016-12-01 14:09:43 +01:00
Juergen Hoeller ac30bcb0eb WebSocketServerSockJsSession uses dedicated disconnect lock
Issue: SPR-14917
(cherry picked from commit a49809b)
2016-12-01 14:09:34 +01:00
Rossen Stoyanchev 872d6ef55a HtmlUnitRequestBuilder detects form encoding type
Issue: SPR-14916
2016-11-28 18:08:44 -05:00
Rossen Stoyanchev dd3b9c7c35 ResponseEntity headers builder casts body to any type
Issue: SPR-14939
2016-11-28 17:25:20 -05:00
Rossen Stoyanchev 9755ae3cbe PayloadArgumentResolver has useDefaultResolution flag
Issue: SPR-14937
2016-11-28 17:02:03 -05:00
Brian Clozel bc29fb5a09 Do not execute ResourceUrlEncodingFilter only once per request
In case the filter is also registered to the ERROR dispatcher, the
following happens:
* the filter is executed once for the regular execution
* the filter should be executed a second time when dispatched to error

Since the filter is a `OncePerRequestFilter`, the filter is only
executed once and won't be executed when handling the error.

This can lead to situations like spring-projects/spring-boot#7348

This commit makes this filter a simple `GenericFilterBean`.

Issue: SPR-14891
2016-11-24 10:03:08 +01:00
Rossen Stoyanchev 646a574b9c Deprecate ResourceServlet 2016-11-23 21:22:58 -05:00
Rossen Stoyanchev 8f19650fd7 Avoid locking in WebSocket session "close" callback
When processing a "close" notification from the server make an effort
to cancel any outstanding heartbeat but avoid going as far as acquiring
the responseLock since the server itself may already hold a lock of its
own leading to a potential deadlock.

The heartbeat task is now also further protected with an isClosed()
check in case the heartbeat does not get cancelled in a concurrent
scenario.

Issue: SPR-14917
2016-11-23 20:58:22 -05:00
Stephane Nicoll f08980967b Polish doc 2016-11-17 07:25:42 +09:00
Mark Paluch 5285f5300a Fix TLS detection in URLs for Netty Client RequestFactory
Do not check on non-specified port when scheme is https.
Enables SSL for https URIs with a specified port.

Issue: SPR-14889
2016-11-11 16:49:18 +01:00
Juergen Hoeller 1608d0596d Polishing 2016-11-11 16:48:43 +01:00
Juergen Hoeller 62631bfe33 Detect invalid configuration for autoGrowCollectionLimit on DataBinder
Issue: SPR-14888
2016-11-08 17:47:29 +01:00
Juergen Hoeller 7ffed858f0 ASM-generated class names get interned for better memory allocation
Issue: SPR-14886
(cherry picked from commit 3a29daa)
2016-11-08 17:47:14 +01:00
Spring Buildmaster 3a1334e0d4 Next Development Version 2016-11-07 21:35:52 +00:00
Juergen Hoeller 37f4f43726 Consistent 4.x style NoClassDefFoundError handling
Issue: SPR-14883
2016-11-07 19:13:00 +01:00
Juergen Hoeller db1a84ede1 Polishing 2016-11-07 18:48:35 +01:00
Juergen Hoeller 3d2e4c338c Refined throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
2016-11-07 18:47:54 +01:00
Juergen Hoeller b42d731fc8 Consistent throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
2016-11-07 16:56:35 +01:00
Juergen Hoeller fd7045adac Polishing
(cherry picked from commit 9b57437)
2016-11-07 13:02:50 +01:00
Juergen Hoeller e26d3505f7 Upgrade to OkHttp 3.4.2 and Tiles 3.0.7 2016-11-04 14:55:37 +01:00
Juergen Hoeller fe0249bf8f Polishing 2016-11-04 13:37:06 +01:00
Juergen Hoeller 2ac682e125 Upgrade to Joda-Time 2.9.5 2016-11-04 13:30:25 +01:00
Juergen Hoeller 9be1710dca @Async docs explicitly mention ListenableFuture and CompletableFuture
Issue: SPR-14881
(cherry picked from commit 8df45dd)
2016-11-04 13:30:11 +01:00
Juergen Hoeller 7e7504f5ea Polishing 2016-11-03 23:20:33 +01:00
Juergen Hoeller e83c11667f ApplicationListenerDetector ignores non-managed bean instances
Issue: SPR-14879
(cherry picked from commit 8ae0bd6)
2016-11-03 23:20:06 +01:00
Juergen Hoeller 05547979de Polishing
Issue: SPR-14867
(cherry picked from commit a90e4b2)
2016-11-03 14:54:15 +01:00
Juergen Hoeller 9e67ba83a5 Consistent support for early placeholder resolution in properties locations
Issue: SPR-10502
(cherry picked from commit 8053fef)
2016-11-03 14:53:46 +01:00
Juergen Hoeller 2bb3522bbb ReloadableResourceBundleMessageSource sets file timestamp on merged holder
Issue: SPR-14583
(cherry picked from commit 03468fd)
2016-11-03 14:53:24 +01:00
Rossen Stoyanchev 8f4ec35697 Check SockJS session type
This commits adds a validation check whether the SockJS session type
matches the transport type and rejects requests for which they
don't match.

Issue: SPR-14867
2016-11-03 09:38:24 +02:00
Juergen Hoeller 17863dfbda AnnotatedElementAdapter explicitly declares isAnnotationPresent method
Issue: SPR-14872
2016-11-02 14:41:11 +01:00
Juergen Hoeller 56bb20d489 Upgrade to HtmlUnit 2.23 and JSONAssert 1.4 2016-11-02 14:40:10 +01:00
Juergen Hoeller 5baf32cd81 Upgrade to Caffeine 2.3.4 2016-11-02 14:02:49 +01:00
Andy Clement 38cd1ecff4 Rework compilation of OpNE/OpEQ SpEL operators
For SPR-14863 we need to adjust the code generation for OpNE
to use !x.equals(y) rather than x!=y. There are also further
cases in the equalityCheck() code in Operator that were not
being handled in the compilation case (when comparators are
used for example). This latter issue also affects OpEQ.

Rather than add yet more bytecode generation, both OpNE and
OpEQ generateCode() methods have been simplified. The
generated code now delegates to equalityCheck() in Operator
which is exactly what the interpreted case does.

This ensures that the compiled code continues to behave just
like the interpreted case. It ensures changes to the interpreted
case are automatically picked up for the compiled case. It
makes the bytecode generation simpler.

The benefit of compilation of SpEL expressions is to avoid
slow reflective calls - that doesn't apply for a basic
(in)equality test so there is no need to go crazy in bytecode
gen.

Issue: SPR-14863
(cherry picked from commit 9000acd)
2016-11-02 12:40:24 +01:00
Juergen Hoeller 77e00f1926 Polishing 2016-10-31 20:40:46 +01:00
Juergen Hoeller ade139f2d0 Polishing
(cherry picked from commit 45fc449)
2016-10-31 19:29:04 +01:00
Juergen Hoeller 653f35a3d8 Upgrade to H2 1.4.193 and Derby 10.13.1.1
(cherry picked from commit eaf8078)
2016-10-31 19:28:58 +01:00
Juergen Hoeller baa7aecf60 Polishing
(cherry picked from commit 7f280a3)
2016-10-31 12:40:44 +01:00
Juergen Hoeller d859826be6 ASM-generated class names get interned for better memory allocation
Issue: SPR-14862
2016-10-31 11:56:34 +01:00
Juergen Hoeller d759c96a98 Latest applicable dependency updates (Hibernate ORM 5.2.4, Gson 2.8, Guava 20) 2016-10-31 11:54:29 +01:00
Juergen Hoeller 7cbab0efe3 LocalSessionFactoryBean clears default MetadataSources on reinitialization
Issue: SPR-14815
2016-10-31 11:53:10 +01:00
Arjen Poutsma b6b536682e Make HttpComponentsAsyncClientHttpRequest abortable
This commit aborts the HttpComponentsAsyncClientHttpRequest whenever the
returned Future is canceled.

Issue: SPR-14845
(cherry picked from commit 8f84446)
2016-10-31 11:51:26 +01:00
Juergen Hoeller edf1df33cc ObjectToObjectConverter properly handles constructors on non-public classes
Issue: SPR-14304
(cherry picked from commit 9659bc5)
2016-10-31 11:51:05 +01:00
Juergen Hoeller bf0df54136 Consistent instanceof/casting of Class references
(cherry picked from commit ac80ac6)
2016-10-31 11:50:59 +01:00
Juergen Hoeller 7e80d2de79 Exceptions thrown from @ExceptionHandler methods logged at warn level (instead of debug)
Issue: SPR-14861
(cherry picked from commit 7627c38)
2016-10-31 11:50:45 +01:00
Juergen Hoeller 144f687ee9 Polishing
(cherry picked from commit 2f9ed59)
2016-10-31 11:50:36 +01:00
Juergen Hoeller 0ee8322947 Revised NoSuchBeanDefinitionException message and ResolvableType handling
Includes consistent quoting of qualified type names in related classes.

Issue: SPR-14831
(cherry picked from commit dc080cb)
2016-10-31 11:50:15 +01:00
Juergen Hoeller 997fb5fb48 DefaultListableBeanFactory allows early type matching against ScopedProxyFactoryBean
Issue: SPR-14816
(cherry picked from commit 3633244)
2016-10-31 11:50:02 +01:00
Juergen Hoeller 2b459881bd ApplicationListener detection for inner beans behind post-processors
Issue: SPR-14783
(cherry picked from commit c946924)
2016-10-31 11:49:06 +01:00
Juergen Hoeller e18e7eca47 No external locking for singleton advice/aspect beans
Issue: SPR-14324
(cherry picked from commit 5ac5ec1)
2016-10-31 11:48:12 +01:00
Juergen Hoeller 1c80d2ac2f Avoid deadlock between SockJS heartbeat and XHR polling
Issue: SPR-14833
(cherry picked from commit 72e1f7e)
2016-10-31 11:47:23 +01:00
Juergen Hoeller 62918ca779 TypeDescriptor supports merged annotation lookups (for composable formatting annotations)
Issue: SPR-14844
(cherry picked from commit bf9083d)
2016-10-31 11:46:30 +01:00
Juergen Hoeller 3cca57a801 Local merged annotation lookup in SpringCacheAnnotationParser
Issue: SPR-14781
Issue: SPR-14801
(cherry picked from commit 08972ef)
2016-10-31 11:45:35 +01:00
Juergen Hoeller 5578a2e46d Test for multi-character delimiter
Issue: SPR-14808
(cherry picked from commit 71d8338)
2016-10-31 11:45:01 +01:00
Juergen Hoeller fe19cfde28 Tightened StringValueResolver contract
Issue: SPR-14842
(cherry picked from commit 20419d7)
2016-10-31 11:44:46 +01:00
Juergen Hoeller fbad637235 SimpleApplicationEventMulticaster just swallows event downcast exceptions
Issue: SPR-14846
(cherry picked from commit 13001b9)
2016-10-31 11:44:26 +01:00
Juergen Hoeller 01e9307fb7 DataSourceTransactionManager triggers flush callbacks on registered transaction synchronizations
Issue: SPR-14847
(cherry picked from commit 2874066)
2016-10-31 11:44:17 +01:00
Juergen Hoeller 5697cb6c95 AccessorLValue reliably downcasts to CompilablePropertyAccessor in concurrent scenarios
Issue: SPR-14850
(cherry picked from commit e2b1dcb)
2016-10-31 11:44:08 +01:00
Juergen Hoeller 05ff83f95a ResourceHttpRequestHandler initializes PathExtensionContentNegotiationStrategy in afterPropertiesSet
Issue: SPR-14851
(cherry picked from commit b7d3a96)
2016-10-31 11:43:57 +01:00
Stephane Nicoll 1e3012cb49 Allow to customize TestDispatcherServlet
This commit introduces the `DispatcherServletCustomizer` callback
interface that can be used to customize the `DispatcherServlet` that a
`MockMvc` is using.

Previously, only the `dispatchOptions` flag can be customized. This
commit allows to customize any property of `DispatcherServlet` before it
is initialized.

Issue: SPR-14277
2016-10-29 11:09:48 +02:00
Rossen Stoyanchev 45b8cf350e Better handling for AsyncRequestTimeoutException
Avoid call to sendError when response is committed and log a short
error message instead.

Issue: SPR-14739
2016-10-28 17:41:48 +03:00
Stephane Nicoll 2c2c6f8e02 Fix broken build
This commit fixes the direct use of Java8 API

Issue: SPR-14853
2016-10-27 10:30:54 +02:00
Stephane Nicoll 4e3a6b9404 Polish 2016-10-27 10:01:51 +02:00
Stephane Nicoll 76bbccb4dc Allow @Cacheable method to return Optional
This commit further refines 240f254 to also support java.util.Optional
for synchronized cache access (i.e. when the `sync` attribute on
`@Cacheable` is set to `true`).

Issue: SPR-14853
2016-10-27 10:00:34 +02:00
Stephane Nicoll 1c4433555a Move NoOpCache to a top-level public class
This commit moves `NoOpCache` to a top-level public class to allow reuse
in custom CacheManager arrangement.

Issue: SPR-14856
2016-10-27 09:09:51 +02:00
Eric Jain faaced1d86 Escape (( and )) to prevent asciidoc processing
See http://asciidoctor.org/docs/user-manual/#user-index

Closes gh-1225
2016-10-27 08:50:27 +02:00
Stephane Nicoll 1a1d17e13a LiveBeansView does not rely on application contexts order anymore
This commit makes sure that the `unregister` order of registered
application contexts has no incidence on the removal of the LiveBeansView
MBean.

Rather than using the last application context's name to compute the
identity of the MBean to remove, the identity is stored when the MBean is
created.

This commit also adds missing tests.

Issue: SPR-14848
2016-10-26 15:03:44 +02:00
Stephane Nicoll 4254b6d0e2 Polish contribution
Closes gh-1203
2016-10-26 09:50:48 +02:00
Vitalii a211c2a955 Fix javadoc syntax
See gh-1203
2016-10-26 09:50:36 +02:00
Stephane Nicoll 196200bcc0 Clarify SpEL usage on @EventListener
Issue: SPR-14812
2016-10-25 17:45:36 +02:00
Rossen Stoyanchev c062835702 Respect ModelAndView.status in @ExceptionHandler
Issue: SPR-14006
2016-10-24 16:36:44 +01:00
Juergen Hoeller 664ef756c2 Latest dependency updates (EhCache 2.10.3, Jackson 2.8.4, Jetty 9.3.13, Netty 4.1.6) 2016-10-21 13:00:11 +02:00
Juergen Hoeller 9de28d640e Polishing
(cherry picked from commit 3726c6f)
2016-10-21 12:59:59 +02:00
Juergen Hoeller adb9dc7ede ResolvableType equals/hashCode does not consider TypeProvider source
Issue: SPR-14826
(cherry picked from commit be187ba)
2016-10-21 12:59:54 +02:00
Juergen Hoeller f9fcd24315 ConversionService detects generic type declaration on target class behind proxy as well
Issue: SPR-14822
(cherry picked from commit f7d740f)
2016-10-21 12:59:48 +02:00
Juergen Hoeller 6d95b999ad DefaultTransactionAttribute stores descriptor (method identification)
Issue: SPR-14760
(cherry picked from commit 52b029d)
2016-10-21 12:59:43 +02:00
Sebastien Deleuze 6731e52280 Better encapsulation for CORS default permit configuration
This commit also improves CorsRegistration Javadoc.

Issue: SPR-14798
2016-10-20 17:06:12 +02:00
Rossen Stoyanchev 970358b2af Relax generic type detection for ResponseEntity
Before this change the getHttpEntityType method in
HttpEntityMethodProcessor raised an ISE if the generic type cannot be
detected. That made sense for resolving a controller method argument
where the target body type is crucial. However for a return value
the generic type should not be required since we either have an
actual body or no body at all in which case it doesn't even matter.

This change relaxes the checks and defaults to Object.class for the
ResponseEntity generic type on the return value side.

Issue: SPR-14799
2016-10-13 13:59:13 -04:00
Juergen Hoeller 3d68950037 Upgrade to Tomcat 8.5.6 and JRuby 1.7.26 2016-10-12 17:52:36 +02:00
Juergen Hoeller d50b2a4804 Documentation for InjectionPoint argument on @Bean method
Issue:  SPR-14797
(cherry picked from commit 69116c2)
2016-10-12 17:48:50 +02:00
Juergen Hoeller 29a946163b Polishing
(cherry picked from commit eafaaa5)
2016-10-12 17:48:33 +02:00
Juergen Hoeller 9472025da7 BindingResult does not hold on to ConversionService when serialized in session
Issue: SPR-8282
(cherry picked from commit 74b6a5b)
2016-10-12 17:48:08 +02:00
Juergen Hoeller f5cd5387da StompSubProtocolHandler does not insist on SimpMessageHeaderAccessor
Issue: SPR-14791
(cherry picked from commit 66722af)
2016-10-12 17:47:58 +02:00
Stephane Nicoll 7a8bf8e9a5 Polish EnableAsync javadoc
Issue: SPR-14793
(cherry picked from commit ab232a5)
2016-10-12 17:47:28 +02:00
Sebastien Deleuze f5ecdda400 Remove duplicated elements in CorsConfiguration#combine()
Issue: SPR-14792
2016-10-11 10:53:33 +02:00
Sebastien Deleuze c2031aa651 Polish CorsConfigurationTests 2016-10-11 10:41:14 +02:00
Brian Clozel 8751c9931e Fix NumberFormatException with X-Forwarded-Host
This commit fixes `NumberFormatException`s that were thrown when parsing
IPv6 host values in `X-Forwarded-Host` request headers.

Issue: SPR-14761
(cherry picked from ea5ff87f8e)
2016-10-07 23:19:01 +02:00
Brian Clozel adbf9922f4 Configure default SSL context in Netty RequestFactory
This commit configures a default SslContext if none has been provided.
This also enforces separate Netty bootstrap instances for cleartext and
TLS exchanges.

Issue: SPR-14744
(cherry picked from 53441f8)
2016-10-06 16:50:27 +02:00
Stephane Nicoll b3a1e5f9e9 Fix table layout 2016-10-06 15:27:25 +02:00
Juergen Hoeller 22f70f9ac9 Upgrade to EhCache 3.1.3 and Hibernate ORM 5.2.3 2016-10-06 00:16:29 +02:00
Juergen Hoeller d2079f32d8 SpringValidatorAdapter declares ResolvableAttribute as serializable
Issue: SPR-14778
(cherry picked from commit ebed7b7)
2016-10-06 00:16:00 +02:00
Juergen Hoeller f2ac416f66 Consistent final logger fields
(cherry picked from commit cfa0f6c)
2016-10-06 00:15:45 +02:00
Juergen Hoeller 642fbfba9f @Lookup reference documentation
Issue: SPR-14765
(cherry picked from commit 684d6ab)
2016-10-06 00:15:38 +02:00
Brian Clozel c98cdd4f4c Fix missing ETag/LastModified headers in responses
Prior to this commit, the `HttpEntityMethodProcessor` would avoid
writing ETag/Last-Modified response headers before calling
`ServletWebRequest` to process conditional requests. This was done to
avoid duplicate response header values due to headers being already
written to the underlying servlet response.

This is still necessary for GET/HEAD requests, since this is properly
handled by `ServletWebRequest` for those cases. But
`HttpEntityMethodProcessor` should not make that decision for
PUT/PATCH/POST responses since developers are adding response headers on
purpose and should be in control of the situation — whereas
`ServletWebRequest` does not write those headers in those cases.

Issue: SPR-14767
Cherry-picked from: ee17f5662
2016-10-04 13:54:02 +02:00
Juergen Hoeller d04567b99c Polishing 2016-09-26 18:19:04 +02:00
Juergen Hoeller f2e1e1b890 Efficient STOMP content-length header check
Issue: SPR-14747
(cherry picked from commit a6b0b6e)
2016-09-26 17:30:45 +02:00
Juergen Hoeller 6c764f6b8a StompEncoder performance improvement plus related polishing
Issue: SPR-14747
2016-09-26 16:33:29 +02:00
Juergen Hoeller 49929f1e56 Clarified that getResource never returns null
(cherry picked from commit 36f7c7a)
2016-09-26 16:21:44 +02:00
Juergen Hoeller acdf139137 DefaultPersistenceUnitManager extracts jar file from default persistence unit root URL
Issue: SPR-14749
(cherry picked from commit bb7d207)
2016-09-26 16:21:33 +02:00
Juergen Hoeller 3346c594e4 YamlPropertiesFactoryBean consistently exposes String values
Issue: SPR-14737
(cherry picked from commit 74c6188)
2016-09-26 16:21:03 +02:00
Juergen Hoeller 0bb2cfe440 Latest dependency updates (Jackson 2.8.3, JavaMail 1.5.6, Jetty 9.3.12, Undertow 1.3.25) 2016-09-22 14:25:44 +02:00
Josh Long 11573b4ea4 fix spelling of word 'recommendation'
this PR fixes the spelling error for the word 'recommendation'
(cherry picked from commit 9b87ea0)
2016-09-22 14:25:25 +02:00
Spring Buildmaster 5934959b62 Next Development Version 2016-09-19 15:11:46 +00:00
Rossen Stoyanchev 81f6c22e51 Reset connection before delegating to handler
Resetting the connection first before invoking a failure callback on
the application handler ensures that any checks to isConnected will
return false.

Issue: SPR-14721
2016-09-19 09:06:11 -04:00
Stephane Nicoll 78a8245f4a Polish 2016-09-19 15:04:52 +02:00
Krzysztof Kosmatka 049861afb4 Documentation formatting fix
Removed unnecessary quotation marks that caused improper rendering
of in-line code.

Closes gh-1180
2016-09-19 15:04:39 +02:00
Krzysztof Kosmatka 3df7083f69 Add missing quotation mark
Closes gh-1181
2016-09-19 15:04:31 +02:00
Juergen Hoeller ca17edd5ac Revised checkResource implementation
Issue: SPR-14729
2016-09-18 21:04:37 +02:00
Sam Brannen c26bf871b7 Clean up warnings related to forthcoming removals in Tomcat 9
(cherry picked from commit b521aa8)
2016-09-18 21:04:29 +02:00
Sam Brannen 15d3e8c3e1 Introduce 'value' alias for @Bean's 'name' attribute
In order to simplify configuration for use cases involving @Bean where
only a bean name or aliases are supplied as an attribute, this commit
introduces a new 'value' attribute that is an @AliasFor 'name' in @Bean.

Issue: SPR-14728
(cherry picked from commit 8f62b63)
2016-09-18 21:04:25 +02:00
Brian Clozel 66b370e103 Check template availability in ScriptTemplateView
This commit overrides the `checkResource` implementation in
`ScriptTemplateView` in order to check if the template file resource is
available and if the resolver can then proceed with rendering the
template.

Issue: SPR-14729
Cherry-picked from: 97c9b05c15
2016-09-17 22:30:29 +02:00
Juergen Hoeller 2bbfbb1d50 What's New updated for significant refinements in 4.3.3 2016-09-16 14:31:53 +02:00
Juergen Hoeller ace25d4987 Polishing
(cherry picked from commit ed19dc7)
2016-09-16 14:30:41 +02:00
Juergen Hoeller 59cb9a4e60 Latest dependency updates (EhCache 3.1.2, Caffeine 2.3.3, Rome 1.7, Woodstox 5.0.3, Jettison 1.3.8) 2016-09-16 11:02:22 +02:00
Stephane Nicoll 0dce570157 Add Qualified element on RootBeanDefinition
Improve RootBeanDefinition to specify an AnnotatedElement that holds
qualifier information. When such element is present, any qualifier that
it defines will be used to find a matching candidate.

Issue: SPR-14725
(cherry picked from commit 2b0bf9f)
2016-09-16 11:02:03 +02:00
Juergen Hoeller 7ddaf49eb2 StringUtils.parseLocaleString accepts Java 7 variants
Issue: SPR-14718
(cherry picked from commit f24ce76)
2016-09-16 10:58:51 +02:00
Juergen Hoeller e947363a11 Timeout exceptions as RuntimeExceptions
Issue: SPR-14669
(cherry picked from commit 6dc1898)
2016-09-15 09:05:14 +02:00
Rossen Stoyanchev 5dbfe48d24 Improve async request timeout handling
Rather than setting the status to 503 directly from the timeout
interceptor which no longer seems to work reliably with Servlet
containers like Jetty even performing an additional ERROR dispatch back
to the original URL, we know rather set the DeferredResult to an
AsyncTimeoutException, which results in a dispatch and standard
handling within Spring MVC. This should be a more reliable way of
dealing with timeouts.

Issue: SPR-14669
2016-09-14 21:31:30 -04:00
Rossen Stoyanchev 07d5f8b123 Check both connection and connected flag
Issue: SPR-14703
2016-09-14 17:23:36 -04:00
kosmaty be99603f1b Fix doc style
Closes gh-1172
2016-09-14 11:08:29 +02:00
Juergen Hoeller 54db496815 Polishing
(cherry picked from commit 404e7cd)
2016-09-13 23:43:58 +02:00
Juergen Hoeller fbe7ddb640 PropertySourcesPropertyResolver does not log retrieved value by default
Issue: SPR-14709
2016-09-13 23:43:52 +02:00
Juergen Hoeller 55c37d2a57 Upgrade to Tomcat 8.5.5 2016-09-13 22:34:19 +02:00
Juergen Hoeller 4b445531f5 HibernateExceptionTranslator avoids JPA IllegalState/ArgumentException translation
Issue: SPR-14681
2016-09-13 22:32:57 +02:00
Juergen Hoeller 12afc263a4 HibernateTemplate reflectively calls getNamedQuery (for runtime compatibility with Hibernate 5.0/5.1 vs 5.2)
Issue: SPR-14676
2016-09-13 22:32:36 +02:00
Juergen Hoeller 040d131284 Polishing
(cherry picked from commit ce42ed4)
2016-09-13 22:31:47 +02:00
Juergen Hoeller 73bbe0849a Revised IllegalArgumentException handling for Formatter parse calls
Issue: SPR-14661
(cherry picked from commit c69e6a3)
2016-09-13 22:31:01 +02:00
Juergen Hoeller 09a0615df0 Consistent callbacks for TypeFilters, ImportSelectors and ImportBeanDefinitionRegistrars
Issue: SPR-14686
(cherry picked from commit 0c2e8a6)
2016-09-13 22:30:29 +02:00
Juergen Hoeller 669d5815c9 Configuration class processing uses MetadataReaderFactory for current ResourceLoader
Issue: SPR-14684
(cherry picked from commit 5405c07)
2016-09-13 22:30:12 +02:00
Juergen Hoeller bd24b97bd3 IdentityHashMap for scheduled tasks (avoiding hashCode calls on bean instances)
Issue: SPR-14666
(cherry picked from commit 480cd2c)
2016-09-13 22:29:59 +02:00
Juergen Hoeller db196ce5d8 Correct ISO DateTime example
Issue: SPR-14675
(cherry picked from commit d5c9cc6)
2016-09-13 22:28:28 +02:00
Juergen Hoeller 4396b211ce Avoid outdated Tibco workaround in shouldCommitAfterNoMessageReceived
Issue: SPR-14697
(cherry picked from commit edbc1e9)
2016-09-13 22:28:07 +02:00
Juergen Hoeller 367949e914 PropertyValue stores source object in common superclass field
Issue: SPR-8337
(cherry picked from commit fa820bc)
2016-09-13 22:27:17 +02:00
Juergen Hoeller ae2bbe7f19 MappingJackson2MessageConverter adds message id and destination to type resolution exception
Issue: SPR-14672
(cherry picked from commit 8c56606)
2016-09-13 22:26:37 +02:00
nkjackzhang 819e14f91b Fix typo
There is no attribute named `path` in `@RequestParam`, so I change it to
`name`.

Closes gh-1165
2016-09-10 07:49:48 +02:00
Brian Clozel fcf3ccba98 Fix default encoding in CONTRIBUTING documentation
Sources should be using UTF-8.

Issue: SPR-14674
Cherry-picked from: d1f60e3de1
2016-09-07 10:48:16 +02:00
nkjackzhang 558a10b54f Fix typo
Closes gh-1158
2016-09-07 09:38:00 +02:00
Brian Clozel 43c60a02f7 Fix response status check in ServletWrbRequest
Issue: SPR-14659
2016-09-06 19:13:03 +02:00
Brian Clozel 6501bc5d32 Align MVC checkNotModified with reactive support
Since SPR-14522, the web reactive framework supports checkNotModified
features. This commit aligns the existing MVC infrastructure with
web reactive's behavior.

Code duplication has been removed from `HttpEntityMethodProcessor`
but the Servlet 2.5 baseline is still respected.

Issue: SPR-14659
Cherry-picked from: cc5300c4d5
2016-09-06 18:17:47 +02:00
Brian Clozel f3dae0c9ad Mention AntPathMatcher regexp support
This commit documents the regexp support in `AntPathMatcher` when
matching for URL patterns. This support is also mentioned in places
where developers can register patterns for ViewControllers or resource
handlers.

Issue: SPR-14652
Cherry-picked from: a8ba065a6e
2016-09-02 11:40:11 +02:00
sylvainlaurent dc2cafc888 Fix class literal in instanceof
Closes gh-1151
2016-09-01 16:23:32 +02:00
Juergen Hoeller 49fc4923be Upgrade to JSR-354 API 1.0.1 and Jackson 2.8 javadocs 2016-09-01 12:56:25 +02:00
Juergen Hoeller efb5f17a60 Documentation updates around configuration classes
(cherry picked from commit aff914c)
2016-09-01 12:52:11 +02:00
Juergen Hoeller 086e764845 ResolvableType.java.forRawClass(Class) supports isAssignableFrom(ResolvableType) as well
Issue: SPR-14648
(cherry picked from commit 1a30252)
2016-08-31 14:57:27 +02:00
Juergen Hoeller c30290b43c @PathVariable supports 'required' attribute (for model attribute methods)
Issue: SPR-14646
(cherry picked from commit e08b1b7)
2016-08-31 14:57:21 +02:00
Brian Clozel d26421fe3b Fix missing ResourceHttpRequestHandler init in registry
Issue: SPR-14577
Cherry-picked from: 7a88776329
2016-08-31 10:47:18 +02:00
Juergen Hoeller 37670924f6 Polishing 2016-08-31 01:53:03 +02:00
Juergen Hoeller ee5143b54b Upgrade to Jackson 2.8.2 and Netty 4.1.5 2016-08-31 00:45:34 +02:00
Juergen Hoeller acbb2544bf Polishing
(cherry picked from commit 4ef428d)
2016-08-31 00:45:25 +02:00
Juergen Hoeller d8f7347000 Consistent comma splitting without regex overhead
Issue: SPR-14635
(cherry picked from commit 03609c1)
2016-08-31 00:44:52 +02:00
Juergen Hoeller 3b91dec462 ApplicationListenerMethodAdapter resolves order on construction
Issue: SPR-14642
(cherry picked from commit 58fa63f)
2016-08-31 00:44:43 +02:00
Juergen Hoeller 05f74b4218 CommonsMultipartResolver explicitly converts FileSizeLimitExceededException
Issue: SPR-14638
(cherry picked from commit 58ffca7)
2016-08-31 00:44:19 +02:00
Juergen Hoeller 8e98177fb3 Avoid collection lookups in StompCommand
Issue: SPR-14636
(cherry picked from commit 899ebd8)
2016-08-31 00:44:14 +02:00
Rossen Stoyanchev 815a3ad0de Relax ServletContext check for resource handling
This is a follow-up on commit fe4046 relaxing the expectation that a
ServletContext is present. Instead we check defensively and fall back
on PathExtensionContentNegotiationStrategy which can use JAF.

Issue: SPR-14577
2016-08-30 12:57:35 -04:00
Rossen Stoyanchev 5075dd4dfa Harden synchronization around SockJS heartbeats
Create an explicit heartbeat task with an experiration flag so that
it can be cancelled reliably vs relying on the ScheduledFutureTask
cancel method which may return true even if the task is already
running.

Issue: SPR-14356
2016-08-30 09:20:07 -04:00
Rossen Stoyanchev ca09dcbe89 Polish media type change in ResourceHttpRequestHandler 2016-08-29 19:48:06 -04:00
Rossen Stoyanchev 198a74d793 Support receipt on DISCONNECT with simple broker
Issue: SPR-14568
2016-08-29 18:30:17 -04:00
Rossen Stoyanchev fe404628e9 Fix media type regression in resource handling
Issue: SPR-14577
2016-08-29 16:39:07 -04:00
Juergen Hoeller 5a004c3b2a LiveBeansView exposes aliases as well
Issue: SPR-14632
(cherry picked from commit 57cb7c7)
2016-08-26 20:18:39 +02:00
Juergen Hoeller 430180aa96 Polishing 2016-08-26 18:33:13 +02:00
Juergen Hoeller e828be96f0 Polishing 2016-08-26 17:29:16 +02:00
Juergen Hoeller 52447efb97 Avoid getParameterType use with Oracle 12c driver by default
Issue: SPR-14629
Issue: SPR-14574
Issue: SPR-14191
2016-08-26 17:29:00 +02:00
Rossen Stoyanchev d09b0fe83a Support target type in JsonPath assertions
This change adds support for a target type in JsonPath assertions in
Spring MVC Test.

The existing assertValue(String expression, Object expectedValue)
transparently falls back on using an alternative JsonPath API that
allows specifying the target type to coerce to.

There is also a new overloaded method
assertValue(String expression, Matcher<T> matcher, Class<T> targetType)
for use with Hamcrest matchers where the target type can be specified.

Issue: SPR-14498
(cherry picked from commit 7fdb892)
2016-08-26 17:28:37 +02:00
Brian Clozel 798d8668a4 Fix server errors for invalid If-None-Match request headers
HttpEntityMethodProcessor should not throw IllegalArgumentExceptions for
invalid If-None-Match headers.

For those cases, this commit makes sure that both
`HttpEntityMethodProcessor` and `ServletWebRequest` have a consistent
behavior and stop processing the request as conditional and leave the
handler handle it.

Issue: SPR-14559
2016-08-26 15:33:02 +02:00
Juergen Hoeller 2a82b8fed9 Consistent use of Charset.forName over JDK 7 StandardCharsets in 4.x line 2016-08-26 13:11:39 +02:00
Juergen Hoeller 696f687419 Moved encodeHttpHeaderFieldParam method to HttpHeaders itself (including tests)
This commit also sets the test source encoding to UTF-8.

Issue: SPR-14547
(cherry picked from commit a8f7f75)
2016-08-26 12:55:34 +02:00
Brian Clozel 9b91b9db8c Add RFC5987 support for HTTP header field params
This commit adds support for HTTP header field parameters encoding, as
described in RFC5987.
Note that the default implementation still relies on US-ASCII encoding,
as the latest rfc7230 Section 3.2.4 says that:

> Newly defined header fields SHOULD limit their field values to
  US-ASCII octets

Issue: SPR-14547
Cherry-picked from: f2faf84f31
2016-08-25 14:39:07 +02:00
Juergen Hoeller 026473280b Polishing 2016-08-25 00:10:06 +02:00
Juergen Hoeller a7849b2861 DefaultListableBeanFactory does not trigger early candidate creation ahead of primary bean selection
Issue: SPR-14611
(cherry picked from commit c4fcdb6)
2016-08-24 23:37:59 +02:00
Juergen Hoeller 74bf659c56 GenericApplicationContext picks up ClassLoader from custom ResourceLoader
Issue: SPR-14626
(cherry picked from commit 405e74b)
2016-08-24 23:36:33 +02:00
Juergen Hoeller c2feedb7a2 Revised assertions in StompHeaderAccessor
Issue: SPR-14625
(cherry picked from commit f3f691c)
2016-08-24 23:36:23 +02:00
Juergen Hoeller 0735e9ba98 Avoid unnecessary String concatenation in StompSubProtocolHandler
Issue: SPR-14624
(cherry picked from commit 56b197b)
2016-08-24 23:36:13 +02:00
Juergen Hoeller ab686732d0 Refined exception message
Issue: SPR-14609
2016-08-24 15:05:43 +02:00
Juergen Hoeller 6d86437369 TransactionAspectSupport stores given PlatformTransactionManager instance as strong reference
Issue: SPR-14609
(cherry picked from commit 951ac5e)
2016-08-24 14:39:19 +02:00
Juergen Hoeller 184285ab27 Polishing 2016-08-24 13:01:54 +02:00
Juergen Hoeller 1e8065d040 Unit test for empty Access-Control-Request-Headers (Chrome 52)
Includes optimized method/header resolution in CorsConfiguration.

Issue: SPR-14617
(cherry picked from commit d047174)
2016-08-24 11:53:44 +02:00
Juergen Hoeller f735d12247 UnsatisfiedDependencyException avoids duplicate nested exception message
Issue: SPR-14607
(cherry picked from commit 93d2287)
2016-08-24 11:53:36 +02:00
Juergen Hoeller 7135bc2dc2 Reintroduced MessageMethodArgumentResolver default constructor
Issue: SPR-14616
(cherry picked from commit c4fff6d)
2016-08-24 11:53:30 +02:00
Stephane Nicoll 9044706796 Remove reference to PayloadApplicationEvent
Issue: SPR-14594
2016-08-19 14:22:52 +02:00
Stephane Nicoll 5f68da3153 Document support for @ManagedBean
Issue: SPR-14600
2016-08-19 13:53:07 +02:00
Juergen Hoeller 5222489a01 Various @since tags (and varargs on setInterceptors)
(cherry picked from commit aac0e63)
2016-08-18 12:40:22 +02:00
Juergen Hoeller 27f830f345 Polishing 2016-08-18 10:28:31 +02:00
Juergen Hoeller 8d7db8e450 DelegatingWebMvcConfiguration properly delegates extendHandlerExceptionResolvers
Also fixes the declared visibility of configurePathMatch and configureAsyncSupport.

Issue: SPR-14599
(cherry picked from commit d2e3a1a)
2016-08-18 09:53:15 +02:00
Juergen Hoeller da56758054 Updated note on CompilationCustomizer and CompilerConfiguration
Issue: SPR-14585
2016-08-17 22:31:13 +02:00
Juergen Hoeller 66dcc4b6db Upgrade to Caffeine 2.3.2 2016-08-17 22:29:21 +02:00
Juergen Hoeller 6eab5622c7 Renamed setDefaultPersistenceUnitRootLocation to setPersistenceUnitRootLocation
(cherry picked from commit f1ab37c)
2016-08-17 22:18:19 +02:00
Juergen Hoeller af53f3d6cf Upgrade to Gradle 2.14.1
Issue: SPR-14570
2016-08-17 21:35:32 +02:00
Juergen Hoeller 188e5327ee Removed duplicate NoHandlerFoundException entry
Issue: SPR-14598
(cherry picked from commit e9f48a4)
2016-08-17 21:30:41 +02:00
Juergen Hoeller 1932a9d729 Polishing
(cherry picked from commit de91b1a)
2016-08-17 21:30:30 +02:00
Juergen Hoeller c926ec477a Polishing 2016-08-17 17:47:14 +02:00
Juergen Hoeller 7b11fa18a1 Revised NoSuchBeanDefinitionException message for proper array class names
Issue: SPR-14595
(cherry picked from commit 022b013)
2016-08-17 17:47:14 +02:00
Juergen Hoeller e6cefdca25 RootBeanDefinition accepts ResolvableType for target type hint
Issue: SPR-14580
(cherry picked from commit 4b06b60)
2016-08-17 17:47:14 +02:00
Juergen Hoeller fbeff475b3 Consistent support for CompilationCustomizers as well as custom CompilerConfiguration
Issue: SPR-14585
(cherry picked from commit 6a0d9d3)
2016-08-17 17:47:14 +02:00
Stephane Nicoll d057099c17 Add setter for defaultPersistenceUnitRootLocation
This commit adds a setter for the default persistence unit's
defaultPersistenceUnitRootLocation attribute.
2016-08-17 17:41:47 +02:00
Stephane Nicoll 411700d7e6 Clarify use of Ehcache
Since we have a dedicated section regarding Ehcache that is only
applicable to Ehcache 2.x, this commit clarifies that Ehcache 3.x is
JSR-107 compliant and the JCache support should be used with it
rather than attempting to configure the Ehcache 2.x support.
2016-08-16 14:03:26 +02:00
Stephane Nicoll b4e9d918f2 Better document #result semantic
Commit 240f254 has introduced support for `java.util.Optional` in the
cache abstraction. If such type is present, the contained value is cached
if it is present.

This new feature slightly changed the semantic of `#result` that was
documented up till this commit as the "return value of the method
invocation". This is no longer true as `#result` for `Optional<T>`
refers to the `T` instance and not the `Optional` instance.

This commit clarifies both the javadoc and the documentation.

Issue: SPR-14587
2016-08-16 13:45:46 +02:00
Igor Mukhin 2756c364d2 Add aditional example to CronSequenceGenerator
CronSequenceGenerator supports comma separated expressions but does not
provide an example for it. This commit adds such an example.

Closes gh-1132
2016-08-16 11:43:15 +02:00
Rob Winch 43faabd4cc Fix HtmlUnitRequestBuilder merge
Previously invoking HtmlUnitRequestBuilder merge caused the pathInfo of
the parent to be corrupted. This could additional invocations with the
same parent.

This fix ensures that the parent is no longer directly used. Instead,
we create a copy of the parent by merging the parent that was passed in
with the copy.

Fixes SPR-14584
2016-08-12 20:49:48 -05:00
Juergen Hoeller a4a71a8904 Polishing 2016-08-11 23:45:50 +02:00
Juergen Hoeller e23ac031ff Avoid stack overflow in case of chained factory-bean references to FactoryBean class
Issue: SPR-14551
(cherry picked from commit 8b5d355)
2016-08-11 23:25:41 +02:00
Juergen Hoeller 79a56967a1 PersistenceAnnotationBeanPostProcessor obtains default EntityManagerFactory via getBean(Class) algorithm
Issue: SPR-7549
(cherry picked from commit 6157fad)
2016-08-11 23:25:35 +02:00
Juergen Hoeller 0bc0453700 Polishing 2016-08-10 16:59:22 +02:00
Juergen Hoeller 35e247aa26 Polishing 2016-08-10 16:21:35 +02:00
Juergen Hoeller 67ba187b6f Polishing
(cherry picked from commit 59a24b4)
2016-08-10 14:57:50 +02:00
Juergen Hoeller 67f0b1986c Consistent spelling for StandaloneMockMvcBuilder's addPlaceholderValue
(cherry picked from commit a4b6682)
2016-08-10 14:57:43 +02:00
Stephane Nicoll 60e0177d00 Fix typo
See gh-1129
2016-08-10 10:46:43 +02:00
Juergen Hoeller 4543a28e51 MethodBasedEvaluationContext reliably exposes varargs
Issue: SPR-14554
(cherry picked from commit fae503d)
2016-08-09 21:31:29 +02:00
Juergen Hoeller aade2d1ec9 Polishing
(cherry picked from commit 9475c06)
2016-08-09 12:37:07 +02:00
Juergen Hoeller 4627545a3b Polishing
(cherry picked from commit eae079a)
2016-08-09 11:03:51 +02:00
Juergen Hoeller e2ba7c9b8c MockClientHttpResponse closes body stream on close()
Issue: SPR-14563
(cherry picked from commit 47e9360)
2016-08-09 11:03:46 +02:00
Juergen Hoeller 6f5596ac5c Upgrade to Hibernate ORM 5.2.2 and Undertow 1.3.24 2016-08-08 16:07:34 +02:00
Juergen Hoeller 7d1c2f191a Consistent default connection release mode with Hibernate 5.1
Issue: SPR-14548
2016-08-08 14:27:24 +02:00
Juergen Hoeller 4ada571384 PathEditor tries file system path in case of non-existing resource
Issue: SPR-14549
(cherry picked from commit d69afaa)
2016-08-08 14:22:46 +02:00
Juergen Hoeller ad8ebbaa05 Test injection for @Lookup-declaring bean
Issue: SPR-14550
(cherry picked from commit d128830)
2016-08-08 14:22:42 +02:00
Stephane Nicoll 4854989db4 Polish Javadoc
Issue: SPR-14552
2016-08-06 17:17:25 +02:00
Sebastien Deleuze 7c5050cf80 Prevent StackOverflowError in AbstractJackson2HttpMessageConverter
Issue: SPR-14520
2016-08-04 11:28:20 -07:00
Spring Buildmaster 14ae8be547 Next Development Version 2016-07-28 08:26:01 +00:00
Juergen Hoeller ff878ea9dc ConfigurationClassParser uses unified ImportStack with chained import analysis
Issue: SPR-14517
(cherry picked from commit d96a66a)
2016-07-28 00:13:05 +02:00
Juergen Hoeller 7021a4be44 JndiPropertySource defensively skips invalid JNDI lookup for property name with colon in resource-ref mode
Issue: SPR-14518
(cherry picked from commit 328e04f)
2016-07-28 00:12:50 +02:00
Juergen Hoeller 5c4737c3d0 Upgrade to Netty 4.1.4 2016-07-27 16:49:37 +02:00
Juergen Hoeller fbf3807af1 Polishing
(cherry picked from commit 5db4495)
2016-07-27 16:49:18 +02:00
Juergen Hoeller 703c37ec88 Isolated circular import detection for scanned configuration classes
Issue: SPR-14517
(cherry picked from commit 316244d)
2016-07-27 16:49:04 +02:00
Juergen Hoeller 96440878bb Polishing 2016-07-27 13:00:30 +02:00
Juergen Hoeller b5c11ffb1c Expose DefaultSubscriptionRegistry's cache limit through SimpleBrokerMessageHandler and MessageBrokerRegistry
Issue: SPR-14516
(cherry picked from commit 6d5af60)
2016-07-27 12:34:28 +02:00
Juergen Hoeller 7f5b323d50 Upgrade to Jetty 9.3.11 (includes fixed Quartz javadoc URL) 2016-07-26 22:19:56 +02:00
Juergen Hoeller 67176e2b75 TransactionAspectSupport avoids hard references to transaction manager beans
Issue: SPR-14511
(cherry picked from commit 02374d7)
2016-07-26 21:46:49 +02:00
Juergen Hoeller 79f3cf3263 Build against Undertow 1.3.x in 4.3.x branch (retaining runtime compatibility Undertow 1.4)
Issue: SPR-14328
2016-07-26 10:08:06 +02:00
Juergen Hoeller 9ee1dc79fd Deprecate JpaSystemException(PersistenceException) constructor to prepare for removal in Spring 5
Issue: SPR-13827
2016-07-26 01:29:51 +02:00
Juergen Hoeller 9e2c34dfa6 Fixed ConcurrentMap declaration
(cherry picked from commit 23135b1)
2016-07-26 00:28:40 +02:00
Juergen Hoeller cc93c2a559 Polishing 2016-07-26 00:03:21 +02:00
Juergen Hoeller 15c7044c4d Upgrade to EhCache 3.1.1 and OkHttp 3.4.1 2016-07-25 15:20:08 +02:00
Juergen Hoeller 0ef80d3579 JasperReportsMultiFormatViewTests does not check for CUSTOM_COMPILATION anymore
Issue: SPR-10423
2016-07-25 15:19:50 +02:00
Juergen Hoeller 95c2e0a996 Upgrade JiBX (and BCEL) towards support of 1.8 bytecode level
This commit also drops the now-unused CUSTOM_COMPILATION test group and the outdated JavaVersion class.

Issue: SPR-10423
(cherry picked from commit 01110f6)
2016-07-25 14:58:43 +02:00
Juergen Hoeller da3e8611e1 Upgrade JiBX (and BCEL) towards support of 1.8 bytecode level
Issue: SPR-10423
2016-07-25 13:08:46 +02:00
Juergen Hoeller 64595597f3 LinkedCaseInsensitiveMap properly overrides HashMap.clone()
Issue: SPR-14509
(cherry picked from commit dd65f7a)
2016-07-25 12:14:51 +02:00
Juergen Hoeller 82f2983cd4 Consistent throwing of BeanNotOfRequiredTypeException even for existing proxy
Issue: SPR-14504
(cherry picked from commit 4a85309)
2016-07-24 15:47:06 +02:00
Juergen Hoeller 9451177c35 Polishing
(cherry picked from commit 382a931)
2016-07-22 22:45:14 +02:00
Juergen Hoeller 9ed087d5da Consistent support for multiple Accept headers
Issue: SPR-14506
(cherry picked from commit e59a599)
2016-07-22 22:45:04 +02:00
Juergen Hoeller 77f22e9674 DataSource adapters expose setCatalog/setSchema next to setUsername/setPassword
Issue: SPR-14501
(cherry picked from commit 610bdf1)
2016-07-21 14:13:37 +02:00
Juergen Hoeller 8ccfdbbcf9 ResourcePatternUtils.getResourcePatternResolver actually accepts null argument
Issue: SPR-14500
(cherry picked from commit e756a5b)
2016-07-21 14:09:32 +02:00
Juergen Hoeller 5a92aa4e06 Polishing
(cherry picked from commit a39276a)
2016-07-20 23:23:30 +02:00
Juergen Hoeller 7b1010cf61 Polishing 2016-07-20 22:31:45 +02:00
Juergen Hoeller 45b2f5bac4 Upgrade to Jackson 2.8.1 2016-07-20 22:31:25 +02:00
Juergen Hoeller 36e1c82ef5 Backported refinements and polishing 2016-07-20 21:46:25 +02:00
Juergen Hoeller 503d65d570 Avoid JDK proxy against CGLIB Factory interface and assert required type when resolving dependency
Issue: SPR-14478
(cherry picked from commit 0e3f0bd)
2016-07-20 21:45:41 +02:00
Juergen Hoeller fe17f8da41 BeanWrapperImpl.setBeanInstance correctly exposes root object
Issue: SPR-14474
(cherry picked from commit 938b56c)
2016-07-20 21:44:46 +02:00
Juergen Hoeller b583aa1579 Avoid dependency on WebUtils for extracting file extension
Issue: SPR-14479
(cherry picked from commit adc595b)
2016-07-20 21:44:37 +02:00
Juergen Hoeller e0d81b97bb SerializableTypeWrapper reobtains type accessors from declaring interface
Issue: SPR-14487
(cherry picked from commit 8580483)
2016-07-20 21:41:42 +02:00
Juergen Hoeller 90752f9d87 Deprecate mock.staticmock package
Issue: SPR-14485
2016-07-20 21:41:30 +02:00
Juergen Hoeller 3663aa675a GenericSqlQuery configured with RowMapper instance
Issue: SPR-14489
(cherry picked from commit 7287bae)
2016-07-20 21:40:48 +02:00
Juergen Hoeller 1ca4b81856 Reinstated tests for implicit aliases
Issue: SPR-14437
(cherry picked from commit 5ea8c26)
2016-07-20 21:40:33 +02:00
Juergen Hoeller 4e7e06f549 Reliably pass CurrentTenantIdentifierResolver to SessionFactory
Issue: SPR-14476
2016-07-20 21:40:26 +02:00
Sebastien Deleuze b2f0bdb0f4 Polishing
Issue: SPR-14470
2016-07-20 09:16:50 +02:00
Rossen Stoyanchev d98bd34200 Remove isAsyncStarted assertion
Issue: SPR-14444
2016-07-19 16:44:46 -04:00
Sebastien Deleuze 940bdd878e Fix ParameterizedType + contextClass support in Jackson converter
Issue: SPR-14470
2016-07-19 18:10:51 +02:00
Vladimir L df556333a8 Add StreamingResponseBody MockMvc sample tests
Issue: SPR-14456
(cherry picked from 7da63c)
2016-07-19 10:48:29 -04:00
Stephane Nicoll 116f05eda6 Revert "Upgrade to EJB 3.1" 2016-07-18 13:37:43 +02:00
Stephane Nicoll b187bbeca3 Upgrade to EJB 3.1 2016-07-18 13:22:54 +02:00
Do Nhu Vy 479a83b628 Fix broken hyperlink
Closes gh-1114
2016-07-18 08:17:49 +02:00
Fredrik Sundberg 1c18100143 Fix javadoc reference
Method is called nextBackOff() and not nextBackOffMillis().

Closes gh-1115
2016-07-18 08:15:41 +02:00
Juergen Hoeller 5d3c0f33f6 Upgrade to Netty 4.1.3 and Tomcat 8.5.4 2016-07-15 22:47:22 +02:00
Juergen Hoeller afe106e254 Polishing 2016-07-15 22:47:12 +02:00
Juergen Hoeller 69dd40ec89 Javadoc fixes and pruning of deprecated references 2016-07-15 22:47:05 +02:00
Sam Brannen dee50d5e28 Polish annotation utils
(cherry picked from commit 177f4ec)
2016-07-15 22:21:23 +02:00
Juergen Hoeller 9e93403857 ConfigurationClassParser load annotations through source class loader
Issue: SPR-10343
2016-07-15 16:02:06 +02:00
Juergen Hoeller 12bff6b3a0 Velocity deprecation note in reference documentation
Issue: SPR-14460
2016-07-15 15:44:13 +02:00
Juergen Hoeller 70e666b4a3 MultipartResolutionDelegate's resolveMultipartArgument properly operates on Servlet 2.5
Issue: SPR-14461
2016-07-15 15:42:32 +02:00
Juergen Hoeller 29f980ec72 Unwrap JPA PersistenceException on flush failure (for Hibernate 5.2)
Issue: SPR-14457
2016-07-15 15:40:38 +02:00
Juergen Hoeller 1d39d762f0 HibernateExceptionTranslator converts JPA exceptions as well (for Hibernate 5.2)
Issue: SPR-14455
2016-07-15 15:40:26 +02:00
Juergen Hoeller 4d6d5e0ddd Consistent alias processing behind AnnotatedTypeMetadata abstraction (also for ASM)
Issue: SPR-14427
(cherry picked from commit 3d3407c)
2016-07-15 15:40:01 +02:00
Juergen Hoeller 4ea5f070a4 MessageHeaderAccessor properly removes header even in case of null value
Issue: SPR-14468
(cherry picked from commit b166358)
2016-07-15 15:39:33 +02:00
Juergen Hoeller da59b4da9b CronSequenceGenerator prevents stack overflow in case of inverted range
Issue: SPR-14462
(cherry picked from commit e431624)
2016-07-15 15:39:17 +02:00
Juergen Hoeller 0065a160cc StandardTypeConverter initializes default ConversionService against volatile field
Issue: SPR-14465
(cherry picked from commit 6d91d54)
2016-07-15 15:39:09 +02:00
Juergen Hoeller 52f46c7fea Aspect actually applies in PersistenceExceptionTranslationPostProcessorTests
Issue: SPR-14457
(cherry picked from commit 04e9c2b)
2016-07-15 15:38:44 +02:00
Juergen Hoeller f0a826ec0c AbstractHandlerMethodMapping adds type+method info to getMappingForMethod exceptions
Issue: SPR-14452
(cherry picked from commit 8ccd727)
2016-07-15 15:38:23 +02:00
Juergen Hoeller 5c3c0f73c1 Configurable UrlPathHelper in PathExtensionContentNegotiationStrategy
This commit also aligns ResourceUrlProvider's and RequestMappingInfo's UrlPathHelper setter/getter signatures.

Issue: SPR-14454
(cherry picked from commit 84afc60)
2016-07-15 15:37:56 +02:00
Juergen Hoeller be0b71ce31 Fixed typo: "occured"->"occurred"
(cherry picked from commit c43e749)
2016-07-15 15:37:11 +02:00
Juergen Hoeller f85d48dd31 Added PathEditor for NIO file system resolution
Issue: SPR-14436
(cherry picked from commit 23c2b6a)
2016-07-15 15:37:02 +02:00
Juergen Hoeller a1b58ee601 DigestUtils processes InputStream with buffered read instead of full copy
Issue: SPR-14427
(cherry picked from commit 61db8e9)
2016-07-15 15:34:36 +02:00
Juergen Hoeller e30429051d Polishing
(cherry picked from commit 6aa5931)
2016-07-15 15:34:27 +02:00
fisache 942ead75e2 Polish doc
Closes gh-1108
2016-07-14 19:16:20 +02:00
nkjackzhang 453688f6df Polish doc
Closes gh-1110
2016-07-14 11:57:41 +02:00
Stephane Nicoll 7d7a161102 Polish contribution
Closes gh-1070
2016-07-14 11:26:31 +02:00
spodgurskiy aaa223ae66 Fix MethodBasedEvaluationContext.lazyLoadArguments
This commit fix a potential `ArrayIndexOutOfBoundsException` if
`lazyLoadArguments` is called with an empty variable argument.

See gh-1070
2016-07-14 11:26:20 +02:00
Brian Clozel d11c624fb0 Polish AntPathMatcher.setTrimTokens javadoc
Issue: SPR-14247
Cherry-picked from 147a35f
2016-07-12 14:50:00 +02:00
nkjackzhang 275e51b19d Polish doc
Closes gh-1107
2016-07-12 08:51:35 +02:00
Stephane Nicoll ab62edeeaa Fix NoOpCache handling of get(key,callable)
This commit fixes the method that takes a Callable to actually always
invoke it rather than returning null.

Issue: SPR-14445
2016-07-11 10:36:51 +02:00
Sam Brannen 813108a928 Ensure TestContextManager always tracks after-class exception
This commit fixes a minor bug introduced in 0adc4921ed.

Issue: SPR-14447
2016-07-10 16:00:30 +02:00
Juergen Hoeller 3c14911401 Polishing 2016-07-06 17:59:49 +02:00
Juergen Hoeller 4337f14627 Upgrade to Jackson 2.8 GA 2016-07-06 17:42:10 +02:00
Juergen Hoeller 92d78c10a2 Polishing (backported from master) 2016-07-06 17:13:18 +02:00
Juergen Hoeller 16d5ba9b3a Restored binary compatibility with Hibernate 5.0/5.1's Query type
Issue: SPR-14425
2016-07-06 16:11:15 +02:00
Juergen Hoeller 52065a736b Avoid canonicalName call for already-seen bean name
Issue: SPR-14433
(cherry picked from commit 5890758)
2016-07-06 16:09:32 +02:00
Stephane Nicoll 11cb109114 Upgrade copyright 2016-07-04 12:45:34 +02:00
Stephane Nicoll d7eadd41d6 Switch to 4.3.2.BUILD-SNAPSHOT 2016-07-04 12:28:13 +02:00
7719 changed files with 355556 additions and 479857 deletions
-10
View File
@@ -1,10 +0,0 @@
root = true
[*.{adoc,bat,groovy,html,java,js,jsp,kt,kts,md,properties,py,rb,sh,sql,svg,txt,xml,xsd}]
charset = utf-8
[*.{groovy,java,kt,kts,xml,xsd}]
indent_style = tab
indent_size = 4
continuation_indent_size = 8
end_of_line = lf
-17
View File
@@ -1,17 +0,0 @@
<!--
!!! For Security Vulnerabilities, please go to https://pivotal.io/security !!!
-->
**Affects:** \<Spring Framework version>
---
<!--
Thanks for taking the time to create an issue. Please read the following:
- Questions should be asked on Stack Overflow.
- For bugs, specify affected versions and explain what you are trying to do.
- For enhancements, provide context and describe the problem.
Issue or Pull Request? Create only one, not both. GitHub treats them as the same.
If unsure, start with an issue, and if you submit a pull request later, the
issue will be closed as superseded.
-->
-4
View File
@@ -17,13 +17,9 @@ argfile*
pom.xml
activemq-data/
classes/
/build
buildSrc/build
/spring-*/build
/spring-core/kotlin-coroutines/build
/framework-bom/build
/integration-tests/build
/src/asciidoc/build
target/
@@ -0,0 +1,9 @@
#com.springsource.sts.gradle.core.preferences.GradleImportPreferences
#Thu Aug 9 11:34:43 CEST 2012
enableAfterTasks=true
afterTasks=afterEclipseImport;
enableDependendencyManagement=false
enableBeforeTasks=true
projects=;spring-aop;spring-aspects;spring-beans;spring-context;spring-context-support;spring-core;spring-expression;spring-instrument;spring-instrument-tomcat;spring-jdbc;spring-jms;spring-orm;spring-oxm;spring-struts;spring-test;spring-tx;spring-web;spring-webmvc;spring-webmvc-portlet;
enableDSLD=false
beforeTasks=cleanEclipse;eclipse;\:spring-oxm\:compileTestJava;
@@ -0,0 +1,5 @@
#com.springsource.sts.gradle.core.preferences.GradleProjectPreferences
#Tue Feb 21 14:38:31 CET 2012
com.springsource.sts.gradle.classpath.enableSorting=false
com.springsource.sts.gradle.rootprojectloc=
com.springsource.sts.gradle.linkedresources=
@@ -0,0 +1,9 @@
#com.springsource.sts.gradle.core.actions.GradleRefreshPreferences
#Thu Aug 9 11:34:43 CEST 2012
enableAfterTasks=true
afterTasks=afterEclipseImport;
useHierarchicalNames=false
enableBeforeTasks=true
addResourceFilters=false
enableDSLD=false
beforeTasks=cleanEclipse;eclipse;\:spring-oxm\:compileTestJava;
+51
View File
@@ -0,0 +1,51 @@
= How to contribute to the reference
The Spring Framework reference now uses https://asciidoctor.org/[asciidoctor]. This
document describes how to contribute documentation updates.
== Building with Gradle
You can build the documentation using gradle using the `reference` task. For example, from
the project root execute the following command:
./gradlew reference
the output will be available at `spring-framework/build/reference/htmlsingle/index.html`
== Live editing
One of the nice features about using asciidoctor is the support for live editing.
You will find a Guardfile already present at `spring-framework/src/asciidoc/Guardfile`.
Make sure first to follow the setup instructions within the
https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Editing AsciiDoc with Live Preview]
document. Once you have done that, there are additional gems to install to make it work
(assuming that you are using http://livereload.com/[LiveReload]):
gem install guard-rspec guard-livereload
When running `guard start` within the `src/asciidoc/` folder, any changes to the
`src/asciidoc/index.adoc` file will automatically be written at
`src/asciidoc/build/index.html`.
== Troubleshooting
* If you are using LiveReload, make sure to select _Allow access to file URLs_ in the
LiveEdit plugin options of your browser.
* The icon used to enable _LiveReload_ can be a bit confusing. The dot is empty when it is
disabled and full when the plugin is active. Make sure to enable it on the tab
displaying the `index.html` file.
* Ensure you are _not_ running guard start at all as two instances could not run at the
same time. To exit a current session in a clean way, just type e in the shell.
== Documentation notes
Some notes on documentation
* Documentation is wrapped at 90 chars, ensure that you manually wrap your edits
* Tabs are used for indentation, do not use spaces
* Follow the existing style when inserting `source` blocks
* https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor Quick Reference]
* https://asciidoctor.org/docs/user-manual/[Asciidoctor Manual]
* https://asciidoctor.org/docs/asciidoc-writers-guide/[Asciidoctor Writers Guide]
+281 -95
View File
@@ -1,133 +1,319 @@
# Contributing to the Spring Framework
_Have something you'd like to contribute to the framework? We welcome pull
requests but ask that you carefully read this document first to understand how
best to submit them; what kind of changes are likely to be accepted; and what
to expect from the Spring team when evaluating your submission._
First off, thank you for taking the time to contribute! :+1: :tada:
_Please refer back to this document as a checklist before issuing any pull
request; this will save time for everyone!_
### Table of Contents
## Code of Conduct
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.adoc).
By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
* [Code of Conduct](#code-of-conduct)
* [How to Contribute](#how-to-contribute)
* [Discuss](#discuss)
* [Create a Ticket](#create-a-ticket)
* [Ticket Lifecycle](#ticket-lifecycle)
* [Submit a Pull Request](#submit-a-pull-request)
* [Build from Source](#build-from-source)
* [Source Code Style](#source-code-style)
* [Reference Docs](#reference-docs)
## Take Your First Steps
### Code of Conduct
### Understand the basics
This project is governed by the [Spring Code of Conduct](CODE_OF_CONDUCT.adoc).
By participating you are expected to uphold this code.
Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
Not sure what a pull request is, or how to submit one? Take a look at GitHub's
excellent [help documentation][] first.
### How to Contribute
### Search Stack Overflow first; discuss if necessary
#### Discuss
If you're unsure why something isn't working or wondering if there is a better
way of doing it please check on Stack Overflow first and if necessary start
a discussion. This is the official list of
[Spring project tags](https://spring.io/questions). In short the issue tracker
should be used to report issues and make feature requests.
If you have a question, check StackOverflow using
[this list of tags](https://spring.io/questions), organized by Spring project.
Find an existing discussion or start a new one if necessary.
### Search JIRA; create an issue if necessary
If you suspect an issue, perform a search in the
[GitHub issue tracker](https://github.com/spring-projects/spring-framework/issues), using a few different keywords.
When you find related issues and discussions, prior or current, it helps you to learn and
it helps us to make a decision.
Is there already an issue that addresses your concern? Do a bit of searching
in our [JIRA issue tracker][] to see if you can find something similar. If you
do not find something similar, please create a new JIRA issue before submitting
a pull request unless the change is truly trivial -- for example: typo fixes,
removing compiler warnings, etc.
#### Create a Ticket
### Sign the Individual Contributor License Agreement (ICLA)
Reporting an issue or making a feature request is a great way to contribute. Your feedback
and the conversations that result from it provide a continuous flow of ideas.
If you have not previously done so, please fill out and submit the
[Spring ICLA form][]. You'll receive a token when this process is complete.
Keep track of this; you may be asked for it later!
Before you create a ticket, please take the time to [research first](#discuss).
Note that emailing/postal mailing a signed copy is _not_ necessary. Submission
of the web form is all that is required.
If creating a ticket after a discussion on StackOverflow, please provide a self-sufficient description in the ticket, independent of the details on StackOverflow. We understand this is extra work but the issue tracker is an important place of record for design discussions and decisions that can often be referenced long after the fix version, for example to revisit decisions, to understand the origin of a feature, and so on.
Once you've completed the web form, simply add the following in a comment on
your pull request:
When ready create a ticket in the [GitHub issue tracker](https://github.com/spring-projects/spring-framework/issues).
I have signed and agree to the terms of the Spring Individual Contributor
License Agreement.
#### Ticket Lifecycle
You do not need to include your token/id. Please add the above statement to all
future pull requests as well, simply so that the Spring Framework team knows
immediately that this process is complete.
When an issue is first created, it is flagged `waiting-for-triage` waiting for a team
member to triage it. Within a day or two, the issue will then be reviewed and the team
may ask for further information if needed. Based on the findings, the issue is either
assigned a fix version or declined.
## Create a Branch
When a fix is ready, the issue is closed and may still be re-opened. Once a fix is
released, the issue can't be reopened. If necessary, you will need to create a new,
related ticket with a fresh description.
### Branch from `master`
#### Submit a Pull Request
Master currently represents work toward Spring Framework 4.0. Please submit
all pull requests there, even bug fixes and minor improvements. Backports to
`3.2.x` will be considered on a case-by-case basis.
You can contribute a source code change by submitting a pull request.
1. If you have not previously done so, please sign the
[Contributor License Agreement](https://cla.pivotal.io/sign/spring). You will also be reminded
automatically when you submit a pull request.
### Use short branch names
1. Should you create a ticket first? The answer is no. Just create the pull request and use
the description to provide context and motivation, as you would for an issue. If you want
to start a discussion first or have already created an issue, once a pull request is created,
we will close the issue as superseded by the pull request, and the discussion of the issue
will continue under the pull request.
Branches used when submitting pull requests should preferably be named
according to JIRA issues, e.g. 'SPR-1234'. Otherwise, use succinct, lower-case,
dash (-) delimited names, such as 'fix-warnings', 'fix-typo', etc. In
[fork-and-edit][] cases, the GitHub default 'patch-1' is fine as well. This is
important, because branch names show up in the merge commits that result from
accepting pull requests and should be as expressive and concise as possible.
1. Always check out the `master` branch and submit pull requests against it
(for target version see [settings.gradle](settings.gradle)).
Backports to prior versions will be considered on a case-by-case basis and reflected as
the fix version in the issue tracker.
## Use Spring Framework Code Style
1. Use short branch names, preferably based on the GitHub issue (e.g. `22276`), or
otherwise using succinct, lower-case, dash (-) delimited names, such as `fix-warnings`.
The complete [Spring Framework Code Style][] reference is available on the wiki, but
here's a quick summary:
1. Choose the granularity of your commits consciously and squash commits that represent
multiple edits or corrections of the same logical change. See
[Rewriting History section of Pro Git](https://git-scm.com/book/en/Git-Tools-Rewriting-History)
for an overview of streamlining commit history.
### Mind the whitespace
1. Format commit messages using 55 characters for the subject line, 72 characters per line
for the description, followed by the issue fixed, e.g. `Closes gh-22276`. See the
[Commit Guidelines section of Pro Git](https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines)
for best practices around commit messages and use `git log` to see some examples.
Please carefully follow the whitespace and formatting conventions already
present in the framework.
1. List the GitHub issue number in the PR description.
1. Tabs, not spaces
1. Unix (LF), not DOS (CRLF) line endings
1. Eliminate all trailing whitespace
1. Wrap Javadoc at 90 characters
1. Aim to wrap code at 90 characters, but favor readability over wrapping
1. Preserve existing formatting; i.e. do not reformat code for its own sake
1. Search the codebase using `git grep` and other tools to discover common
naming conventions, etc.
1. UTF-8 encoding for Java sources
If accepted, your contribution may be heavily modified as needed prior to merging.
You will likely retain author attribution for your Git commits granted that the bulk of
your changes remain intact. You may also be asked to rework the submission.
If asked to make corrections, simply push the changes against the same branch, and your
pull request will be updated. In other words, you do not need to create a new pull request
when asked to make changes.
### Add Apache license header to all new classes
#### Participate in Reviews
```java
/*
* Copyright 2002-2016 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Helping to review pull requests is another great way to contribute. Your feedback
can help to shape the implementation of new features. When reviewing pull requests,
however, please refrain from approving or rejecting a PR unless you are a core
committer for the Spring Framework.
package ...;
```
### Build from Source
### Update Apache license header in modified files as necessary
See the [Build from Source](https://github.com/spring-projects/spring-framework/wiki/Build-from-Source)
wiki page for instructions on how to check out, build, and import the Spring Framework
source code into your IDE.
Always check the date range in the license header. For example, if you've
modified a file in 2015 whose header still reads:
### Source Code Style
```java
/*
* Copyright 2002-2011 the original author or authors.
```
The wiki pages
[Code Style](https://github.com/spring-projects/spring-framework/wiki/Code-Style) and
[IntelliJ IDEA Editor Settings](https://github.com/spring-projects/spring-framework/wiki/IntelliJ-IDEA-Editor-Settings)
defines the source file coding standards we use along with some IDEA editor settings we customize.
Then be sure to update it to 2016 accordingly:
### Reference Docs
```java
/*
* Copyright 2002-2016 the original author or authors.
```
The reference documentation is in the [src/docs/asciidoc](src/docs/asciidoc) directory and, in
[Asciidoctor](https://asciidoctor.org/) format. For trivial changes, you may be able to browse,
edit source files, and submit directly from GitHub.
### Use @since tags for newly-added public API types and methods
When making changes locally, use `./gradlew asciidoctor` and then browse the result under
`build/asciidoc/html5/index.html`.
For example:
Asciidoctor also supports live editing. For more details read
[Editing AsciiDoc with Live Preview](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/).
Note that if you choose the
[System Monitor](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/#using-a-system-monitor)
option, you can find a Guardfile under `src/docs/asciidoc`.
```java
/**
* ...
*
* @author First Last
* @since 4.2.3
* @see ...
*/
```
## Prepare Your Commit
### Submit JUnit test cases for all behavior changes
Search the codebase to find related tests and add additional `@Test` methods
as appropriate. It is also acceptable to submit test cases on a per JIRA issue
basis, for example:
```java
package org.springframework.beans.factory.support;
/**
* Unit tests for SPR-8954, in which a custom {@link InstantiationAwareBeanPostProcessor}
* forces the predicted type of a FactoryBean, effectively preventing retrieval of the
* bean from calls to #getBeansOfType(FactoryBean.class). The implementation of
* {@link AbstractBeanFactory#isFactoryBean(String, RootBeanDefinition)} now ensures
* that not only the predicted bean type is considered, but also the original bean
* definition's beanClass.
*
* @author Chris Beams
*/
public class Spr8954Tests {
@Test
public void cornerSpr8954() {
// ...
}
}
```
### Squash commits
Use `git rebase --interactive --autosquash`, `git add --patch`, and other tools
to "squash" multiple commits into a single atomic commit. In addition to the man
pages for git, there are many resources online to help you understand how these
tools work. The [Rewriting History section of Pro Git][] provides a good overview.
### Use real name in git commits
Please configure git to use your real first and last name for any commits you
intend to submit as pull requests. For example, this is not acceptable:
Author: Nickname <user@mail.com>
Rather, please include your first and last name, properly capitalized, as
submitted against the Spring Individual Contributor License Agreement (ICLA):
Author: First Last <user@mail.com>
This helps ensure traceability against the ICLA and also goes a long way to
ensuring useful output from tools like `git shortlog` and others.
You can configure this via the account admin area in GitHub (useful for
fork-and-edit cases); _globally_ on your machine with
git config --global user.name "First Last"
git config --global user.email user@mail.com
or _locally_ for the `spring-framework` repository only by omitting the
'--global' flag:
cd spring-framework
git config user.name "First Last"
git config user.email user@mail.com
### Format commit messages
Please read and follow the [Commit Guidelines section of Pro Git][].
Most importantly, please format your commit messages in the following way
(adapted from the commit template in the link above):
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded by a
single space, with blank lines in between, but conventions vary here
Issue: SPR-1234, SPR-1235
1. Use imperative statements in the subject line, e.g. "Fix broken Javadoc link".
1. Begin the subject line with a capitalized verb, e.g. "Add, Prune, Fix,
Introduce, Avoid, etc."
1. Do not end the subject line with a period.
1. Restrict the subject line to 50 characters or less if possible.
1. Wrap lines in the body at 72 characters or less.
1. Mention associated JIRA issue(s) at the end of the commit comment, prefixed
with "Issue: " as above.
1. In the body of the commit message, explain how things worked before this
commit, what has changed, and how things work now.
For examples of this style, issue a `git log --author=cbeams` in the
`spring-framework` git repository. For convenience, here are several such commits:
- https://github.com/spring-projects/spring-framework/commit/08e2669b84ec0faa2f7904441fe39ac70b65b078
- https://github.com/spring-projects/spring-framework/commit/1d9d3e6ff79ce9f0eca03b02cd1df705925575da
- https://github.com/spring-projects/spring-framework/commit/8e0b1c3a5f957af3049cfa0438317177e16d6de6
- https://github.com/spring-projects/spring-framework/commit/b787a68f2050df179f7036b209aa741230a02477
## Run the Final Checklist
### Run all tests prior to submission
See the [building from source][] section of the `README` for instructions. Make
sure that all tests pass prior to submitting your pull request.
### Submit your pull request
Subject line:
Follow the same conventions for pull request subject lines as mentioned above
for commit message subject lines.
In the body:
1. Explain your use case. What led you to submit this change? Why were existing
mechanisms in the framework insufficient? Make a case that this is a
general-purpose problem and that yours is a general-purpose solution, etc.
1. Add any additional information and ask questions; start a conversation or
continue one from JIRA.
1. Mention the JIRA issue ID.
1. Also mention that you have submitted the ICLA as described above.
Note that for pull requests containing a single commit, GitHub will default the
subject line and body of the pull request to match the subject line and body of
the commit message. This is fine, but please also include the items above in the
body of the request.
### Mention your pull request on the associated JIRA issue
Add a comment to the associated JIRA issue(s) linking to your new pull request.
### Expect discussion and rework
The Spring team takes a very conservative approach to accepting contributions to
the framework. This is to keep code quality and stability as high as possible,
and to keep complexity at a minimum. Your changes, if accepted, may be heavily
modified prior to merging. You will retain "Author:" attribution for your Git
commits granted that the bulk of your changes remain intact. You may be asked to
rework the submission for style (as explained above) and/or substance. Again, we
strongly recommend discussing any serious submissions with the Spring Framework
team _prior_ to engaging in serious development work.
Note that you can always force push (`git push -f`) reworked / rebased commits
against the branch used to submit your pull request. In other words, you do not
need to issue a new pull request when asked to make changes.
[help documentation]: https://help.github.com/send-pull-requests
[JIRA issue tracker]: https://jira.spring.io/browse/SPR
[spring-framework-contrib]: https://groups.google.com/forum/#!forum/spring-framework-contrib
[Spring ICLA form]: https://support.springsource.com/spring_committer_signup
[fork-and-edit]: https://github.com/blog/844-forking-with-the-edit-button
[Spring Framework Code Style]: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style
[Rewriting History section of Pro Git]: https://git-scm.com/book/en/Git-Tools-Rewriting-History
[Commit Guidelines section of Pro Git]: https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines
[building from source]: https://github.com/spring-projects/spring-framework#building-from-source
-202
View File
@@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+88 -16
View File
@@ -1,30 +1,102 @@
# <img src="src/docs/asciidoc/images/spring-framework.png" width="80" height="80"> Spring Framework [![Build Status](https://build.spring.io/plugins/servlet/wittified/build-status/SPR-PUBM)](https://build.spring.io/browse/SPR)
## Spring Framework
The Spring Framework provides a comprehensive programming and configuration
model for modern Java-based enterprise applications -- on any kind of deployment
platform. A key element of Spring is infrastructural support at the application
level: Spring focuses on the "plumbing" of enterprise applications so that teams
can focus on application-level business logic, without unnecessary ties to
specific deployment environments.
This is the home of the Spring Framework: the foundation for all [Spring projects](https://spring.io/projects). Collectively the Spring Framework and the family of Spring projects is often referred to simply as "Spring".
Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the [Overview](https://docs.spring.io/spring/docs/current/spring-framework-reference/overview.html#spring-introduction) section as reference for a more complete introduction.
The framework also serves as the foundation for [Spring Integration][], [Spring Batch][]
and the rest of the Spring [family of projects][]. Browse the repositories under
the [Spring organization][] on GitHub for a full list.
## Code of Conduct
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.adoc).
By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
This project is governed by the [Spring Code of Conduct](CODE_OF_CONDUCT.adoc). By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
## Access to Binaries
For access to artifacts or a distribution zip, see the [Spring Framework Artifacts](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Artifacts) wiki page.
## Downloading Artifacts
See [downloading Spring artifacts][] for Maven repository information. Unable to
use Maven or other transitive dependency management tools?
See [building a distribution with dependencies][].
## Documentation
See the current [Javadoc][] and [reference docs][].
The Spring Framework maintains reference documentation ([published](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/) and [source](src/docs/asciidoc)), Github [wiki pages](https://github.com/spring-projects/spring-framework/wiki), and an
[API reference](https://docs.spring.io/spring-framework/docs/current/javadoc-api/). There are also [guides and tutorials](https://spring.io/guides) across Spring projects.
## Getting Support
Check out the [spring][spring tags] tags on [Stack Overflow][]. [Commercial support][]
is available too.
## Build from Source
## Issue Tracking
Report issues via the [Spring Framework JIRA][]. Understand our issue management
process by reading about [the lifecycle of an issue][]. Think you've found a
bug? Please consider submitting a reproduction project via the
[spring-framework-issues][] GitHub repository. The [readme][] there provides
simple step-by-step instructions.
See the [Build from Source](https://github.com/spring-projects/spring-framework/wiki/Build-from-Source) Wiki page and the [CONTRIBUTING.md](CONTRIBUTING.md) file.
## Building from Source
The Spring Framework uses a [Gradle][]-based build system. In the instructions
below, [`./gradlew`][] is invoked from the root of the source tree and serves as
a cross-platform, self-contained bootstrap mechanism for the build.
## Stay in Touch
### Prerequisites
Follow [@SpringCentral](https://twitter.com/springcentral), [@SpringFramework](https://twitter.com/springframework), and its [team members](https://twitter.com/springframework/lists/team/members) on Twitter. In-depth articles can be found at [The Spring Blog](https://spring.io/blog/), and releases are announced via our [news feed](https://spring.io/blog/category/news).
[Git][] and [JDK 8 update 20 or later][JDK8 build]
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder
extracted from the JDK download.
### Check out sources
`git clone git@github.com:spring-projects/spring-framework.git`
### Import sources into your IDE
Run `./import-into-eclipse.sh` or read `import-into-idea.md` as appropriate.
> **Note:** Per the prerequisites above, ensure that you have JDK 8 configured properly in your IDE.
### Install all spring-\* jars into your local Maven cache
`./gradlew install`
### Compile and test; build all jars, distribution zips, and docs
`./gradlew build`
... and discover more commands with `./gradlew tasks`. See also the [Gradle
build and release FAQ][].
## Contributing
[Pull requests][] are welcome; see the [contributor guidelines][] for details.
## Staying in Touch
Follow [@SpringCentral][] as well as [@SpringFramework][] and its [team members][]
on Twitter. In-depth articles can be found at [The Spring Blog][], and releases
are announced via our [news feed][].
## License
The Spring Framework is released under version 2.0 of the [Apache License][].
The Spring Framework is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).
[Spring Integration]: https://github.com/spring-projects/spring-integration
[Spring Batch]: https://github.com/spring-projects/spring-batch
[family of projects]: https://spring.io/projects
[Spring organization]: https://github.com/spring-projects
[downloading Spring artifacts]: https://github.com/spring-projects/spring-framework/wiki/Downloading-Spring-artifacts
[building a distribution with dependencies]: https://github.com/spring-projects/spring-framework/wiki/Building-a-distribution-with-dependencies
[Javadoc]: https://docs.spring.io/spring-framework/docs/current/javadoc-api/
[reference docs]: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/
[spring tags]: https://spring.io/questions
[Stack Overflow]: https://stackoverflow.com/faq
[Commercial support]: https://spring.io/services
[Spring Framework JIRA]: https://jira.spring.io/browse/SPR
[the lifecycle of an issue]: https://github.com/spring-projects/spring-framework/wiki/The-Lifecycle-of-an-Issue
[spring-framework-issues]: https://github.com/spring-projects/spring-framework-issues#readme
[readme]: https://github.com/spring-projects/spring-framework-issues#readme
[Gradle]: https://gradle.org
[`./gradlew`]: https://vimeo.com/34436402
[Git]: https://help.github.com/set-up-git-redirect
[JDK8 build]: https://www.oracle.com/technetwork/java/javase/downloads
[Gradle build and release FAQ]: https://github.com/spring-projects/spring-framework/wiki/Gradle-build-and-release-FAQ
[Pull requests]: https://help.github.com/send-pull-requests
[contributor guidelines]: https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.md
[@SpringFramework]: https://twitter.com/springframework
[@SpringCentral]: https://twitter.com/springcentral
[team members]: https://twitter.com/springframework/lists/team/members
[The Spring Blog]: https://spring.io/blog/
[news feed]: https://spring.io/blog/category/news
[Apache License]: https://www.apache.org/licenses/LICENSE-2.0
-11
View File
@@ -1,11 +0,0 @@
# Security Policy
## Supported Versions
Please see the
[Spring Framework Versions](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions)
wiki page.
## Reporting a Vulnerability
Please see https://pivotal.io/security.
+1338 -384
View File
File diff suppressed because it is too large Load Diff
-47
View File
@@ -1,47 +0,0 @@
# Spring Framework build
This folder contains the custom plugins and conventions for the Spring Framework build.
They are declared in the `build.gradle` file in this folder.
## Build Conventions
### Compiler conventions
The `org.springframework.build.compile` applies the Java compiler conventions to the build.
By default, the build is compiling sources with the `1.8` source and target compatibility.
You can test a different source compatibility version on the CLI with a project property like:
```
./gradlew test -PjavaSourceVersion=11
```
## Build Plugins
## Optional dependencies
The `org.springframework.build.optional-dependencies` plugin creates a new `optional`
Gradle configuration - it adds the dependencies to the project's compile and runtime classpath
but doesn't affect the classpath of dependent projects.
This plugin does not provide a `provided` configuration, as the native `compileOnly` and `testCompileOnly`
configurations are preferred.
## Test sources
The `org.springframework.build.test-sources` updates `testCompile` dependencies to include
the test source sets of `project()` dependencies. This plugin is used in the Spring Framework build
to share test utilities and fixtures amongst modules.
## API Diff
This plugin uses the [Gradle JApiCmp](https://github.com/melix/japicmp-gradle-plugin) plugin
to generate API Diff reports for each Spring Framework module. This plugin is applied once on the root
project and create tasks in each framework module. Unlike previous versions of this part of the build,
there is no need for checking out a specific tag. The plugin will fetch the JARs we want to compare the
current working version with. You can generate the reports for all modules or a single module:
```
./gradlew apiDiff -PbaselineVersion=5.1.0.RELEASE
./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE
```
The reports are located under `build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/`.
-34
View File
@@ -1,34 +0,0 @@
plugins {
id 'java-gradle-plugin'
}
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
implementation "me.champeau.gradle:japicmp-gradle-plugin:0.2.8"
implementation "com.google.guava:guava:18.0" // required by japicmp-gradle-plugin
}
gradlePlugin {
plugins {
apiDiffPlugin {
id = "org.springframework.build.api-diff"
implementationClass = "org.springframework.build.api.ApiDiffPlugin"
}
compileConventionsPlugin {
id = "org.springframework.build.compile"
implementationClass = "org.springframework.build.compile.CompilerConventionsPlugin"
}
optionalDependenciesPlugin {
id = "org.springframework.build.optional-dependencies"
implementationClass = "org.springframework.build.optional.OptionalDependenciesPlugin"
}
testSourcesPlugin {
id = "org.springframework.build.test-sources"
implementationClass = "org.springframework.build.testsources.TestSourcesPlugin"
}
}
}
@@ -0,0 +1,158 @@
/*
* Copyright 2002-2013 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
/**
* Gradle plugin that detects identically named, non-empty packages split across multiple
* subprojects, e.g. "org.springframework.context.annotation" existing in both spring-core
* and spring-aspects. Adds a 'detectSplitPackages' task to the current project's task
* collection. If the project already contains a 'check' task (i.e. is a typical Gradle
* project with the "java" plugin applied), the 'check' task will be updated to depend on
* the execution of 'detectSplitPackages'.
*
* By default, all subprojects will be scanned. Use the 'projectsToScan' task property to
* modify this value. Example usage:
*
* apply plugin: 'detect-split-packages // typically applied to root project
*
* detectSplitPackages {
* packagesToScan -= project(":spring-xyz") // scan every project but spring-xyz
* }
*
* @author Rob Winch
* @author Glyn Normington
* @author Chris Beams
*/
public class DetectSplitPackagesPlugin implements Plugin<Project> {
public void apply(Project project) {
def tasks = project.tasks
Task detectSplitPackages = tasks.create("detectSplitPackages", DetectSplitPackagesTask.class)
if (tasks.asMap.containsKey("check")) {
tasks.getByName("check").dependsOn detectSplitPackages
}
}
}
public class DetectSplitPackagesTask extends DefaultTask {
private static final String JAVA_FILE_SUFFIX = ".java"
private static final String PACKAGE_SEPARATOR = "."
private static final String HIDDEN_DIRECTORY_PREFIX = "."
@Input
Set<Project> projectsToScan = project.subprojects
public DetectSplitPackagesTask() {
this.group = "Verification"
this.description = "Detects packages split across two or more subprojects."
}
@TaskAction
public void detectSplitPackages() {
def splitPackages = doDetectSplitPackages()
if (!splitPackages.isEmpty()) {
def message = "The following split package(s) have been detected:\n"
splitPackages.each { pkg, mod ->
message += " - ${pkg} (split across ${mod[0].name} and ${mod[1].name})\n"
}
throw new GradleException(message)
}
}
private Map<String, List<Project>> doDetectSplitPackages() {
def splitPackages = [:]
def mergedProjects = findMergedProjects()
def packagesByProject = mapPackagesByProject()
def projects = packagesByProject.keySet().toArray()
def nProjects = projects.length
for (int i = 0; i < nProjects - 1; i++) {
for (int j = i + 1; j < nProjects - 1; j++) {
def prj_i = projects[i]
def prj_j = projects[j]
def pkgs_i = new HashSet(packagesByProject.get(prj_i))
def pkgs_j = packagesByProject.get(prj_j)
pkgs_i.retainAll(pkgs_j)
if (!pkgs_i.isEmpty()
&& mergedProjects.get(prj_i) != prj_j
&& mergedProjects.get(prj_j) != prj_i) {
pkgs_i.each { pkg ->
def readablePkg = pkg.substring(1).replaceAll(File.separator, PACKAGE_SEPARATOR)
splitPackages[readablePkg] = [prj_i, prj_j]
}
}
}
}
return splitPackages;
}
private Map<Project, Set<String>> mapPackagesByProject() {
def packagesByProject = [:]
this.projectsToScan.each { Project p ->
def packages = new HashSet<String>()
p.sourceSets.main.java.srcDirs.each { File dir ->
findPackages(packages, dir, "")
}
if (!packages.isEmpty()) {
packagesByProject.put(p, packages)
}
}
return packagesByProject;
}
private Map<Project, Project> findMergedProjects() {
def mergedProjects = [:]
this.projectsToScan.findAll { p ->
p.plugins.findPlugin(MergePlugin)
}.findAll { p ->
p.merge.into
}.each { p ->
mergedProjects.put(p, p.merge.into)
}
return mergedProjects
}
private static void findPackages(Set<String> packages, File dir, String packagePath) {
def scanDir = new File(dir, packagePath)
def File[] javaFiles = scanDir.listFiles({ file ->
!file.isDirectory() && file.name.endsWith(JAVA_FILE_SUFFIX)
} as FileFilter)
if (javaFiles != null && javaFiles.length != 0) {
packages.add(packagePath)
}
scanDir.listFiles({ File file ->
file.isDirectory() && !file.name.startsWith(HIDDEN_DIRECTORY_PREFIX)
} as FileFilter).each { File subDir ->
findPackages(packages, dir, packagePath + File.separator + subDir.name)
}
}
}
@@ -0,0 +1,158 @@
/*
* Copyright 2002-2015 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.*
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ProjectDependency;
import org.gradle.api.artifacts.maven.Conf2ScopeMapping
import org.gradle.api.plugins.MavenPlugin
import org.gradle.plugins.ide.eclipse.EclipsePlugin
import org.gradle.plugins.ide.idea.IdeaPlugin
import org.gradle.api.invocation.*
/**
* Gradle plugin that allows projects to merged together. Primarily developed to
* allow Spring to support multiple incompatible versions of third-party
* dependencies (for example Hibernate v3 and v4).
* <p>
* The 'merge' extension should be used to define how projects are merged, for example:
* <pre class="code">
* configure(subprojects) {
* apply plugin: MergePlugin
* }
*
* project("myproject") {
* }
*
* project("myproject-extra") {
* merge.into = project("myproject")
* }
* </pre>
* <p>
* This plugin adds two new configurations:
* <ul>
* <li>merging - Contains the projects being merged into this project<li>
* <li>runtimeMerge - Contains all dependencies that are merge projects. These are used
* to allow an IDE to reference merge projects.</li>
* <ul>
*
* @author Rob Winch
* @author Phillip Webb
*/
class MergePlugin implements Plugin<Project> {
private static boolean attachedProjectsEvaluated;
public void apply(Project project) {
project.plugins.apply(MavenPlugin)
project.plugins.apply(EclipsePlugin)
project.plugins.apply(IdeaPlugin)
MergeModel model = project.extensions.create("merge", MergeModel)
project.configurations.create("merging")
Configuration runtimeMerge = project.configurations.create("runtimeMerge")
// Ensure the IDE can reference merged projects
project.eclipse.classpath.plusConfigurations += [ runtimeMerge ]
project.idea.module.scopes.PROVIDED.plus += [ runtimeMerge ]
// Hook to perform the actual merge logic
project.afterEvaluate{
if (it.merge.into != null) {
setup(it)
}
}
// Hook to build runtimeMerge dependencies
if (!attachedProjectsEvaluated) {
project.gradle.projectsEvaluated{
postProcessProjects(it)
}
attachedProjectsEvaluated = true;
}
}
private void setup(Project project) {
project.merge.into.dependencies.add("merging", project)
project.dependencies.add("provided", project.merge.into.sourceSets.main.output)
project.dependencies.add("runtimeMerge", project.merge.into)
setupTaskDependencies(project)
setupMaven(project)
}
private void setupTaskDependencies(Project project) {
// invoking a task will invoke the task with the same name on 'into' project
["sourcesJar", "jar", "javadocJar", "javadoc", "install", "artifactoryPublish"].each {
def task = project.tasks.findByPath(it)
if (task) {
task.enabled = false
task.dependsOn(project.merge.into.tasks.findByPath(it))
}
}
// update 'into' project artifacts to contain the source artifact contents
project.merge.into.sourcesJar.from(project.sourcesJar.source)
project.merge.into.jar.from(project.sourceSets.main.output)
project.merge.into.javadoc {
source += project.javadoc.source
classpath += project.javadoc.classpath
}
}
private void setupMaven(Project project) {
project.configurations.each { configuration ->
Conf2ScopeMapping mapping = project.conf2ScopeMappings.getMapping([configuration])
if (mapping.scope) {
Configuration intoConfiguration = project.merge.into.configurations.create(
project.name + "-" + configuration.name)
configuration.excludeRules.each {
configuration.exclude([
(ExcludeRule.GROUP_KEY) : it.group,
(ExcludeRule.MODULE_KEY) : it.module])
}
configuration.dependencies.each {
def intoCompile = project.merge.into.configurations.getByName("compile")
// Protect against changing a compile scope dependency (SPR-10218)
if (!intoCompile.dependencies.contains(it)) {
intoConfiguration.dependencies.add(it)
}
}
def index = project.parent.childProjects.findIndexOf {p -> p.getValue() == project}
project.merge.into.install.repositories.mavenInstaller.pom.scopeMappings.addMapping(
mapping.priority + 100 + index, intoConfiguration, mapping.scope)
}
}
}
private postProcessProjects(Gradle gradle) {
gradle.allprojects(new Action<Project>() {
public void execute(Project project) {
project.configurations.getByName("runtime").allDependencies.withType(ProjectDependency).each{
Configuration dependsOnMergedFrom = it.dependencyProject.configurations.getByName("merging");
dependsOnMergedFrom.dependencies.each{ dep ->
project.dependencies.add("runtimeMerge", dep.dependencyProject)
}
}
}
});
}
}
class MergeModel {
Project into;
}
@@ -0,0 +1,55 @@
/*
* Copyright 2002-2014 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ProjectDependency;
/**
* Gradle plugin that automatically updates testCompile dependencies to include
* the test source sets of project dependencies.
*
* @author Phillip Webb
*/
class TestSourceSetDependenciesPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.afterEvaluate {
Set<ProjectDependency> projectDependencies = new LinkedHashSet<ProjectDependency>()
collectProjectDependencies(projectDependencies, project)
projectDependencies.each {
project.dependencies.add("testCompile", it.dependencyProject.sourceSets.test.output)
}
}
}
private void collectProjectDependencies(Set<ProjectDependency> projectDependencies, Project project) {
for (def configurationName in ["compile", "optional", "provided", "testCompile"]) {
Configuration configuration = project.getConfigurations().findByName(configurationName)
if (configuration) {
configuration.dependencies.findAll { it instanceof ProjectDependency }.each {
projectDependencies.add(it)
collectProjectDependencies(projectDependencies, it.dependencyProject)
}
}
}
}
}
@@ -1,115 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.api;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import me.champeau.gradle.japicmp.JapicmpPlugin;
import me.champeau.gradle.japicmp.JapicmpTask;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.plugins.JavaBasePlugin;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.jvm.tasks.Jar;
/**
* {@link Plugin} that applies the {@code "japicmp-gradle-plugin"}
* and create tasks for all subprojects, diffing the public API one by one
* and creating the reports in {@code "build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/"}.
* <p>{@code "./gradlew apiDiff -PbaselineVersion=5.1.0.RELEASE"} will output the
* reports for the API diff between the baseline version and the current one for all modules.
* You can limit the report to a single module with
* {@code "./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE"}.
*
* @author Brian Clozel
*/
public class ApiDiffPlugin implements Plugin<Project> {
public static final String TASK_NAME = "apiDiff";
private static final String BASELINE_VERSION_PROPERTY = "baselineVersion";
private static final List<String> PACKAGE_INCLUDES = Collections.singletonList("org.springframework.*");
@Override
public void apply(Project project) {
if (project.hasProperty(BASELINE_VERSION_PROPERTY) && project.equals(project.getRootProject())) {
project.getPluginManager().apply(JapicmpPlugin.class);
project.getPlugins().withType(JapicmpPlugin.class,
plugin -> applyApiDiffConventions(project));
}
}
private void applyApiDiffConventions(Project project) {
String baselineVersion = project.property(BASELINE_VERSION_PROPERTY).toString();
project.subprojects(subProject -> createApiDiffTask(baselineVersion, subProject));
}
private void createApiDiffTask(String baselineVersion, Project project) {
if (isProjectEligible(project)) {
JapicmpTask apiDiff = project.getTasks().create(TASK_NAME, JapicmpTask.class);
apiDiff.setDescription("Generates an API diff report with japicmp");
apiDiff.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
apiDiff.setOldClasspath(project.files(createBaselineConfiguration(baselineVersion, project)));
TaskProvider<Jar> jar = project.getTasks().withType(Jar.class).named("jar");
apiDiff.setNewArchives(project.getLayout().files(jar.get().getArchiveFile().get().getAsFile()));
apiDiff.setNewClasspath(getRuntimeClassPath(project));
apiDiff.setPackageIncludes(PACKAGE_INCLUDES);
apiDiff.setOnlyModified(true);
apiDiff.setIgnoreMissingClasses(true);
// Ignore Kotlin metadata annotations since they contain
// illegal HTML characters and fail the report generation
apiDiff.setAnnotationExcludes(Collections.singletonList("@kotlin.Metadata"));
apiDiff.setHtmlOutputFile(getOutputFile(baselineVersion, project));
apiDiff.dependsOn(project.getTasks().getByName("jar"));
}
}
private boolean isProjectEligible(Project project) {
return project.getPlugins().hasPlugin(JavaPlugin.class)
&& project.getPlugins().hasPlugin(MavenPublishPlugin.class);
}
private Configuration createBaselineConfiguration(String baselineVersion, Project project) {
String baseline = String.join(":",
project.getGroup().toString(), project.getName(), baselineVersion);
Dependency baselineDependency = project.getDependencies().create(baseline + "@jar");
return project.getRootProject().getConfigurations().detachedConfiguration(baselineDependency);
}
private Configuration getRuntimeClassPath(Project project) {
return project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
}
private File getOutputFile(String baseLineVersion, Project project) {
Path outDir = Paths.get(project.getRootProject().getBuildDir().getAbsolutePath(),
"reports", "api-diff",
baseLineVersion + "_to_" + project.getRootProject().getVersion());
return project.file(outDir.resolve(project.getName() + ".html").toString());
}
}
@@ -1,102 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.compile;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.gradle.api.JavaVersion;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.compile.JavaCompile;
/**
* {@link Plugin} that applies conventions for compiling Java sources in Spring Framework.
* <p>One can override the default Java source compatibility version
* with a dedicated property on the CLI: {@code "./gradlew test -PjavaSourceVersion=11"}.
*
* @author Brian Clozel
*/
public class CompilerConventionsPlugin implements Plugin<Project> {
/**
* The project property that can be used to switch the Java source
* compatibility version for building source and test classes.
*/
public static String JAVA_SOURCE_VERSION_PROPERTY = "javaSourceVersion";
public static JavaVersion DEFAULT_COMPILER_VERSION = JavaVersion.VERSION_1_8;
private static List<String> COMPILER_ARGS;
private static List<String> TEST_COMPILER_ARGS;
static {
List<String> commonCompilerArgs = Arrays.asList(
"-Xlint:serial", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann",
"-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides",
"-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-options"
);
COMPILER_ARGS = new ArrayList<>();
COMPILER_ARGS.addAll(commonCompilerArgs);
COMPILER_ARGS.addAll(Arrays.asList(
"-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
"-Xlint:unchecked", "-Werror"
));
TEST_COMPILER_ARGS = new ArrayList<>();
TEST_COMPILER_ARGS.addAll(commonCompilerArgs);
TEST_COMPILER_ARGS.addAll(Arrays.asList("-Xlint:-varargs", "-Xlint:-fallthrough", "-Xlint:-rawtypes",
"-Xlint:-deprecation", "-Xlint:-unchecked", "-parameters"));
}
@Override
public void apply(Project project) {
project.getPlugins().withType(JavaPlugin.class, javaPlugin -> applyJavaCompileConventions(project));
}
/**
* Applies the common Java compiler options for sources and test sources.
* @param project the current project
*/
private void applyJavaCompileConventions(Project project) {
JavaPluginConvention java = project.getConvention().getPlugin(JavaPluginConvention.class);
if (project.hasProperty(JAVA_SOURCE_VERSION_PROPERTY)) {
JavaVersion javaSourceVersion = JavaVersion.toVersion(project.property(JAVA_SOURCE_VERSION_PROPERTY));
java.setSourceCompatibility(javaSourceVersion);
}
else {
java.setSourceCompatibility(DEFAULT_COMPILER_VERSION);
}
java.setTargetCompatibility(DEFAULT_COMPILER_VERSION);
project.getTasks().withType(JavaCompile.class)
.matching(javaCompile -> javaCompile.getName().equals(JavaPlugin.COMPILE_JAVA_TASK_NAME))
.forEach(compileTask -> {
compileTask.getOptions().setCompilerArgs(COMPILER_ARGS);
compileTask.getOptions().setEncoding("UTF-8");
});
project.getTasks().withType(JavaCompile.class)
.matching(javaCompile -> javaCompile.getName().equals(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME))
.forEach(compileTask -> {
compileTask.getOptions().setCompilerArgs(TEST_COMPILER_ARGS);
compileTask.getOptions().setEncoding("UTF-8");
});
}
}
@@ -1,64 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.optional;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.SourceSetContainer;
import org.gradle.plugins.ide.eclipse.EclipsePlugin;
import org.gradle.plugins.ide.eclipse.model.EclipseModel;
/**
* A {@code Plugin} that adds support for Maven-style optional dependencies. Creates a new
* {@code optional} configuration. The {@code optional} configuration is part of the
* project's compile and runtime classpath's but does not affect the classpath of
* dependent projects.
*
* @author Andy Wilkinson
*/
public class OptionalDependenciesPlugin implements Plugin<Project> {
/**
* Name of the {@code optional} configuration.
*/
public static final String OPTIONAL_CONFIGURATION_NAME = "optional";
@Override
public void apply(Project project) {
Configuration optional = project.getConfigurations().create("optional");
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> {
SourceSetContainer sourceSets = project.getConvention()
.getPlugin(JavaPluginConvention.class).getSourceSets();
sourceSets.all((sourceSet) -> {
sourceSet.setCompileClasspath(
sourceSet.getCompileClasspath().plus(optional));
sourceSet.setRuntimeClasspath(
sourceSet.getRuntimeClasspath().plus(optional));
});
});
project.getPlugins().withType(EclipsePlugin.class, (eclipePlugin) -> {
project.getExtensions().getByType(EclipseModel.class)
.classpath((classpath) -> {
classpath.getPlusConfigurations().add(optional);
});
});
}
}
@@ -1,95 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.testsources;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ProjectDependency;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetOutput;
import org.springframework.build.optional.OptionalDependenciesPlugin;
/**
* {@link Plugin} that automatically updates testCompile dependencies to include
* the test source sets of {@code project()} dependencies.
*
* <p>This plugin is used in the Spring Framework build to share test utilities and fixtures
* between projects.
*
* @author Phillip Webb
* @author Brian Clozel
*/
public class TestSourcesPlugin implements Plugin<Project> {
/**
* List of configurations this plugin should look for project dependencies in.
*/
@SuppressWarnings("deprecation")
private static final List<String> CONFIGURATIONS = Arrays.asList(
JavaPlugin.COMPILE_CONFIGURATION_NAME,
JavaPlugin.API_CONFIGURATION_NAME,
JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME,
OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME,
JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME);
@Override
public void apply(Project project) {
project.getPlugins().withType(JavaPlugin.class, (plugin) -> addTestSourcesToProject(project));
}
private void addTestSourcesToProject(Project project) {
project.afterEvaluate(currentProject -> {
Set<ProjectDependency> projectDependencies = new LinkedHashSet<>();
collectProjectDependencies(projectDependencies, project);
projectDependencies.forEach(dep -> addTestSourcesFromDependency(currentProject, dep));
});
}
private void collectProjectDependencies(Set<ProjectDependency> projectDependencies, Project project) {
for (String configurationName : CONFIGURATIONS) {
Configuration configuration = project.getConfigurations().findByName(configurationName);
if (configuration != null) {
configuration.getDependencies().forEach(dependency -> {
if (dependency instanceof ProjectDependency) {
ProjectDependency projectDependency = (ProjectDependency) dependency;
projectDependencies.add(projectDependency);
collectProjectDependencies(projectDependencies, projectDependency.getDependencyProject());
}
});
}
}
}
private void addTestSourcesFromDependency(final Project currentProject, ProjectDependency dependency) {
Project dependencyProject = dependency.getDependencyProject();
dependencyProject.getPlugins().withType(JavaPlugin.class, plugin -> {
final JavaPluginConvention javaPlugin = dependencyProject.getConvention()
.getPlugin(JavaPluginConvention.class);
SourceSetOutput test = javaPlugin.getSourceSets().findByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput();
currentProject.getDependencies().add(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME, test);
});
}
}
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.DetectSplitPackagesPlugin
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.MergePlugin
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.TestSourceSetDependenciesPlugin
-29
View File
@@ -1,29 +0,0 @@
description = "Spring Framework (Bill of Materials)"
apply plugin: 'java-platform'
apply from: "$rootDir/gradle/publications.gradle"
group = "org.springframework"
dependencies {
constraints {
parent.moduleProjects.sort { "$it.name" }.each {
api it
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'spring-framework-bom'
from components.javaPlatform
// remove scope information from published BOM
pom.withXml {
asNode().dependencyManagement.first().dependencies.first().each {
it.remove(it.scope.first())
}
}
}
}
}
+1 -4
View File
@@ -1,4 +1 @@
version=5.2.0.RELEASE
org.gradle.jvmargs=-Xmx1536M
org.gradle.caching=false
org.gradle.parallel=true
version=4.3.31.BUILD-SNAPSHOT
-90
View File
@@ -1,90 +0,0 @@
tagOs()
tagIde()
tagCiOrLocal()
addCiMetadata()
addGitMetadata()
addTestTaskMetadata()
void tagOs() {
buildScan.tag System.getProperty('os.name')
}
void tagIde() {
if (System.getProperty('idea.version')) {
buildScan.tag 'IntelliJ IDEA'
} else if (System.getProperty('eclipse.buildId')) {
buildScan.tag 'Eclipse'
}
}
void tagCiOrLocal() {
buildScan.tag(isCi() ? 'CI' : 'LOCAL')
}
void addGitMetadata() {
buildScan.background {
def gitCommitId = execAndGetStdout('git', 'rev-parse', '--short=8', '--verify', 'HEAD')
def gitBranchName = execAndGetStdout('git', 'rev-parse', '--abbrev-ref', 'HEAD')
def gitStatus = execAndGetStdout('git', 'status', '--porcelain')
if(gitCommitId) {
def commitIdLabel = 'Git Commit ID'
value commitIdLabel, gitCommitId
link 'Git commit build scans', customValueSearchUrl([(commitIdLabel): gitCommitId])
}
if (gitBranchName) {
tag gitBranchName
value 'Git branch', gitBranchName
}
if (gitStatus) {
tag 'dirty'
value 'Git status', gitStatus
}
}
}
void addCiMetadata() {
def ciBuild = 'CI BUILD'
if (isBamboo()) {
buildScan.link ciBuild, System.getenv('bamboo_resultsUrl')
}
}
void addTestTaskMetadata() {
allprojects {
tasks.withType(Test) { test ->
doFirst {
buildScan.value "Test#maxParallelForks[${test.path}]", test.maxParallelForks.toString()
}
}
}
}
boolean isCi() {
isBamboo()
}
boolean isBamboo() {
System.getenv('bamboo_resultsUrl')
}
String execAndGetStdout(String... args) {
def stdout = new ByteArrayOutputStream()
exec {
commandLine(args)
standardOutput = stdout
}
return stdout.toString().trim()
}
String customValueSearchUrl(Map<String, String> search) {
def query = search.collect { name, value ->
"search.names=${encodeURL(name)}&search.values=${encodeURL(value)}"
}.join('&')
"$buildScan.server/scans?$query"
}
String encodeURL(String url) {
URLEncoder.encode(url, 'UTF-8')
}
-237
View File
@@ -1,237 +0,0 @@
/**
* Produce Javadoc for all Spring Framework modules in "build/docs/javadoc"
*/
task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"
dependsOn {
moduleProjects.collect {
it.tasks.getByName("jar")
}
}
doFirst {
classpath = files(
// ensure the javadoc process can resolve types compiled from .aj sources
project(":spring-aspects").sourceSets.main.output
)
classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath })
}
options {
encoding = "UTF-8"
memberLevel = JavadocMemberLevel.PROTECTED
author = true
header = rootProject.description
use = true
overview = "src/docs/api/overview.html"
stylesheetFile = file("src/docs/api/stylesheet.css")
splitIndex = true
links(project.ext.javadocLinks)
addStringOption('Xdoclint:none', '-quiet')
if(JavaVersion.current().isJava9Compatible()) {
addBooleanOption('html5', true)
}
}
source moduleProjects.collect { project ->
project.sourceSets.main.allJava
}
maxMemory = "1024m"
destinationDir = file("$buildDir/docs/javadoc")
}
/**
* Produce KDoc for all Spring Framework modules in "build/docs/kdoc"
*/
dokka {
dependsOn {
tasks.getByName("api")
}
doFirst {
classpath = moduleProjects.collect { project -> project.jar.outputs.files.getFiles() }.flatten()
classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath })
sourceDirs = files(moduleProjects
.findAll {
it.pluginManager.hasPlugin("kotlin")
}
.collect { project ->
def kotlinDirs = project.sourceSets.main.kotlin.srcDirs.collect()
kotlinDirs -= project.sourceSets.main.java.srcDirs
})
}
moduleName = "spring-framework"
outputFormat = "html"
outputDirectory = "$buildDir/docs/kdoc"
externalDocumentationLink {
url = new URL("https://docs.spring.io/spring-framework/docs/$version/javadoc-api/")
packageListUrl = new File(buildDir, "docs/javadoc/package-list").toURI().toURL()
}
externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/core/release/api/")
}
externalDocumentationLink {
url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/")
}
externalDocumentationLink {
url = new URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
}
}
task downloadResources(type: Download) {
def version = "0.1.3.RELEASE"
src "https://repo.spring.io/release/io/spring/docresources/" +
"spring-doc-resources/$version/spring-doc-resources-${version}.zip"
dest project.file("$buildDir/docs/spring-doc-resources.zip")
onlyIfModified true
useETag "all"
}
task extractDocResources(type: Copy, dependsOn: downloadResources) {
from project.zipTree(downloadResources.dest);
into "$buildDir/docs/spring-docs-resources/"
}
/**
* Produce the Spring Framework Reference documentation
* from "src/docs/asciidoc" into "build/asciidoc/html5"
*/
asciidoctor {
sources {
include '*.adoc'
}
outputDir "$buildDir/docs/ref-docs/"
resources {
from(sourceDir) {
include 'images/*', 'css/**', 'js/**'
}
from "$buildDir/docs/spring-docs-resources/"
}
logDocuments = true
backends = ["html5"]
// only ouput PDF documentation for non-SNAPSHOT builds
if(!project.getVersion().toString().contains("BUILD-SNAPSHOT")) {
backends += "pdf"
}
options doctype: 'book', eruby: 'erubis'
attributes 'icons': 'font',
'idprefix': '',
'idseparator': '-',
'docinfo': 'shared',
'revnumber': project.version,
'sectanchors': '',
'sectnums': '',
'source-highlighter=highlight.js',
'highlightjsdir=js/highlight',
'highlightjs-theme=github',
stylesdir: "css/",
stylesheet: 'stylesheet.css',
'spring-version': project.version
}
asciidoctor.dependsOn extractDocResources
/**
* Zip all docs (API and reference) into a single archive
*/
task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'dokka']) {
group = "Distribution"
description = "Builds -${archiveClassifier} archive containing api and reference " +
"for deployment at https://docs.spring.io/spring-framework/docs."
archiveBaseName.set("spring-framework")
archiveClassifier.set("docs")
from("src/dist") {
include "changelog.txt"
}
from (api) {
into "javadoc-api"
}
from ("$asciidoctor.outputDir/html5") {
into "spring-framework-reference"
}
from ("$asciidoctor.outputDir/pdf") {
into "spring-framework-reference/pdf"
}
from (dokka) {
into "kdoc-api"
}
}
/**
* Zip all Spring Framework schemas into a single archive
*/
task schemaZip(type: Zip) {
group = "Distribution"
archiveBaseName.set("spring-framework")
archiveClassifier.set("schema")
description = "Builds -${archiveClassifier} archive containing all " +
"XSDs for deployment at https://springframework.org/schema."
duplicatesStrategy DuplicatesStrategy.EXCLUDE
moduleProjects.each { module ->
def Properties schemas = new Properties();
module.sourceSets.main.resources.find {
it.path.endsWith("META-INF/spring.schemas")
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = module.sourceSets.main.resources.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
}
}
}
}
/**
* Create a distribution zip with everything:
* docs, schemas, jars, source jars, javadoc jars
*/
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = "Distribution"
archiveBaseName.set("spring-framework")
archiveClassifier.set("dist")
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.baseDir = "${archiveBaseName}-${project.version}";
from("src/docs/dist") {
include "readme.txt"
include "license.txt"
include "notice.txt"
into "${baseDir}"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}
moduleProjects.each { module ->
into ("${baseDir}/libs") {
from module.jar
if (module.tasks.findByPath("sourcesJar")) {
from module.sourcesJar
}
if (module.tasks.findByPath("javadocJar")) {
from module.javadocJar
}
}
}
}
distZip.mustRunAfter moduleProjects.check
+4 -10
View File
@@ -1,7 +1,9 @@
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
import org.gradle.plugins.ide.eclipse.model.SourceFolder
apply plugin: "eclipse"
apply plugin: "propdeps-eclipse"
apply plugin: "propdeps-idea"
eclipse.jdt {
sourceCompatibility = 1.8
@@ -11,7 +13,7 @@ eclipse.jdt {
// Replace classpath entries with project dependencies (GRADLE-1116)
// https://issues.gradle.org/browse/GRADLE-1116
eclipse.classpath.file.whenMerged { classpath ->
def regexp = /.*?\/([^\/]+)\/build\/([^\/]+\/)+(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb)
def regexp = /.*?\/([^\/]+)\/build\/[^\/]+\/(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb)
def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp }
projectOutputDependencies.each { entry ->
def matcher = (entry.path =~ regexp)
@@ -89,14 +91,6 @@ task cleanEclipseJdtUi(type: Delete) {
delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
}
task eclipseBuildship(type: Copy) {
from rootProject.files(
"src/eclipse/org.eclipse.jdt.ui.prefs",
"src/eclipse/org.eclipse.jdt.core.prefs")
into project.file('.settings/')
outputs.upToDateWhen { false }
}
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
tasks["eclipse"].dependsOn(eclipseSettings, eclipseWstComponent)
+75
View File
@@ -0,0 +1,75 @@
/**
* Generate a JDiff report between the current version and an older version.
*
* Usage:
* gradle jdiff -D OLD_VERSION=3.1.3.RELEASE -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
*
* View generated report at:
* build/reports/jdiff/changes.html
*
* @param OLD_VERSION required
* @param OLD_VERSION_ROOT required, typically pointing to a separate git clone dir
*/
task jdiff {
description = "Generates a JDiff report"
group = "Documentation"
def jdiffHome = "${rootProject.rootDir}/gradle/jdiff"
ant.taskdef(
name: "jdiff",
classname: "jdiff.JDiffAntTask",
classpath: "${jdiffHome}/antjdiff.jar")
def currentVersion = rootProject.version
def currentVersionRoot = rootProject.rootDir
def oldVersion = System.getProperty("OLD_VERSION")
def oldVersionRoot = System.getProperty("OLD_VERSION_ROOT")
def outputDir = "${rootProject.buildDir}/reports/jdiff/${oldVersion}_to_${currentVersion}"
doLast {
if (oldVersion == null)
throw new IllegalArgumentException(
"Set OLD_VERSION property to indicate older of the two versions being compared")
if (oldVersionRoot == null)
throw new IllegalArgumentException(
"Set OLD_VERSION_ROOT property to indicate the root directory for ${oldVersion}")
oldVersionRoot = new File(oldVersionRoot)
ant.property(name: "JDIFF_HOME", value: jdiffHome)
ant.mkdir(dir: outputDir)
ant.jdiff(
destdir: outputDir,
verbose: "off",
stats: "on",
docchanges: "off") {
old(name: "Spring Framework ${oldVersion}") {
oldVersionRoot.eachDirMatch( {
def candidate = new File(it)
candidate.name.matches("org.springframework.*") ||
candidate.name.matches("spring-.*") }) { match ->
match.eachDirRecurse { subdir ->
if (subdir.path ==~ '.*/src/main/java$') {
dirset(dir: subdir.path, includes: "org/**")
}
}
}
}
"new"(name: "Spring Framework ${currentVersion}") {
currentVersionRoot.eachDirMatch( {
def candidate = new File(it)
candidate.name.matches("org.springframework.*") ||
candidate.name.matches("spring-.*") }) { match ->
match.eachDirRecurse { subdir ->
if (subdir.path ==~ '.*/src/main/java$') {
dirset(dir: subdir.path, includes: "org/**")
}
}
}
}
}
}
}
+506
View File
@@ -0,0 +1,506 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+9
View File
@@ -0,0 +1,9 @@
/**
* This class is used only as a "null" argument for Javadoc when comparing
* two API files. Javadoc has to have a package, .java or .class file as an
* argument, even though JDiff doesn't use it.
*/
public class Null {
public Null() {
}
}
+6
View File
@@ -0,0 +1,6 @@
This distribution of JDiff 1.1.1 is included in the Spring Framework build
because JDiff has a hard requirement on a JDIFF_HOME directory containing
jdiff.jar and xerces.jar as well as other presentation resources.
The actual generation of JDiff reports is driven by the `jdiff` task declared
in build.gradle in the project root.
+59
View File
@@ -0,0 +1,59 @@
JDiff Doclet
------------
Matthew Doar
mdoar@pobox.com
The JDiff doclet is used to generate a report describing the
difference between two public Java APIs.
The file jdiff.html contains the reference page for JDiff. The latest
version of JDiff can be downloaded at:
https://sourceforge.net/projects/javadiff
To use the Ant task on your own project, see example.xml. More examples
of using JDiff to compare the public APIs of J2SE1.3 and J2SE1.4 can
be seen at http://www.jdiff.org
For an example with the source distribution, run "ant" and
look at the HTML output in ./build/reports/example/changes.html
The page at ./build/reports/example/changes/com.acme.sp.SPImpl.html
shows what a typical page of changes looks like.
System Requirements
-------------------
JDiff has been tested with all releases of Java since J2SE1.2 but
releases of JDiff after 1.10.0 focus on JDK1.5.
License
-------
JDiff is licensed under the Lesser GNU General Public License (LGPL).
See the file LICENSE.txt.
Acknowledgements
----------------
JDiff uses Stuart D. Gathman's Java translation of Gene Myers' O(ND)
difference algorithm.
JDiff uses Xerces 1.4.2 from https://www.apache.org.
JDiff also includes a script to use the classdoc application from
http://classdoc.sourceforge.net or http://www.jensgulden.de, by Jens
Gulden, (mail@jensgulden.de), to call a doclet such as jdiff on a .jar
file rather than on source.
Many thanks to the reviewers at Sun and Vitria who gave feedback on early
versions of JDiff output, and also to the distillers of Laphroaig, and to
Arturo Fuente for his consistently fine cigars which helped inspire
much of this work.
Footnote:
If you are looking for a generalized diff tool for XML, try diffmk from
https://wwws.sun.com/software/xml/developers/diffmk/
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.
-55
View File
@@ -1,55 +0,0 @@
apply plugin: "maven-publish"
apply plugin: 'com.jfrog.artifactory'
publishing {
publications {
mavenJava(MavenPublication) {
pom {
afterEvaluate {
name = project.description
description = project.description
}
url = "https://github.com/spring-projects/spring-framework"
organization {
name = "Spring IO"
url = "https://spring.io/projects/spring-framework"
}
licenses {
license {
name = "Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0"
distribution = "repo"
}
}
scm {
url = "https://github.com/spring-projects/spring-framework"
connection = "scm:git:git://github.com/spring-projects/spring-framework"
developerConnection = "scm:git:git://github.com/spring-projects/spring-framework"
}
developers {
developer {
id = "jhoeller"
name = "Juergen Hoeller"
email = "jhoeller@pivotal.io"
}
}
issueManagement {
system = "GitHub"
url = "https://github.com/spring-projects/spring-framework/issues"
}
}
versionMapping {
usage('java-api') {
fromResolutionResult()
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
artifactoryPublish {
publications(publishing.publications.mavenJava)
}
+55
View File
@@ -0,0 +1,55 @@
apply plugin: "propdeps-maven"
install {
repositories.mavenInstaller {
customizePom(pom, project)
}
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// eliminate test-scoped dependencies (no need in maven central poms)
generatedPom.dependencies.removeAll { dep ->
dep.scope == "test"
}
// sort to make pom dependencies order consistent to ease comparison of older poms
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
"$dep.scope:$dep.groupId:$dep.artifactId"
}
// add all items necessary for maven central publication
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
url = "https://github.com/spring-projects/spring-framework"
organization {
name = "Spring IO"
url = "https://projects.spring.io/spring-framework"
}
licenses {
license {
name "Apache License, Version 2.0"
url "https://www.apache.org/licenses/LICENSE-2.0"
distribution "repo"
}
}
scm {
url = "https://github.com/spring-projects/spring-framework"
connection = "scm:git:git://github.com/spring-projects/spring-framework"
developerConnection = "scm:git:git://github.com/spring-projects/spring-framework"
}
developers {
developer {
id = "jhoeller"
name = "Juergen Hoeller"
email = "jhoeller@pivotal.io"
}
}
issueManagement {
system = "Jira"
url = "https://jira.springsource.org/browse/SPR"
}
}
}
}
-58
View File
@@ -1,58 +0,0 @@
apply plugin: 'org.springframework.build.compile'
apply plugin: 'org.springframework.build.optional-dependencies'
apply plugin: 'org.springframework.build.test-sources'
apply from: "$rootDir/gradle/publications.gradle"
jar {
manifest.attributes["Implementation-Title"] = project.name
manifest.attributes["Implementation-Version"] = project.version
manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.') // for Jigsaw
manifest.attributes["Created-By"] =
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
from("${rootDir}/src/docs/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
javadoc {
description = "Generates project-level javadoc for use in -javadoc jar"
options.encoding = "UTF-8"
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
options.use = true
options.links(project.ext.javadocLinks)
options.addStringOption("Xdoclint:none", "-quiet")
// Suppress warnings due to cross-module @see and @link references.
// Note that global 'api' task does display all warnings.
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
}
task sourcesJar(type: Jar, dependsOn: classes) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveClassifier.set("sources")
from sourceSets.main.allSource
// Don't include or exclude anything explicitly by default. See SPR-12085.
}
task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
Binary file not shown.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+4 -19
View File
@@ -1,21 +1,5 @@
#!/usr/bin/env sh
#
# Copyright 2015 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.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -44,7 +28,8 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
GRADLE_OPTS="-XX:MaxMetaspaceSize=1024m -Xmx1024m $GRADLE_OPTS"
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -125,8 +110,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Vendored
+2 -17
View File
@@ -1,19 +1,3 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -30,7 +14,8 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
+117
View File
@@ -0,0 +1,117 @@
@echo off
set STS_TEST_VERSION='2.9.2.RELEASE'
set CURRENT_DIR=%~dp0
cd %CURRENT_DIR%
cls
echo.
echo -----------------------------------------------------------------------
echo Spring Framework Eclipse/STS project import guide
echo.
echo This script will guide you through the process of importing the
echo Spring Framework sources into Eclipse/STS. It is recommended that you
echo have a recent version of the SpringSource Tool Suite (this script has
echo been tested against STS %STS_TEST_VERSION%), but at the minimum you will
echo need Eclipse + AJDT.
echo.
echo If you need to download and install STS, please do that now by
echo visiting https://spring.io/tools/sts/all
echo.
echo Otherwise, press enter and we'll begin.
pause
REM this command:
REM - wipes out any existing Eclipse metadata
REM - generates OXM test classes to avoid errors on import into Eclipse
REM - generates metadata for all subprojects
REM - skips metadata gen for the root project (-x :eclipse) to work
REM around Eclipse's inability to import hierarchical project structures
REM SET COMMAND="./gradlew --no-daemon cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse"
SET COMMAND=gradlew --no-daemon cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse
echo.
echo -----------------------------------------------------------------------
echo STEP 1: Generate subproject Eclipse metadata
echo.
echo The first step will be to generate Eclipse project metadata for each
echo of the spring-* subprojects. This happens via the built-in
echo "Gradle wrapper" script (./gradlew in this directory). If this is your
echo first time using the Gradle wrapper, this step may take a few minutes
echo while a Gradle distribution is downloaded for you.
echo.
echo The command run will be:
echo.
echo %COMMAND%
echo.
echo Press enter when ready.
pause
call %COMMAND%
if not "%ERRORLEVEL%" == "0" exit /B %ERRORLEVEL%
echo.
echo -----------------------------------------------------------------------
echo STEP 2: Import subprojects into Eclipse/STS
echo.
echo Within Eclipse/STS, do the following:
echo.
echo File ^> Import... ^> Existing Projects into Workspace
echo ^> When prompted for the 'root directory', provide %CURRENT_DIR%
echo ^> Press enter. You will see the modules show up under "Projects"
echo ^> All projects should be selected/checked. Click Finish.
echo ^> When the project import is complete, you should have no errors.
echo.
echo When the above is complete, return here and press the enter key.
pause
set COMMAND=gradlew --no-daemon :eclipse
echo.
echo -----------------------------------------------------------------------
echo STEP 3: generate root project Eclipse metadata
echo.
echo Unfortunately, Eclipse does not allow for importing project
echo hierarchies, so we had to skip root project metadata generation in the
echo during step 1. In this step we simply generate root project metadata
echo so you can import it in the next step.
echo.
echo The command run will be:
echo.
echo %COMMAND%
echo.
echo Press the enter key when ready.
pause
call %COMMAND%
if not "%ERRORLEVEL%" == "0" exit /B %ERRORLEVEL%
echo.
echo -----------------------------------------------------------------------
echo STEP 4: Import root project into Eclipse/STS
echo.
echo Follow the project import steps listed in step 2 above to import the
echo root project.
echo.
echo Press enter when complete, and move on to the final step.
pause
echo.
echo -----------------------------------------------------------------------
echo STEP 5: Enable Git support for all projects
echo.
echo - In the Eclipse/STS Package Explorer, select all spring* projects.
echo - Right-click to open the context menu and select Team ^> Share Project...
echo - In the Share Project dialog that appears, select Git and press Next
echo - Check "Use or create repository in parent folder of project"
echo - Click Finish
echo.
echo When complete, you'll have Git support enabled for all projects.
echo.
echo You're ready to code! Goodbye!
-49
View File
@@ -1,49 +0,0 @@
# Spring Framework - Eclipse/STS Project Import Guide
This document will guide you through the process of importing the Spring Framework
projects into Eclipse or the Spring Tool Suite (STS). It is recommended that you have a
recent version of Eclipse or STS. As a bare minimum you will need Eclipse with full Java
8 support, the AspectJ Development Tools (AJDT), and the Groovy Compiler.
The following instructions have been tested against
[Spring Tool Suite](https://spring.io/tools) (_STS_) 3.9.4 and 4.0.0.M11 with
[Eclipse Buildship](https://projects.eclipse.org/projects/tools.buildship) (Eclipse
Plug-ins for Gradle). The instructions should work with the latest Eclipse distribution
as long as you install
[Buildship](https://marketplace.eclipse.org/content/buildship-gradle-integration). Note
that STS 4 comes with Buildship preinstalled.
## Steps
_Within your locally cloned `spring-framework` working directory:_
1. Precompile `spring-oxm` with `./gradlew :spring-oxm:compileTestJava`
2. Import into Eclipse (File -> Import -> Gradle -> Existing Gradle Project -> Navigate
to directory -> Select Finish)
3. If prompted, exclude the `spring-aspects` module (or after the import by closing or
deleting the project)
4. In the `spring-oxm` project, add the `jaxb` folder in
`build/generated-sources` to the build path (right click on them and select
`Build Path -> Use as Source Folder`)
5. To apply project specific settings run `./gradlew eclipseBuildship`
7. Code away
## Known Issues
1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
- See `*RepackJar` tasks in the build.
2. `spring-aspects` does not compile due to references to aspect types unknown to Eclipse.
- If you install [AJDT](https://www.eclipse.org/ajdt/downloads/) into Eclipse it should
work.
3. While JUnit tests pass from the command line with Gradle, some may fail when run from
the IDE.
- Resolving this is a work in progress.
- If attempting to run all JUnit tests from within the IDE, you will likely need to set
the following VM options to avoid out of memory errors:
`-XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m`
## Tips
In any case, please do not check in your own generated `.classpath` file, `.project`
file, or `.settings` folder. You'll notice these files are already intentionally in
`.gitignore`. The same policy holds for IDEA metadata.
+135
View File
@@ -0,0 +1,135 @@
cd `dirname $0`
clear
cat <<EOM
------------------------------------------------------------------------
Spring Framework - Eclipse/STS Project Import Guide
This script will guide you through the process of importing the Spring
Framework projects into Eclipse or the Spring Tool Suite (STS). It is
recommended that you have a recent version of Eclipse or STS. As a bare
minimum you will need Eclipse with full Java 8 support, the AspectJ
Development Tools (AJDT), and the Groovy Compiler.
This script has been tested against:
- STS: 3.6.3.RELEASE (Eclipse Luna SR1 4.4.1)
- AJDT: 2.2.4.e44x-20141118-0700 (Luna 4.4)
If you need to download and install Eclipse or STS, please do that now
by visiting one of the following sites:
- Eclipse downloads: https://download.eclipse.org/eclipse/downloads
- STS downloads: https://spring.io/tools/sts/all
- STS nightly builds: https://dist.springsource.com/snapshot/STS/nightly-distributions.html
If you need to install a recent CI build for AJDT (i.e., so that the
spring-aspects module properly compiles in Eclipse/STS), click on the
"Artifacts" tab of a successful CI build and copy the link to the
"update site" which you can then use to install or update AJDT within
Eclipse/STS.
- AJDT CI builds: https://build.spring.io/browse/AJDT-AE44
Once Eclipse/STS is installed, press enter, and we'll begin.
EOM
read
# this command:
# - wipes out any existing Eclipse metadata
# - generates OXM test classes to avoid errors on import into Eclipse
# - generates metadata for all subprojects
# - skips metadata gen for the root project (-x :eclipse) to work
# around Eclipse's inability to import hierarchical project structures
COMMAND="./gradlew --no-daemon cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse"
cat <<EOM
------------------------------------------------------------------------
STEP 1: Generate subproject Eclipse metadata
The first step will be to generate Eclipse project metadata for each of
the spring-* subprojects. This happens via the built-in "Gradle wrapper"
script (./gradlew in this directory). If this is your first time using
the Gradle wrapper, this step may take a few minutes while a Gradle
distribution is downloaded for you.
The command run will be:
$COMMAND
Press enter when ready.
EOM
read
$COMMAND || exit
cat <<EOM
------------------------------------------------------------------------
STEP 2: Import subprojects into Eclipse/STS
Within Eclipse/STS, do the following:
- File > Import... > Existing Projects into Workspace
- When prompted for the 'root directory', provide $PWD.
- Press enter. You will see the modules show up under "Projects".
- All projects should be selected/checked. Click Finish.
- When the project import is complete, you should have no errors.
When the above is complete, return here and press the enter key.
EOM
read
COMMAND="./gradlew --no-daemon :eclipse"
cat <<EOM
------------------------------------------------------------------------
STEP 3: Generate root project Eclipse metadata
Unfortunately, Eclipse does not support importing project hierarchies,
so we had to skip root project metadata generation during step 1. In
this step we simply generate root project metadata so that you can
import it in the next step.
The command run will be:
$COMMAND
Press the enter key when ready.
EOM
read
$COMMAND || exit
cat <<EOM
------------------------------------------------------------------------
STEP 4: Import root project into Eclipse/STS
Follow the project import steps listed in step 2 above to import the
root "spring" project.
Press enter when complete, and move on to the final step.
EOM
read
cat <<EOM
------------------------------------------------------------------------
STEP 5: Enable Git support for all projects
- In the Eclipse/STS Package Explorer, select all spring* projects.
- Right-click to open the context menu and select Team > Share Project...
- In the Share Project dialog that appears, select Git and press Next.
- Check "Use or create repository in parent folder of project".
- Click Finish.
When complete, you'll have Git support enabled for all projects.
You're ready to code! Goodbye!
EOM
+14 -17
View File
@@ -1,28 +1,25 @@
The following has been tested against IntelliJ IDEA 2016.2.2
The following has been tested against Intellij IDEA 13.1
## Steps
_Within your locally cloned spring-framework working directory:_
1. Precompile `spring-oxm` with `./gradlew :spring-oxm:compileTestJava`
2. Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
3. When prompted exclude the `spring-aspects` module (or after the import via File-> Project Structure -> Modules)
4. Code away
1. Pre-compile `spring-oxm` with `./gradlew cleanIdea :spring-oxm:compileTestJava`
2. Import into IDEA (File->import project->import from external model->Gradle)
3. Set the Project JDK as appropriate (1.8+)
4. Exclude the `spring-aspects` module (Go to File->Project Structure->Modules)
5. Code away
## Known issues
1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
See `*RepackJar` tasks in the build and https://youtrack.jetbrains.com/issue/IDEA-160605).
2. `spring-aspects` does not compile due to references to aspect types unknown to
IntelliJ IDEA. See https://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the
'spring-aspects' can be excluded from the project to avoid compilation errors.
3. While JUnit tests pass from the command line with Gradle, some may fail when run from
IntelliJ IDEA. Resolving this is a work in progress. If attempting to run all JUnit tests from within
IntelliJ IDEA, you will likely need to set the following VM options to avoid out of memory errors:
1. `spring-oxm` should be pre-compiled since it's using repackaged dependencies (see *RepackJar tasks)
2. `spring-aspects` does not compile out of the box due to references to aspect types unknown to IDEA.
See https://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the 'spring-aspects'
should be excluded from the overall project to avoid compilation errors.
3. While all JUnit tests pass from the command line with Gradle, many will fail when run from IDEA.
Resolving this is a work in progress. If attempting to run all JUnit tests from within IDEA, you will
likely need to set the following VM options to avoid out of memory errors:
-XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m
4. If you invoke "Rebuild Project" in the IDE, you'll have to generate some test
resources of the `spring-oxm` module again (`./gradlew :spring-oxm:compileTestJava`)
## Tips
@@ -31,6 +28,6 @@ You'll notice these files are already intentionally in .gitignore. The same poli
## FAQ
Q. What about IntelliJ IDEA's own [Gradle support](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)?
Q. What about IDEA's own [Gradle support](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)?
A. Keep an eye on https://youtrack.jetbrains.com/issue/IDEA-53476
@@ -1,22 +0,0 @@
description = "Spring Integration Tests"
apply plugin: "org.springframework.build.test-sources"
dependencies {
testCompile(project(":spring-aop"))
testCompile(project(":spring-beans"))
testCompile(project(":spring-context"))
testCompile(project(":spring-core"))
testCompile(project(":spring-expression"))
testCompile(project(":spring-jdbc"))
testCompile(project(":spring-orm"))
testCompile(project(":spring-test"))
testCompile(project(":spring-tx"))
testCompile(project(":spring-web"))
testCompile("javax.inject:javax.inject")
testCompile("javax.resource:javax.resource-api")
testCompile("javax.servlet:javax.servlet-api")
testCompile("org.aspectj:aspectjweaver")
testCompile("org.hsqldb:hsqldb")
testCompile("org.hibernate:hibernate-core")
}
@@ -1,137 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.config;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for scoped proxy use in conjunction with aop: namespace.
* Deemed an integration test because .web mocks and application contexts are required.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Chris Beams
* @see org.springframework.aop.config.AopNamespaceHandlerTests
*/
@SpringJUnitWebConfig
class AopNamespaceHandlerScopeIntegrationTests {
@Autowired
ITestBean singletonScoped;
@Autowired
ITestBean requestScoped;
@Autowired
ITestBean sessionScoped;
@Autowired
ITestBean sessionScopedAlias;
@Autowired
ITestBean testBean;
@Test
void testSingletonScoping() throws Exception {
assertThat(AopUtils.isAopProxy(singletonScoped)).as("Should be AOP proxy").isTrue();
boolean condition = singletonScoped instanceof TestBean;
assertThat(condition).as("Should be target class proxy").isTrue();
String rob = "Rob Harrop";
String bram = "Bram Smeets";
assertThat(singletonScoped.getName()).isEqualTo(rob);
singletonScoped.setName(bram);
assertThat(singletonScoped.getName()).isEqualTo(bram);
ITestBean deserialized = (ITestBean) SerializationTestUtils.serializeAndDeserialize(singletonScoped);
assertThat(deserialized.getName()).isEqualTo(bram);
}
@Test
void testRequestScoping() throws Exception {
MockHttpServletRequest oldRequest = new MockHttpServletRequest();
MockHttpServletRequest newRequest = new MockHttpServletRequest();
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(oldRequest));
assertThat(AopUtils.isAopProxy(requestScoped)).as("Should be AOP proxy").isTrue();
boolean condition = requestScoped instanceof TestBean;
assertThat(condition).as("Should be target class proxy").isTrue();
assertThat(AopUtils.isAopProxy(testBean)).as("Should be AOP proxy").isTrue();
boolean condition1 = testBean instanceof TestBean;
assertThat(condition1).as("Regular bean should be JDK proxy").isFalse();
String rob = "Rob Harrop";
String bram = "Bram Smeets";
assertThat(requestScoped.getName()).isEqualTo(rob);
requestScoped.setName(bram);
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(newRequest));
assertThat(requestScoped.getName()).isEqualTo(rob);
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(oldRequest));
assertThat(requestScoped.getName()).isEqualTo(bram);
assertThat(((Advised) requestScoped).getAdvisors().length > 0).as("Should have advisors").isTrue();
}
@Test
void testSessionScoping() throws Exception {
MockHttpSession oldSession = new MockHttpSession();
MockHttpSession newSession = new MockHttpSession();
MockHttpServletRequest request = new MockHttpServletRequest();
request.setSession(oldSession);
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
assertThat(AopUtils.isAopProxy(sessionScoped)).as("Should be AOP proxy").isTrue();
boolean condition1 = sessionScoped instanceof TestBean;
assertThat(condition1).as("Should not be target class proxy").isFalse();
assertThat(sessionScopedAlias).isSameAs(sessionScoped);
assertThat(AopUtils.isAopProxy(testBean)).as("Should be AOP proxy").isTrue();
boolean condition = testBean instanceof TestBean;
assertThat(condition).as("Regular bean should be JDK proxy").isFalse();
String rob = "Rob Harrop";
String bram = "Bram Smeets";
assertThat(sessionScoped.getName()).isEqualTo(rob);
sessionScoped.setName(bram);
request.setSession(newSession);
assertThat(sessionScoped.getName()).isEqualTo(rob);
request.setSession(oldSession);
assertThat(sessionScoped.getName()).isEqualTo(bram);
assertThat(((Advised) sessionScoped).getAdvisors().length > 0).as("Should have advisors").isTrue();
}
}
@@ -1,318 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.framework.autoproxy;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.List;
import javax.servlet.ServletException;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.lang.Nullable;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import org.springframework.transaction.NoTransactionException;
import org.springframework.transaction.interceptor.TransactionInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for auto proxy creation by advisor recognition working in
* conjunction with transaction management resources.
*
* @see org.springframework.aop.framework.autoproxy.AdvisorAutoProxyCreatorTests
*
* @author Rod Johnson
* @author Chris Beams
*/
class AdvisorAutoProxyCreatorIntegrationTests {
private static final Class<?> CLASS = AdvisorAutoProxyCreatorIntegrationTests.class;
private static final String CLASSNAME = CLASS.getSimpleName();
private static final String DEFAULT_CONTEXT = CLASSNAME + "-context.xml";
private static final String ADVISOR_APC_BEAN_NAME = "aapc";
private static final String TXMANAGER_BEAN_NAME = "txManager";
/**
* Return a bean factory with attributes and EnterpriseServices configured.
*/
protected BeanFactory getBeanFactory() throws IOException {
return new ClassPathXmlApplicationContext(DEFAULT_CONTEXT, CLASS);
}
@Test
void testDefaultExclusionPrefix() throws Exception {
DefaultAdvisorAutoProxyCreator aapc = (DefaultAdvisorAutoProxyCreator) getBeanFactory().getBean(ADVISOR_APC_BEAN_NAME);
assertThat(aapc.getAdvisorBeanNamePrefix()).isEqualTo((ADVISOR_APC_BEAN_NAME + DefaultAdvisorAutoProxyCreator.SEPARATOR));
assertThat(aapc.isUsePrefix()).isFalse();
}
/**
* If no pointcuts match (no attrs) there should be proxying.
*/
@Test
void testNoProxy() throws Exception {
BeanFactory bf = getBeanFactory();
Object o = bf.getBean("noSetters");
assertThat(AopUtils.isAopProxy(o)).isFalse();
}
@Test
void testTxIsProxied() throws Exception {
BeanFactory bf = getBeanFactory();
ITestBean test = (ITestBean) bf.getBean("test");
assertThat(AopUtils.isAopProxy(test)).isTrue();
}
@Test
void testRegexpApplied() throws Exception {
BeanFactory bf = getBeanFactory();
ITestBean test = (ITestBean) bf.getBean("test");
MethodCounter counter = (MethodCounter) bf.getBean("countingAdvice");
assertThat(counter.getCalls()).isEqualTo(0);
test.getName();
assertThat(counter.getCalls()).isEqualTo(1);
}
@Test
void testTransactionAttributeOnMethod() throws Exception {
BeanFactory bf = getBeanFactory();
ITestBean test = (ITestBean) bf.getBean("test");
CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
OrderedTxCheckAdvisor txc = (OrderedTxCheckAdvisor) bf.getBean("orderedBeforeTransaction");
assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
assertThat(txMan.commits).isEqualTo(0);
assertThat(test.getAge()).as("Initial value was correct").isEqualTo(4);
int newAge = 5;
test.setAge(newAge);
assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(1);
assertThat(test.getAge()).as("New value set correctly").isEqualTo(newAge);
assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
}
/**
* Should not roll back on servlet exception.
*/
@Test
void testRollbackRulesOnMethodCauseRollback() throws Exception {
BeanFactory bf = getBeanFactory();
Rollback rb = (Rollback) bf.getBean("rollback");
CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
OrderedTxCheckAdvisor txc = (OrderedTxCheckAdvisor) bf.getBean("orderedBeforeTransaction");
assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
assertThat(txMan.commits).isEqualTo(0);
rb.echoException(null);
// Fires only on setters
assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
assertThat(txMan.rollbacks).isEqualTo(0);
Exception ex = new Exception();
try {
rb.echoException(ex);
}
catch (Exception actual) {
assertThat(actual).isEqualTo(ex);
}
assertThat(txMan.rollbacks).as("Transaction counts match").isEqualTo(1);
}
@Test
void testRollbackRulesOnMethodPreventRollback() throws Exception {
BeanFactory bf = getBeanFactory();
Rollback rb = (Rollback) bf.getBean("rollback");
CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
assertThat(txMan.commits).isEqualTo(0);
// Should NOT roll back on ServletException
try {
rb.echoException(new ServletException());
}
catch (ServletException ex) {
}
assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
}
@Test
void testProgrammaticRollback() throws Exception {
BeanFactory bf = getBeanFactory();
Object bean = bf.getBean(TXMANAGER_BEAN_NAME);
boolean condition = bean instanceof CallCountingTransactionManager;
assertThat(condition).isTrue();
CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
Rollback rb = (Rollback) bf.getBean("rollback");
assertThat(txMan.commits).isEqualTo(0);
rb.rollbackOnly(false);
assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
assertThat(txMan.rollbacks).isEqualTo(0);
// Will cause rollback only
rb.rollbackOnly(true);
assertThat(txMan.rollbacks).isEqualTo(1);
}
}
@SuppressWarnings("serial")
class NeverMatchAdvisor extends StaticMethodMatcherPointcutAdvisor {
public NeverMatchAdvisor() {
super(new NopInterceptor());
}
/**
* This method is solely to allow us to create a mixture of dependencies in
* the bean definitions. The dependencies don't have any meaning, and don't
* <b>do</b> anything.
*/
public void setDependencies(List<?> l) {
}
/**
* @see org.springframework.aop.MethodMatcher#matches(java.lang.reflect.Method, java.lang.Class)
*/
@Override
public boolean matches(Method m, @Nullable Class<?> targetClass) {
return false;
}
}
class NoSetters {
public void A() {
}
public int getB() {
return -1;
}
}
@SuppressWarnings("serial")
class OrderedTxCheckAdvisor extends StaticMethodMatcherPointcutAdvisor implements InitializingBean {
/**
* Should we insist on the presence of a transaction attribute or refuse to accept one?
*/
private boolean requireTransactionContext = false;
public void setRequireTransactionContext(boolean requireTransactionContext) {
this.requireTransactionContext = requireTransactionContext;
}
public boolean isRequireTransactionContext() {
return requireTransactionContext;
}
public CountingBeforeAdvice getCountingBeforeAdvice() {
return (CountingBeforeAdvice) getAdvice();
}
@Override
public void afterPropertiesSet() throws Exception {
setAdvice(new TxCountingBeforeAdvice());
}
@Override
public boolean matches(Method method, @Nullable Class<?> targetClass) {
return method.getName().startsWith("setAge");
}
private class TxCountingBeforeAdvice extends CountingBeforeAdvice {
@Override
public void before(Method method, Object[] args, Object target) throws Throwable {
// do transaction checks
if (requireTransactionContext) {
TransactionInterceptor.currentTransactionStatus();
}
else {
try {
TransactionInterceptor.currentTransactionStatus();
throw new RuntimeException("Shouldn't have a transaction");
}
catch (NoTransactionException ex) {
// this is Ok
}
}
super.before(method, args, target);
}
}
}
class Rollback {
/**
* Inherits transaction attribute.
* Illustrates programmatic rollback.
*/
public void rollbackOnly(boolean rollbackOnly) {
if (rollbackOnly) {
setRollbackOnly();
}
}
/**
* Extracted in a protected method to facilitate testing
*/
protected void setRollbackOnly() {
TransactionInterceptor.currentTransactionStatus().setRollbackOnly();
}
/**
* @org.springframework.transaction.interceptor.RuleBasedTransaction ( timeout=-1 )
* @org.springframework.transaction.interceptor.RollbackRule ( "java.lang.Exception" )
* @org.springframework.transaction.interceptor.NoRollbackRule ( "ServletException" )
*/
public void echoException(Exception ex) throws Exception {
if (ex != null) {
throw ex;
}
}
}
@@ -1,81 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.xml;
import java.util.List;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.io.ClassPathResource;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Costin Leau
*/
@TestInstance(Lifecycle.PER_CLASS)
class ComponentBeanDefinitionParserTests {
private final DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
@BeforeAll
void setUp() throws Exception {
new XmlBeanDefinitionReader(bf).loadBeanDefinitions(
new ClassPathResource("component-config.xml", ComponentBeanDefinitionParserTests.class));
}
@AfterAll
void tearDown() {
bf.destroySingletons();
}
@Test
void testBionicBasic() {
Component cp = getBionicFamily();
assertThat("Bionic-1").isEqualTo(cp.getName());
}
@Test
void testBionicFirstLevelChildren() {
Component cp = getBionicFamily();
List<Component> components = cp.getComponents();
assertThat(2).isEqualTo(components.size());
assertThat("Mother-1").isEqualTo(components.get(0).getName());
assertThat("Rock-1").isEqualTo(components.get(1).getName());
}
@Test
void testBionicSecondLevelChildren() {
Component cp = getBionicFamily();
List<Component> components = cp.getComponents().get(0).getComponents();
assertThat(2).isEqualTo(components.size());
assertThat("Karate-1").isEqualTo(components.get(0).getName());
assertThat("Sport-1").isEqualTo(components.get(1).getName());
}
private Component getBionicFamily() {
return bf.getBean("bionic-family", Component.class);
}
}
@@ -1,25 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.xml;
public class ComponentNamespaceHandler extends NamespaceHandlerSupport {
@Override
public void init() {
registerBeanDefinitionParser("component", new ComponentBeanDefinitionParser());
}
}
@@ -1,405 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.context.annotation.jsr330;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.inject.Named;
import javax.inject.Singleton;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.context.annotation.ScopeMetadata;
import org.springframework.context.annotation.ScopeMetadataResolver;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.support.GenericWebApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Mark Fisher
* @author Juergen Hoeller
* @author Chris Beams
*/
class ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests {
private static final String DEFAULT_NAME = "default";
private static final String MODIFIED_NAME = "modified";
private ServletRequestAttributes oldRequestAttributes;
private ServletRequestAttributes newRequestAttributes;
private ServletRequestAttributes oldRequestAttributesWithSession;
private ServletRequestAttributes newRequestAttributesWithSession;
@BeforeEach
void setup() {
this.oldRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
this.newRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
MockHttpServletRequest oldRequestWithSession = new MockHttpServletRequest();
oldRequestWithSession.setSession(new MockHttpSession());
this.oldRequestAttributesWithSession = new ServletRequestAttributes(oldRequestWithSession);
MockHttpServletRequest newRequestWithSession = new MockHttpServletRequest();
newRequestWithSession.setSession(new MockHttpSession());
this.newRequestAttributesWithSession = new ServletRequestAttributes(newRequestWithSession);
}
@AfterEach
void reset() {
RequestContextHolder.setRequestAttributes(null);
}
@Test
void testPrototype() {
ApplicationContext context = createContext(ScopedProxyMode.NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("prototype");
assertThat(bean).isNotNull();
assertThat(context.isPrototype("prototype")).isTrue();
assertThat(context.isSingleton("prototype")).isFalse();
}
@Test
void testSingletonScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
assertThat(context.isSingleton("singleton")).isTrue();
assertThat(context.isPrototype("singleton")).isFalse();
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testSingletonScopeIgnoresProxyInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testSingletonScopeIgnoresProxyTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testRequestScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("request");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// but a newly retrieved bean should have the default name
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("request");
assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
}
@Test
void testRequestScopeWithProxiedInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
// should be dynamic proxy, implementing both interfaces
assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
boolean condition = bean instanceof AnotherScopeTestInterface;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testRequestScopeWithProxiedTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
// should be a class-based proxy
assertThat(AopUtils.isCglibProxy(bean)).isTrue();
boolean condition = bean instanceof RequestScopedTestBean;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testSessionScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(ScopedProxyMode.NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("session");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// but a newly retrieved bean should have the default name
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
}
@Test
void testSessionScopeWithProxiedInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
// should be dynamic proxy, implementing both interfaces
assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
boolean condition = bean instanceof AnotherScopeTestInterface;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
bean2.setName(DEFAULT_NAME);
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void testSessionScopeWithProxiedTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
// should be a class-based proxy
assertThat(AopUtils.isCglibProxy(bean)).isTrue();
boolean condition1 = bean instanceof ScopedTestBean;
assertThat(condition1).isTrue();
boolean condition = bean instanceof SessionScopedTestBean;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
bean2.setName(DEFAULT_NAME);
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
private ApplicationContext createContext(final ScopedProxyMode scopedProxyMode) {
GenericWebApplicationContext context = new GenericWebApplicationContext();
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(context);
scanner.setIncludeAnnotationConfig(false);
scanner.setScopeMetadataResolver(new ScopeMetadataResolver() {
@Override
public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) {
ScopeMetadata metadata = new ScopeMetadata();
if (definition instanceof AnnotatedBeanDefinition) {
AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition;
for (String type : annDef.getMetadata().getAnnotationTypes()) {
if (type.equals(javax.inject.Singleton.class.getName())) {
metadata.setScopeName(BeanDefinition.SCOPE_SINGLETON);
break;
}
else if (annDef.getMetadata().getMetaAnnotationTypes(type).contains(javax.inject.Scope.class.getName())) {
metadata.setScopeName(type.substring(type.length() - 13, type.length() - 6).toLowerCase());
metadata.setScopedProxyMode(scopedProxyMode);
break;
}
else if (type.startsWith("javax.inject")) {
metadata.setScopeName(BeanDefinition.SCOPE_PROTOTYPE);
}
}
}
return metadata;
}
});
// Scan twice in order to find errors in the bean definition compatibility check.
scanner.scan(getClass().getPackage().getName());
scanner.scan(getClass().getPackage().getName());
context.registerAlias("classPathBeanDefinitionScannerJsr330ScopeIntegrationTests.SessionScopedTestBean", "session");
context.refresh();
return context;
}
public interface IScopedTestBean {
String getName();
void setName(String name);
}
public static abstract class ScopedTestBean implements IScopedTestBean {
private String name = DEFAULT_NAME;
@Override
public String getName() { return this.name; }
@Override
public void setName(String name) { this.name = name; }
}
@Named("prototype")
public static class PrototypeScopedTestBean extends ScopedTestBean {
}
@Named("singleton")
@Singleton
public static class SingletonScopedTestBean extends ScopedTestBean {
}
public interface AnotherScopeTestInterface {
}
@Named("request")
@RequestScoped
public static class RequestScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
}
@Named
@SessionScoped
public static class SessionScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
}
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@javax.inject.Scope
public @interface RequestScoped {
}
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@javax.inject.Scope
public @interface SessionScoped {
}
}
@@ -1,341 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.context.annotation.scope;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.stereotype.Component;
import org.springframework.web.context.annotation.RequestScope;
import org.springframework.web.context.annotation.SessionScope;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.support.GenericWebApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.context.annotation.ScopedProxyMode.DEFAULT;
import static org.springframework.context.annotation.ScopedProxyMode.INTERFACES;
import static org.springframework.context.annotation.ScopedProxyMode.NO;
import static org.springframework.context.annotation.ScopedProxyMode.TARGET_CLASS;
/**
* @author Mark Fisher
* @author Juergen Hoeller
* @author Chris Beams
* @author Sam Brannen
*/
class ClassPathBeanDefinitionScannerScopeIntegrationTests {
private static final String DEFAULT_NAME = "default";
private static final String MODIFIED_NAME = "modified";
private ServletRequestAttributes oldRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
private ServletRequestAttributes newRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
private ServletRequestAttributes oldRequestAttributesWithSession;
private ServletRequestAttributes newRequestAttributesWithSession;
@BeforeEach
void setup() {
MockHttpServletRequest oldRequestWithSession = new MockHttpServletRequest();
oldRequestWithSession.setSession(new MockHttpSession());
this.oldRequestAttributesWithSession = new ServletRequestAttributes(oldRequestWithSession);
MockHttpServletRequest newRequestWithSession = new MockHttpServletRequest();
newRequestWithSession.setSession(new MockHttpSession());
this.newRequestAttributesWithSession = new ServletRequestAttributes(newRequestWithSession);
}
@AfterEach
void reset() {
RequestContextHolder.resetRequestAttributes();
}
@Test
void singletonScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void singletonScopeIgnoresProxyInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(INTERFACES);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void singletonScopeIgnoresProxyTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(TARGET_CLASS);
ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// singleton bean, so name should be modified even after lookup
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void requestScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("request");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// but a newly retrieved bean should have the default name
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("request");
assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
}
@Test
void requestScopeWithProxiedInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(INTERFACES);
IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
// should be dynamic proxy, implementing both interfaces
assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
boolean condition = bean instanceof AnotherScopeTestInterface;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void requestScopeWithProxiedTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
ApplicationContext context = createContext(TARGET_CLASS);
IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
// should be a class-based proxy
assertThat(AopUtils.isCglibProxy(bean)).isTrue();
boolean condition = bean instanceof RequestScopedTestBean;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributes);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributes);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void sessionScopeWithNoProxy() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(NO);
ScopedTestBean bean = (ScopedTestBean) context.getBean("session");
// should not be a proxy
assertThat(AopUtils.isAopProxy(bean)).isFalse();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// not a proxy so this should not have changed
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
// but a newly retrieved bean should have the default name
ScopedTestBean bean2 = (ScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
}
@Test
void sessionScopeWithProxiedInterfaces() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(INTERFACES);
IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
// should be dynamic proxy, implementing both interfaces
assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
boolean condition = bean instanceof AnotherScopeTestInterface;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
bean2.setName(DEFAULT_NAME);
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
@Test
void sessionScopeWithProxiedTargetClass() {
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
ApplicationContext context = createContext(TARGET_CLASS);
IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
// should be a class-based proxy
assertThat(AopUtils.isCglibProxy(bean)).isTrue();
boolean condition1 = bean instanceof ScopedTestBean;
assertThat(condition1).isTrue();
boolean condition = bean instanceof SessionScopedTestBean;
assertThat(condition).isTrue();
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
bean.setName(MODIFIED_NAME);
IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
bean2.setName(DEFAULT_NAME);
assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
}
private ApplicationContext createContext(ScopedProxyMode scopedProxyMode) {
GenericWebApplicationContext context = new GenericWebApplicationContext();
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(context);
scanner.setIncludeAnnotationConfig(false);
scanner.setBeanNameGenerator((definition, registry) -> definition.getScope());
scanner.setScopedProxyMode(scopedProxyMode);
// Scan twice in order to find errors in the bean definition compatibility check.
scanner.scan(getClass().getPackage().getName());
scanner.scan(getClass().getPackage().getName());
context.refresh();
return context;
}
interface IScopedTestBean {
String getName();
void setName(String name);
}
static abstract class ScopedTestBean implements IScopedTestBean {
private String name = DEFAULT_NAME;
@Override
public String getName() { return this.name; }
@Override
public void setName(String name) { this.name = name; }
}
@Component
static class SingletonScopedTestBean extends ScopedTestBean {
}
interface AnotherScopeTestInterface {
}
@Component
@RequestScope(proxyMode = DEFAULT)
static class RequestScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
}
@Component
@SessionScope(proxyMode = DEFAULT)
static class SessionScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
}
}
@@ -1,710 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env;
import java.io.File;
import java.io.IOException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Profile;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.jca.context.ResourceAdapterApplicationContext;
import org.springframework.jca.support.SimpleBootstrapContext;
import org.springframework.jca.work.SimpleTaskWorkManager;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.mock.env.MockPropertySource;
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AbstractRefreshableWebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.context.support.GenericWebApplicationContext;
import org.springframework.web.context.support.StandardServletEnvironment;
import org.springframework.web.context.support.StaticWebApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
import static org.springframework.context.ConfigurableApplicationContext.ENVIRONMENT_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_ENV_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.ENVIRONMENT_AWARE_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.TRANSITIVE_BEAN_NAME;
import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.XML_PATH;
/**
* System integration tests for container support of the {@link Environment} API.
*
* <p>
* Tests all existing BeanFactory and ApplicationContext implementations to ensure that:
* <ul>
* <li>a standard environment object is always present
* <li>a custom environment object can be set and retrieved against the factory/context
* <li>the {@link EnvironmentAware} interface is respected
* <li>the environment object is registered with the container as a singleton bean (if an
* ApplicationContext)
* <li>bean definition files (if any, and whether XML or @Configuration) are registered
* conditionally based on environment metadata
* </ul>
*
* @author Chris Beams
* @author Sam Brannen
* @see org.springframework.context.support.EnvironmentIntegrationTests
*/
@SuppressWarnings("resource")
public class EnvironmentSystemIntegrationTests {
private final ConfigurableEnvironment prodEnv = new StandardEnvironment();
private final ConfigurableEnvironment devEnv = new StandardEnvironment();
private final ConfigurableEnvironment prodWebEnv = new StandardServletEnvironment();
@BeforeEach
void setUp() {
prodEnv.setActiveProfiles(PROD_ENV_NAME);
devEnv.setActiveProfiles(DEV_ENV_NAME);
prodWebEnv.setActiveProfiles(PROD_ENV_NAME);
}
@Test
void genericApplicationContext_standardEnv() {
ConfigurableApplicationContext ctx = new GenericApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
ctx.refresh();
assertHasStandardEnvironment(ctx);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
}
@Test
void genericApplicationContext_customEnv() {
GenericApplicationContext ctx = new GenericApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
ctx.setEnvironment(prodEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodEnv);
}
@Test
void xmlBeanDefinitionReader_inheritsEnvironmentFromEnvironmentCapableBDR() {
GenericApplicationContext ctx = new GenericApplicationContext();
ctx.setEnvironment(prodEnv);
new XmlBeanDefinitionReader(ctx).loadBeanDefinitions(XML_PATH);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void annotatedBeanDefinitionReader_inheritsEnvironmentFromEnvironmentCapableBDR() {
GenericApplicationContext ctx = new GenericApplicationContext();
ctx.setEnvironment(prodEnv);
new AnnotatedBeanDefinitionReader(ctx).register(Config.class);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void classPathBeanDefinitionScanner_inheritsEnvironmentFromEnvironmentCapableBDR_scanProfileAnnotatedConfigClasses() {
// it's actually ConfigurationClassPostProcessor's Environment that gets the job done here.
GenericApplicationContext ctx = new GenericApplicationContext();
ctx.setEnvironment(prodEnv);
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
scanner.scan("org.springframework.core.env.scan1");
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void classPathBeanDefinitionScanner_inheritsEnvironmentFromEnvironmentCapableBDR_scanProfileAnnotatedComponents() {
GenericApplicationContext ctx = new GenericApplicationContext();
ctx.setEnvironment(prodEnv);
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
scanner.scan("org.springframework.core.env.scan2");
ctx.refresh();
assertThat(scanner.getEnvironment()).isEqualTo(ctx.getEnvironment());
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void genericXmlApplicationContext() {
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(prodEnv);
ctx.load(XML_PATH);
ctx.refresh();
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodEnv);
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void classPathXmlApplicationContext() {
ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(XML_PATH);
ctx.setEnvironment(prodEnv);
ctx.refresh();
assertEnvironmentBeanRegistered(ctx);
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void fileSystemXmlApplicationContext() throws IOException {
ClassPathResource xml = new ClassPathResource(XML_PATH);
File tmpFile = File.createTempFile("test", "xml");
FileCopyUtils.copy(xml.getFile(), tmpFile);
// strange - FSXAC strips leading '/' unless prefixed with 'file:'
ConfigurableApplicationContext ctx =
new FileSystemXmlApplicationContext(new String[] {"file:" + tmpFile.getPath()}, false);
ctx.setEnvironment(prodEnv);
ctx.refresh();
assertEnvironmentBeanRegistered(ctx);
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void annotationConfigApplicationContext_withPojos() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(prodEnv);
ctx.register(EnvironmentAwareBean.class);
ctx.refresh();
assertEnvironmentAwareInvoked(ctx, prodEnv);
}
@Test
void annotationConfigApplicationContext_withProdEnvAndProdConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(prodEnv);
ctx.register(ProdConfig.class);
ctx.refresh();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void annotationConfigApplicationContext_withProdEnvAndDevConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(prodEnv);
ctx.register(DevConfig.class);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
}
@Test
void annotationConfigApplicationContext_withDevEnvAndDevConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(devEnv);
ctx.register(DevConfig.class);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isTrue();
assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isTrue();
}
@Test
void annotationConfigApplicationContext_withImportedConfigClasses() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
assertHasStandardEnvironment(ctx);
ctx.setEnvironment(prodEnv);
ctx.register(Config.class);
ctx.refresh();
assertEnvironmentAwareInvoked(ctx, prodEnv);
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
}
@Test
void mostSpecificDerivedClassDrivesEnvironment_withDerivedDevEnvAndDerivedDevConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
StandardEnvironment derivedDevEnv = new StandardEnvironment();
derivedDevEnv.setActiveProfiles(DERIVED_DEV_ENV_NAME);
ctx.setEnvironment(derivedDevEnv);
ctx.register(DerivedDevConfig.class);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isTrue();
assertThat(ctx.containsBean(DERIVED_DEV_BEAN_NAME)).isTrue();
assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isTrue();
}
@Test
void mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.setEnvironment(devEnv);
ctx.register(DerivedDevConfig.class);
ctx.refresh();
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(DERIVED_DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
}
@Test
void annotationConfigApplicationContext_withProfileExpressionMatchOr() {
testProfileExpression(true, "p3");
}
@Test
void annotationConfigApplicationContext_withProfileExpressionMatchAnd() {
testProfileExpression(true, "p1", "p2");
}
@Test
void annotationConfigApplicationContext_withProfileExpressionNoMatchAnd() {
testProfileExpression(false, "p1");
}
@Test
void annotationConfigApplicationContext_withProfileExpressionNoMatchNone() {
testProfileExpression(false, "p4");
}
private void testProfileExpression(boolean expected, String... activeProfiles) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
StandardEnvironment environment = new StandardEnvironment();
environment.setActiveProfiles(activeProfiles);
ctx.setEnvironment(environment);
ctx.register(ProfileExpressionConfig.class);
ctx.refresh();
assertThat(ctx.containsBean("expressionBean")).isEqualTo(expected);
}
@Test
void webApplicationContext() {
GenericWebApplicationContext ctx = new GenericWebApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
assertHasStandardServletEnvironment(ctx);
ctx.setEnvironment(prodWebEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodWebEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodWebEnv);
}
@Test
void xmlWebApplicationContext() {
AbstractRefreshableWebApplicationContext ctx = new XmlWebApplicationContext();
ctx.setConfigLocation("classpath:" + XML_PATH);
ctx.setEnvironment(prodWebEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodWebEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodWebEnv);
assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
}
@Test
void staticApplicationContext() {
StaticApplicationContext ctx = new StaticApplicationContext();
assertHasStandardEnvironment(ctx);
registerEnvironmentBeanDefinition(ctx);
ctx.setEnvironment(prodEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodEnv);
}
@Test
void staticWebApplicationContext() {
StaticWebApplicationContext ctx = new StaticWebApplicationContext();
assertHasStandardServletEnvironment(ctx);
registerEnvironmentBeanDefinition(ctx);
ctx.setEnvironment(prodWebEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodWebEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodWebEnv);
}
@Test
void annotationConfigWebApplicationContext() {
AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
ctx.setEnvironment(prodWebEnv);
ctx.setConfigLocation(EnvironmentAwareBean.class.getName());
ctx.refresh();
assertHasEnvironment(ctx, prodWebEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodWebEnv);
}
@Test
void registerServletParamPropertySources_AbstractRefreshableWebApplicationContext() {
MockServletContext servletContext = new MockServletContext();
servletContext.addInitParameter("pCommon", "pCommonContextValue");
servletContext.addInitParameter("pContext1", "pContext1Value");
MockServletConfig servletConfig = new MockServletConfig(servletContext);
servletConfig.addInitParameter("pCommon", "pCommonConfigValue");
servletConfig.addInitParameter("pConfig1", "pConfig1Value");
AbstractRefreshableWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
ctx.setConfigLocation(EnvironmentAwareBean.class.getName());
ctx.setServletConfig(servletConfig);
ctx.refresh();
ConfigurableEnvironment environment = ctx.getEnvironment();
assertThat(environment).isInstanceOf(StandardServletEnvironment.class);
MutablePropertySources propertySources = environment.getPropertySources();
assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)).isTrue();
// ServletConfig gets precedence
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)));
// but all params are available
assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
assertThat(environment.getProperty("pConfig1")).isEqualTo("pConfig1Value");
// Servlet* PropertySources have precedence over System* PropertySources
assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
// Replace system properties with a mock property source for convenience
MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
// assert that servletconfig params resolve with higher precedence than sysprops
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
}
@Test
void registerServletParamPropertySources_GenericWebApplicationContext() {
MockServletContext servletContext = new MockServletContext();
servletContext.addInitParameter("pCommon", "pCommonContextValue");
servletContext.addInitParameter("pContext1", "pContext1Value");
GenericWebApplicationContext ctx = new GenericWebApplicationContext();
ctx.setServletContext(servletContext);
ctx.refresh();
ConfigurableEnvironment environment = ctx.getEnvironment();
assertThat(environment).isInstanceOf(StandardServletEnvironment.class);
MutablePropertySources propertySources = environment.getPropertySources();
assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
// ServletContext params are available
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonContextValue");
assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
// Servlet* PropertySources have precedence over System* PropertySources
assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)))
.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
// Replace system properties with a mock property source for convenience
MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
// assert that servletcontext init params resolve with higher precedence than sysprops
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonContextValue");
assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
}
@Test
void registerServletParamPropertySources_StaticWebApplicationContext() {
MockServletContext servletContext = new MockServletContext();
servletContext.addInitParameter("pCommon", "pCommonContextValue");
servletContext.addInitParameter("pContext1", "pContext1Value");
MockServletConfig servletConfig = new MockServletConfig(servletContext);
servletConfig.addInitParameter("pCommon", "pCommonConfigValue");
servletConfig.addInitParameter("pConfig1", "pConfig1Value");
StaticWebApplicationContext ctx = new StaticWebApplicationContext();
ctx.setServletConfig(servletConfig);
ctx.refresh();
ConfigurableEnvironment environment = ctx.getEnvironment();
MutablePropertySources propertySources = environment.getPropertySources();
assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)).isTrue();
// ServletConfig gets precedence
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)));
// but all params are available
assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
assertThat(environment.getProperty("pConfig1")).isEqualTo("pConfig1Value");
// Servlet* PropertySources have precedence over System* PropertySources
assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
// Replace system properties with a mock property source for convenience
MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
// assert that servletconfig params resolve with higher precedence than sysprops
assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
}
@Test
void resourceAdapterApplicationContext() {
ResourceAdapterApplicationContext ctx = new ResourceAdapterApplicationContext(new SimpleBootstrapContext(new SimpleTaskWorkManager()));
assertHasStandardEnvironment(ctx);
registerEnvironmentBeanDefinition(ctx);
ctx.setEnvironment(prodEnv);
ctx.refresh();
assertHasEnvironment(ctx, prodEnv);
assertEnvironmentBeanRegistered(ctx);
assertEnvironmentAwareInvoked(ctx, prodEnv);
}
@Test
void abstractApplicationContextValidatesRequiredPropertiesOnRefresh() {
{
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.refresh();
}
{
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.getEnvironment().setRequiredProperties("foo", "bar");
assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy(
ctx::refresh);
}
{
ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.getEnvironment().setRequiredProperties("foo");
ctx.setEnvironment(new MockEnvironment().withProperty("foo", "fooValue"));
ctx.refresh(); // should succeed
}
}
private DefaultListableBeanFactory newBeanFactoryWithEnvironmentAwareBean() {
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
registerEnvironmentBeanDefinition(bf);
return bf;
}
private void registerEnvironmentBeanDefinition(BeanDefinitionRegistry registry) {
registry.registerBeanDefinition(ENVIRONMENT_AWARE_BEAN_NAME,
rootBeanDefinition(EnvironmentAwareBean.class).getBeanDefinition());
}
private void assertEnvironmentBeanRegistered(
ConfigurableApplicationContext ctx) {
// ensure environment is registered as a bean
assertThat(ctx.containsBean(ENVIRONMENT_BEAN_NAME)).isTrue();
}
private void assertHasStandardEnvironment(ApplicationContext ctx) {
Environment defaultEnv = ctx.getEnvironment();
assertThat(defaultEnv).isNotNull();
assertThat(defaultEnv).isInstanceOf(StandardEnvironment.class);
}
private void assertHasStandardServletEnvironment(WebApplicationContext ctx) {
// ensure a default servlet environment exists
Environment defaultEnv = ctx.getEnvironment();
assertThat(defaultEnv).isNotNull();
assertThat(defaultEnv).isInstanceOf(StandardServletEnvironment.class);
}
private void assertHasEnvironment(ApplicationContext ctx, Environment expectedEnv) {
// ensure the custom environment took
Environment actualEnv = ctx.getEnvironment();
assertThat(actualEnv).isNotNull();
assertThat(actualEnv).isEqualTo(expectedEnv);
// ensure environment is registered as a bean
assertThat(ctx.containsBean(ENVIRONMENT_BEAN_NAME)).isTrue();
}
private void assertEnvironmentAwareInvoked(ConfigurableApplicationContext ctx, Environment expectedEnv) {
assertThat(ctx.getBean(EnvironmentAwareBean.class).environment).isEqualTo(expectedEnv);
}
private static class EnvironmentAwareBean implements EnvironmentAware {
public Environment environment;
@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
}
/**
* Mirrors the structure of beans and environment-specific config files in
* EnvironmentSystemIntegrationTests-context.xml
*/
@Configuration
@Import({DevConfig.class, ProdConfig.class})
static class Config {
@Bean
public EnvironmentAwareBean envAwareBean() {
return new EnvironmentAwareBean();
}
}
@Profile(DEV_ENV_NAME)
@Configuration
@Import(TransitiveConfig.class)
static class DevConfig {
@Bean
public Object devBean() {
return new Object();
}
}
@Profile(PROD_ENV_NAME)
@Configuration
static class ProdConfig {
@Bean
public Object prodBean() {
return new Object();
}
}
@Configuration
static class TransitiveConfig {
@Bean
public Object transitiveBean() {
return new Object();
}
}
@Profile(DERIVED_DEV_ENV_NAME)
@Configuration
static class DerivedDevConfig extends DevConfig {
@Bean
public Object derivedDevBean() {
return new Object();
}
}
@Profile("(p1 & p2) | p3")
@Configuration
static class ProfileExpressionConfig {
@Bean
public Object expressionBean() {
return new Object();
}
}
/**
* Constants used both locally and in scan* sub-packages
*/
public static class Constants {
public static final String XML_PATH = "org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml";
public static final String ENVIRONMENT_AWARE_BEAN_NAME = "envAwareBean";
public static final String PROD_BEAN_NAME = "prodBean";
public static final String DEV_BEAN_NAME = "devBean";
public static final String DERIVED_DEV_BEAN_NAME = "derivedDevBean";
public static final String TRANSITIVE_BEAN_NAME = "transitiveBean";
public static final String PROD_ENV_NAME = "prod";
public static final String DEV_ENV_NAME = "dev";
public static final String DERIVED_DEV_ENV_NAME = "derivedDev";
}
}
@@ -1,40 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.GenericApplicationContext;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
class PropertyPlaceholderConfigurerEnvironmentIntegrationTests {
@Test
@SuppressWarnings("deprecation")
void test() {
GenericApplicationContext ctx = new GenericApplicationContext();
ctx.registerBeanDefinition("ppc",
rootBeanDefinition(org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.class)
.addPropertyValue("searchSystemEnvironment", false)
.getBeanDefinition());
ctx.refresh();
ctx.getBean("ppc");
ctx.close();
}
}
@@ -1,26 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env.scan1;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import({ DevConfig.class, ProdConfig.class })
class Config {
}
@@ -1,32 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env.scan1;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME)
@Configuration
class DevConfig {
@Bean
public Object devBean() {
return new Object();
}
}
@@ -1,32 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env.scan1;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME)
@Configuration
class ProdConfig {
@Bean
public Object prodBean() {
return new Object();
}
}
@@ -1,25 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env.scan2;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME)
@Component(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_BEAN_NAME)
class DevBean {
}
@@ -1,26 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.core.env.scan2;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME)
@Component(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_BEAN_NAME)
class ProdBean {
}
@@ -1,63 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel.support;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.expression.MethodExecutor;
class Spr7538Tests {
@Test
void repro() throws Exception {
AlwaysTrueReleaseStrategy target = new AlwaysTrueReleaseStrategy();
BeanFactoryTypeConverter converter = new BeanFactoryTypeConverter();
StandardEvaluationContext context = new StandardEvaluationContext();
context.setTypeConverter(converter);
List<Foo> arguments = Collections.emptyList();
List<TypeDescriptor> paramDescriptors = new ArrayList<>();
Method method = AlwaysTrueReleaseStrategy.class.getMethod("checkCompleteness", List.class);
paramDescriptors.add(new TypeDescriptor(new MethodParameter(method, 0)));
List<TypeDescriptor> argumentTypes = new ArrayList<>();
argumentTypes.add(TypeDescriptor.forObject(arguments));
ReflectiveMethodResolver resolver = new ReflectiveMethodResolver();
MethodExecutor executor = resolver.resolve(context, target, "checkCompleteness", argumentTypes);
Object result = executor.execute(context, target, arguments);
System.out.println("Result: " + result);
}
static class AlwaysTrueReleaseStrategy {
public boolean checkCompleteness(List<Foo> messages) {
return true;
}
}
static class Foo{}
}
@@ -1,250 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.annotation;
import java.util.concurrent.atomic.AtomicInteger;
import org.aspectj.lang.annotation.Aspect;
import org.junit.jupiter.api.Test;
import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.dao.support.PersistenceExceptionTranslator;
import org.springframework.stereotype.Repository;
import org.springframework.tests.EnabledForTestGroups;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.mockito.Mockito.mock;
import static org.springframework.tests.TestGroup.PERFORMANCE;
/**
* Integration tests cornering bug SPR-8651, which revealed that @Scheduled methods may
* not work well with beans that have already been proxied for other reasons such
* as @Transactional or @Async processing.
*
* @author Chris Beams
* @author Juergen Hoeller
* @since 3.1
*/
@SuppressWarnings("resource")
@EnabledForTestGroups(PERFORMANCE)
class ScheduledAndTransactionalAnnotationIntegrationTests {
@Test
void failsWhenJdkProxyAndScheduledMethodNotPresentOnInterface() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigA.class);
assertThatExceptionOfType(BeanCreationException.class)
.isThrownBy(ctx::refresh)
.satisfies(ex -> assertThat(ex.getRootCause()).isInstanceOf(IllegalStateException.class));
}
@Test
void succeedsWhenSubclassProxyAndScheduledMethodNotPresentOnInterface() throws InterruptedException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(Config.class, SubclassProxyTxConfig.class, RepoConfigA.class);
ctx.refresh();
Thread.sleep(100); // allow @Scheduled method to be called several times
MyRepository repository = ctx.getBean(MyRepository.class);
CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
assertThat(AopUtils.isCglibProxy(repository)).isEqualTo(true);
assertThat(repository.getInvocationCount()).isGreaterThan(0);
assertThat(txManager.commits).isGreaterThan(0);
}
@Test
void succeedsWhenJdkProxyAndScheduledMethodIsPresentOnInterface() throws InterruptedException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigB.class);
ctx.refresh();
Thread.sleep(100); // allow @Scheduled method to be called several times
MyRepositoryWithScheduledMethod repository = ctx.getBean(MyRepositoryWithScheduledMethod.class);
CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
assertThat(AopUtils.isJdkDynamicProxy(repository)).isTrue();
assertThat(repository.getInvocationCount()).isGreaterThan(0);
assertThat(txManager.commits).isGreaterThan(0);
}
@Test
void withAspectConfig() throws InterruptedException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(AspectConfig.class, MyRepositoryWithScheduledMethodImpl.class);
ctx.refresh();
Thread.sleep(100); // allow @Scheduled method to be called several times
MyRepositoryWithScheduledMethod repository = ctx.getBean(MyRepositoryWithScheduledMethod.class);
assertThat(AopUtils.isCglibProxy(repository)).isTrue();
assertThat(repository.getInvocationCount()).isGreaterThan(0);
}
@Configuration
@EnableTransactionManagement
static class JdkProxyTxConfig {
}
@Configuration
@EnableTransactionManagement(proxyTargetClass = true)
static class SubclassProxyTxConfig {
}
@Configuration
static class RepoConfigA {
@Bean
MyRepository repository() {
return new MyRepositoryImpl();
}
}
@Configuration
static class RepoConfigB {
@Bean
MyRepositoryWithScheduledMethod repository() {
return new MyRepositoryWithScheduledMethodImpl();
}
}
@Configuration
@EnableScheduling
static class Config {
@Bean
PlatformTransactionManager txManager() {
return new CallCountingTransactionManager();
}
@Bean
PersistenceExceptionTranslator peTranslator() {
return mock(PersistenceExceptionTranslator.class);
}
@Bean
static PersistenceExceptionTranslationPostProcessor peTranslationPostProcessor() {
return new PersistenceExceptionTranslationPostProcessor();
}
}
@Configuration
@EnableScheduling
static class AspectConfig {
@Bean
static AnnotationAwareAspectJAutoProxyCreator autoProxyCreator() {
AnnotationAwareAspectJAutoProxyCreator apc = new AnnotationAwareAspectJAutoProxyCreator();
apc.setProxyTargetClass(true);
return apc;
}
@Bean
static MyAspect myAspect() {
return new MyAspect();
}
}
@Aspect
public static class MyAspect {
private final AtomicInteger count = new AtomicInteger(0);
@org.aspectj.lang.annotation.Before("execution(* scheduled())")
public void checkTransaction() {
this.count.incrementAndGet();
}
}
public interface MyRepository {
int getInvocationCount();
}
@Repository
static class MyRepositoryImpl implements MyRepository {
private final AtomicInteger count = new AtomicInteger(0);
@Transactional
@Scheduled(fixedDelay = 5)
public void scheduled() {
this.count.incrementAndGet();
}
@Override
public int getInvocationCount() {
return this.count.get();
}
}
public interface MyRepositoryWithScheduledMethod {
int getInvocationCount();
void scheduled();
}
@Repository
static class MyRepositoryWithScheduledMethodImpl implements MyRepositoryWithScheduledMethod {
private final AtomicInteger count = new AtomicInteger(0);
@Autowired(required = false)
private MyAspect myAspect;
@Override
@Transactional
@Scheduled(fixedDelay = 5)
public void scheduled() {
this.count.incrementAndGet();
}
@Override
public int getInvocationCount() {
if (this.myAspect != null) {
assertThat(this.myAspect.count.get()).isEqualTo(this.count.get());
}
return this.count.get();
}
}
}
@@ -1,331 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.concurrent.ConcurrentMapCache;
import org.springframework.cache.support.SimpleCacheManager;
import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.stereotype.Repository;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
/**
* Integration tests for the @EnableTransactionManagement annotation.
*
* @author Chris Beams
* @author Sam Brannen
* @since 3.1
*/
@SuppressWarnings("resource")
class EnableTransactionManagementIntegrationTests {
@Test
void repositoryIsNotTxProxy() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class);
assertThat(isTxProxy(ctx.getBean(FooRepository.class))).isFalse();
}
@Test
void repositoryIsTxProxy_withDefaultTxManagerName() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, DefaultTxManagerNameConfig.class);
assertTxProxying(ctx);
}
@Test
void repositoryIsTxProxy_withCustomTxManagerName() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, CustomTxManagerNameConfig.class);
assertTxProxying(ctx);
}
@Test
void repositoryIsTxProxy_withNonConventionalTxManagerName_fallsBackToByTypeLookup() {
assertTxProxying(new AnnotationConfigApplicationContext(Config.class, NonConventionalTxManagerNameConfig.class));
}
@Test
void repositoryIsClassBasedTxProxy() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, ProxyTargetClassTxConfig.class);
assertTxProxying(ctx);
assertThat(AopUtils.isCglibProxy(ctx.getBean(FooRepository.class))).isTrue();
}
@Test
void repositoryUsesAspectJAdviceMode() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(Config.class, AspectJTxConfig.class);
// this test is a bit fragile, but gets the job done, proving that an
// attempt was made to look up the AJ aspect. It's due to classpath issues
// in .integration-tests that it's not found.
assertThatExceptionOfType(Exception.class)
.isThrownBy(ctx::refresh)
.withMessageContaining("AspectJJtaTransactionManagementConfiguration");
}
@Test
void implicitTxManager() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImplicitTxManagerConfig.class);
FooRepository fooRepository = ctx.getBean(FooRepository.class);
fooRepository.findAll();
CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
assertThat(txManager.begun).isEqualTo(1);
assertThat(txManager.commits).isEqualTo(1);
assertThat(txManager.rollbacks).isEqualTo(0);
}
@Test
void explicitTxManager() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ExplicitTxManagerConfig.class);
FooRepository fooRepository = ctx.getBean(FooRepository.class);
fooRepository.findAll();
CallCountingTransactionManager txManager1 = ctx.getBean("txManager1", CallCountingTransactionManager.class);
assertThat(txManager1.begun).isEqualTo(1);
assertThat(txManager1.commits).isEqualTo(1);
assertThat(txManager1.rollbacks).isEqualTo(0);
CallCountingTransactionManager txManager2 = ctx.getBean("txManager2", CallCountingTransactionManager.class);
assertThat(txManager2.begun).isEqualTo(0);
assertThat(txManager2.commits).isEqualTo(0);
assertThat(txManager2.rollbacks).isEqualTo(0);
}
@Test
void apcEscalation() {
new AnnotationConfigApplicationContext(EnableTxAndCachingConfig.class);
}
private void assertTxProxying(AnnotationConfigApplicationContext ctx) {
FooRepository repo = ctx.getBean(FooRepository.class);
assertThat(isTxProxy(repo)).isTrue();
// trigger a transaction
repo.findAll();
}
private boolean isTxProxy(FooRepository repo) {
if (!AopUtils.isAopProxy(repo)) {
return false;
}
return Arrays.stream(((Advised) repo).getAdvisors())
.anyMatch(BeanFactoryTransactionAttributeSourceAdvisor.class::isInstance);
}
@Configuration
@EnableTransactionManagement
@ImportResource("org/springframework/transaction/annotation/enable-caching.xml")
static class EnableTxAndCachingConfig {
@Bean
public PlatformTransactionManager txManager() {
return new CallCountingTransactionManager();
}
@Bean
public FooRepository fooRepository() {
return new DummyFooRepository();
}
@Bean
public CacheManager cacheManager() {
SimpleCacheManager mgr = new SimpleCacheManager();
ArrayList<Cache> caches = new ArrayList<>();
caches.add(new ConcurrentMapCache(""));
mgr.setCaches(caches);
return mgr;
}
}
@Configuration
@EnableTransactionManagement
static class ImplicitTxManagerConfig {
@Bean
public PlatformTransactionManager txManager() {
return new CallCountingTransactionManager();
}
@Bean
public FooRepository fooRepository() {
return new DummyFooRepository();
}
}
@Configuration
@EnableTransactionManagement
static class ExplicitTxManagerConfig implements TransactionManagementConfigurer {
@Bean
public PlatformTransactionManager txManager1() {
return new CallCountingTransactionManager();
}
@Bean
public PlatformTransactionManager txManager2() {
return new CallCountingTransactionManager();
}
@Override
public PlatformTransactionManager annotationDrivenTransactionManager() {
return txManager1();
}
@Bean
public FooRepository fooRepository() {
return new DummyFooRepository();
}
}
@Configuration
@EnableTransactionManagement
static class DefaultTxManagerNameConfig {
@Bean
PlatformTransactionManager transactionManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}
@Configuration
@EnableTransactionManagement
static class CustomTxManagerNameConfig {
@Bean
PlatformTransactionManager txManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}
@Configuration
@EnableTransactionManagement
static class NonConventionalTxManagerNameConfig {
@Bean
PlatformTransactionManager txManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}
@Configuration
@EnableTransactionManagement(proxyTargetClass=true)
static class ProxyTargetClassTxConfig {
@Bean
PlatformTransactionManager transactionManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}
@Configuration
@EnableTransactionManagement(mode=AdviceMode.ASPECTJ)
static class AspectJTxConfig {
@Bean
PlatformTransactionManager transactionManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}
@Configuration
static class Config {
@Bean
FooRepository fooRepository() {
JdbcFooRepository repos = new JdbcFooRepository();
repos.setDataSource(dataSource());
return repos;
}
@Bean
DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.HSQL)
.build();
}
}
interface FooRepository {
List<Object> findAll();
}
@Repository
static class JdbcFooRepository implements FooRepository {
public void setDataSource(DataSource dataSource) {
}
@Override
@Transactional
public List<Object> findAll() {
return Collections.emptyList();
}
}
@Repository
static class DummyFooRepository implements FooRepository {
@Override
@Transactional
public List<Object> findAll() {
return Collections.emptyList();
}
}
}
@@ -1,129 +0,0 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.annotation;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests proving that regardless the proxy strategy used (JDK interface-based vs. CGLIB
* subclass-based), discovery of advice-oriented annotations is consistent.
*
* For example, Spring's @Transactional may be declared at the interface or class level,
* and whether interface or subclass proxies are used, the @Transactional annotation must
* be discovered in a consistent fashion.
*
* @author Chris Beams
*/
@SuppressWarnings("resource")
class ProxyAnnotationDiscoveryTests {
@Test
void annotatedServiceWithoutInterface_PTC_true() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCTrue.class, AnnotatedServiceWithoutInterface.class);
ctx.refresh();
AnnotatedServiceWithoutInterface s = ctx.getBean(AnnotatedServiceWithoutInterface.class);
assertThat(AopUtils.isCglibProxy(s)).isTrue();
assertThat(s).isInstanceOf(AnnotatedServiceWithoutInterface.class);
}
@Test
void annotatedServiceWithoutInterface_PTC_false() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCFalse.class, AnnotatedServiceWithoutInterface.class);
ctx.refresh();
AnnotatedServiceWithoutInterface s = ctx.getBean(AnnotatedServiceWithoutInterface.class);
assertThat(AopUtils.isCglibProxy(s)).isTrue();
assertThat(s).isInstanceOf(AnnotatedServiceWithoutInterface.class);
}
@Test
void nonAnnotatedService_PTC_true() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCTrue.class, AnnotatedServiceImpl.class);
ctx.refresh();
NonAnnotatedService s = ctx.getBean(NonAnnotatedService.class);
assertThat(AopUtils.isCglibProxy(s)).isTrue();
assertThat(s).isInstanceOf(AnnotatedServiceImpl.class);
}
@Test
void nonAnnotatedService_PTC_false() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCFalse.class, AnnotatedServiceImpl.class);
ctx.refresh();
NonAnnotatedService s = ctx.getBean(NonAnnotatedService.class);
assertThat(AopUtils.isJdkDynamicProxy(s)).isTrue();
assertThat(s).isNotInstanceOf(AnnotatedServiceImpl.class);
}
@Test
void annotatedService_PTC_true() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCTrue.class, NonAnnotatedServiceImpl.class);
ctx.refresh();
AnnotatedService s = ctx.getBean(AnnotatedService.class);
assertThat(AopUtils.isCglibProxy(s)).isTrue();
assertThat(s).isInstanceOf(NonAnnotatedServiceImpl.class);
}
@Test
void annotatedService_PTC_false() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(PTCFalse.class, NonAnnotatedServiceImpl.class);
ctx.refresh();
AnnotatedService s = ctx.getBean(AnnotatedService.class);
assertThat(AopUtils.isJdkDynamicProxy(s)).isTrue();
assertThat(s).isNotInstanceOf(NonAnnotatedServiceImpl.class);
}
}
@Configuration
@EnableTransactionManagement(proxyTargetClass=false)
class PTCFalse { }
@Configuration
@EnableTransactionManagement(proxyTargetClass=true)
class PTCTrue { }
interface NonAnnotatedService {
void m();
}
interface AnnotatedService {
@Transactional void m();
}
class NonAnnotatedServiceImpl implements AnnotatedService {
@Override
public void m() { }
}
class AnnotatedServiceImpl implements NonAnnotatedService {
@Override
@Transactional public void m() { }
}
class AnnotatedServiceWithoutInterface {
@Transactional public void m() { }
}
@@ -1 +0,0 @@
http\://www.foo.example/schema/component=org.springframework.beans.factory.xml.ComponentNamespaceHandler
@@ -1 +0,0 @@
http\://www.foo.example/schema/component/component.xsd=org/springframework/beans/factory/xml/component.xsd
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{1.} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
+11 -17
View File
@@ -1,37 +1,31 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url 'https://repo.spring.io/plugins-release' }
}
}
rootProject.name = "spring"
include "spring-aop"
include "spring-aspects"
include "spring-beans"
include "spring-beans-groovy"
include "spring-context"
include "spring-context-support"
include "spring-context-indexer"
include "spring-core"
include "kotlin-coroutines"
project(':kotlin-coroutines').projectDir = file('spring-core/kotlin-coroutines')
include "spring-expression"
include "spring-instrument"
include "spring-jcl"
include "spring-instrument-tomcat"
include "spring-jdbc"
include "spring-jms"
include "spring-messaging"
include "spring-orm"
include "spring-orm-hibernate4"
include "spring-orm-hibernate5"
include "spring-oxm"
include "spring-test"
include "spring-tx"
include "spring-web"
include "spring-webmvc"
include "spring-webflux"
include "spring-webmvc-portlet"
include "spring-webmvc-tiles2"
include "spring-websocket"
include "framework-bom"
include "integration-tests"
include "spring-framework-bom"
rootProject.name = "spring"
rootProject.children.each {project ->
project.buildFileName = "${project.name}.gradle"
}
// Exposes gradle buildSrc for IDE support
include "buildSrc"
rootProject.children.find{ it.name == "buildSrc" }.name = "spring-build-src"
-9
View File
@@ -1,9 +0,0 @@
description = "Spring AOP"
dependencies {
compile(project(":spring-beans"))
compile(project(":spring-core"))
optional("org.aspectj:aspectjweaver")
optional("org.apache.commons:commons-pool2")
optional("com.jamonapi:jamon")
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2016 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.
@@ -20,7 +20,7 @@ package org.aopalliance.aop;
* Superclass for all AOP infrastructure exceptions.
* Unchecked, as such exceptions are fatal and end user
* code shouldn't be forced to catch them.
*
*
* @author Rod Johnson
* @author Bob Lee
* @author Juergen Hoeller
@@ -1,4 +0,0 @@
/**
* The core AOP Alliance advice marker.
*/
package org.aopalliance.aop;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2016 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.
@@ -19,7 +19,7 @@ package org.aopalliance.intercept;
import java.lang.reflect.Constructor;
/**
* Description of an invocation to a constructor, given to an
* Description of an invocation to a constuctor, given to an
* interceptor upon constructor-call.
*
* <p>A constructor invocation is a joinpoint and can be intercepted
@@ -30,12 +30,12 @@ import java.lang.reflect.Constructor;
*/
public interface ConstructorInvocation extends Invocation {
/**
* Get the constructor being called.
* <p>This method is a friendly implementation of the
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the constructor being called
*/
Constructor<?> getConstructor();
/**
* Get the constructor being called.
* <p>This method is a friendly implementation of the
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the constructor being called
*/
Constructor<?> getConstructor();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2016 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.
@@ -24,7 +24,7 @@ import org.aopalliance.aop.Advice;
* <p>A generic interceptor can intercept runtime events that occur
* within a base program. Those events are materialized by (reified
* in) joinpoints. Runtime joinpoints can be invocations, field
* access, exceptions...
* access, exceptions...
*
* <p>This interface is not used directly. Use the sub-interfaces
* to intercept specific events. For instance, the following class
@@ -32,8 +32,8 @@ import org.aopalliance.aop.Advice;
* debugger:
*
* <pre class=code>
* class DebuggingInterceptor implements MethodInterceptor,
* ConstructorInterceptor {
* class DebuggingInterceptor implements MethodInterceptor,
* ConstructorInterceptor, FieldInterceptor {
*
* Object invoke(MethodInvocation i) throws Throwable {
* debug(i.getMethod(), i.getThis(), i.getArgs());
@@ -44,6 +44,16 @@ import org.aopalliance.aop.Advice;
* debug(i.getConstructor(), i.getThis(), i.getArgs());
* return i.proceed();
* }
*
* Object get(FieldAccess fa) throws Throwable {
* debug(fa.getField(), fa.getThis(), null);
* return fa.proceed();
* }
*
* Object set(FieldAccess fa) throws Throwable {
* debug(fa.getField(), fa.getThis(), fa.getValueToSet());
* return fa.proceed();
* }
*
* void debug(AccessibleObject ao, Object this, Object value) {
* ...
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2016 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.
@@ -39,9 +39,8 @@ package org.aopalliance.intercept;
*
* @author Rod Johnson
*/
@FunctionalInterface
public interface MethodInterceptor extends Interceptor {
/**
* Implement this method to perform extra treatments before and
* after the invocation. Polite implementations would certainly
@@ -32,7 +32,7 @@ public interface MethodInvocation extends Invocation {
/**
* Get the method being called.
* <p>This method is a friendly implementation of the
* <p>This method is a frienly implementation of the
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the method being called
*/
@@ -1,4 +0,0 @@
/**
* The AOP Alliance reflective interception abstraction.
*/
package org.aopalliance.intercept;
@@ -1,4 +0,0 @@
/**
* Spring's variant of the AOP Alliance interfaces.
*/
package org.aopalliance;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2012 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.
@@ -31,18 +31,9 @@ import org.aopalliance.aop.Advice;
* implemented using interception.
*
* @author Rod Johnson
* @author Juergen Hoeller
*/
public interface Advisor {
/**
* Common placeholder for an empty {@code Advice} to be returned from
* {@link #getAdvice()} if no proper advice has been configured (yet).
* @since 5.0
*/
Advice EMPTY_ADVICE = new Advice() {};
/**
* Return the advice part of this aspect. An advice may be an
* interceptor, a before advice, a throws advice, etc.
@@ -18,8 +18,6 @@ package org.springframework.aop;
import java.lang.reflect.Method;
import org.springframework.lang.Nullable;
/**
* After returning advice is invoked only on normal method return, not if an
* exception is thrown. Such advice can see the return value, but cannot change it.
@@ -41,6 +39,6 @@ public interface AfterReturningAdvice extends AfterAdvice {
* allowed by the method signature. Otherwise the exception
* will be wrapped as a runtime exception.
*/
void afterReturning(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) throws Throwable;
void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2007 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.
@@ -23,16 +23,10 @@ package org.springframework.aop;
* <p>Can be used as part of a {@link Pointcut} or for the entire
* targeting of an {@link IntroductionAdvisor}.
*
* <p>Concrete implementations of this interface typically should provide proper
* implementations of {@link Object#equals(Object)} and {@link Object#hashCode()}
* in order to allow the filter to be used in caching scenarios &mdash; for
* example, in proxies generated by CGLIB.
*
* @author Rod Johnson
* @see Pointcut
* @see MethodMatcher
*/
@FunctionalInterface
public interface ClassFilter {
/**
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2013 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.
@@ -33,7 +33,8 @@ public interface IntroductionAwareMethodMatcher extends MethodMatcher {
* instead of the 2-arg {@link #matches(java.lang.reflect.Method, Class)} method
* if the caller supports the extended IntroductionAwareMethodMatcher interface.
* @param method the candidate method
* @param targetClass the target class
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @param hasIntroductions {@code true} if the object on whose behalf we are
* asking is the subject on one or more introductions; {@code false} otherwise
* @return whether or not this method matches statically
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2012 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.
@@ -18,15 +18,14 @@ package org.springframework.aop;
import java.lang.reflect.Method;
import org.springframework.lang.Nullable;
/**
* Advice invoked before a method is invoked. Such advices cannot
* prevent the method call proceeding, unless they throw a Throwable.
*
* @author Rod Johnson
* @see AfterReturningAdvice
* @see ThrowsAdvice
*
* @author Rod Johnson
*/
public interface MethodBeforeAdvice extends BeforeAdvice {
@@ -40,6 +39,6 @@ public interface MethodBeforeAdvice extends BeforeAdvice {
* allowed by the method signature. Otherwise the exception
* will be wrapped as a runtime exception.
*/
void before(Method method, Object[] args, @Nullable Object target) throws Throwable;
void before(Method method, Object[] args, Object target) throws Throwable;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2018 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.
@@ -40,11 +40,6 @@ import java.lang.reflect.Method;
* in an interceptor chain, will have run, so any state changes they have produced in
* parameters or ThreadLocal state will be available at the time of evaluation.
*
* <p>Concrete implementations of this interface typically should provide proper
* implementations of {@link Object#equals(Object)} and {@link Object#hashCode()}
* in order to allow the matcher to be used in caching scenarios &mdash; for
* example, in proxies generated by CGLIB.
*
* @author Rod Johnson
* @since 11.11.2003
* @see Pointcut
@@ -59,7 +54,8 @@ public interface MethodMatcher {
* {@link #matches(java.lang.reflect.Method, Class, Object[])} call)
* will be made.
* @param method the candidate method
* @param targetClass the target class
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @return whether or not this method matches statically
*/
boolean matches(Method method, Class<?> targetClass);
@@ -85,7 +81,8 @@ public interface MethodMatcher {
* immediately before potential running of the advice, after any
* advice earlier in the advice chain has run.
* @param method the candidate method
* @param targetClass the target class
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @param args arguments to the method
* @return whether there's a runtime match
* @see MethodMatcher#matches(Method, Class)
@@ -18,8 +18,6 @@ package org.springframework.aop;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.lang.Nullable;
/**
* Extension of the AOP Alliance {@link org.aopalliance.intercept.MethodInvocation}
* interface, allowing access to the proxy that the method invocation was made through.
@@ -75,7 +73,7 @@ public interface ProxyMethodInvocation extends MethodInvocation {
* @param key the name of the attribute
* @param value the value of the attribute, or {@code null} to reset it
*/
void setUserAttribute(String key, @Nullable Object value);
void setUserAttribute(String key, Object value);
/**
* Return the value of the specified user attribute.
@@ -83,7 +81,6 @@ public interface ProxyMethodInvocation extends MethodInvocation {
* @return the value of the attribute, or {@code null} if not set
* @see #setUserAttribute
*/
@Nullable
Object getUserAttribute(String key);
}
@@ -16,8 +16,6 @@
package org.springframework.aop;
import org.springframework.lang.Nullable;
/**
* Minimal interface for exposing the target class behind a proxy.
*
@@ -36,7 +34,6 @@ public interface TargetClassAware {
* (typically a proxy configuration or an actual proxy).
* @return the target Class, or {@code null} if not known
*/
@Nullable
Class<?> getTargetClass();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
/*<
* Copyright 2002-2017 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.
@@ -16,8 +16,6 @@
package org.springframework.aop;
import org.springframework.lang.Nullable;
/**
* A {@code TargetSource} is used to obtain the current "target" of
* an AOP invocation, which will be invoked via reflection if no around
@@ -31,7 +29,6 @@ import org.springframework.lang.Nullable;
* {@code TargetSources} directly: this is an AOP framework interface.
*
* @author Rod Johnson
* @author Juergen Hoeller
*/
public interface TargetSource extends TargetClassAware {
@@ -42,7 +39,6 @@ public interface TargetSource extends TargetClassAware {
* @return the type of targets returned by this {@link TargetSource}
*/
@Override
@Nullable
Class<?> getTargetClass();
/**
@@ -61,7 +57,6 @@ public interface TargetSource extends TargetClassAware {
* or {@code null} if there is no actual target instance
* @throws Exception if the target object can't be resolved
*/
@Nullable
Object getTarget() throws Exception;
/**
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2012 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.
@@ -24,7 +24,7 @@ import java.io.Serializable;
* @author Rod Johnson
*/
@SuppressWarnings("serial")
final class TrueClassFilter implements ClassFilter, Serializable {
class TrueClassFilter implements ClassFilter, Serializable {
public static final TrueClassFilter INSTANCE = new TrueClassFilter();
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2015 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.
@@ -25,7 +25,7 @@ import java.lang.reflect.Method;
* @author Rod Johnson
*/
@SuppressWarnings("serial")
final class TrueMethodMatcher implements MethodMatcher, Serializable {
class TrueMethodMatcher implements MethodMatcher, Serializable {
public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher();
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2012 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.
@@ -24,7 +24,7 @@ import java.io.Serializable;
* @author Rod Johnson
*/
@SuppressWarnings("serial")
final class TruePointcut implements Pointcut, Serializable {
class TruePointcut implements Pointcut, Serializable {
public static final TruePointcut INSTANCE = new TruePointcut();
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2018 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.
@@ -42,7 +42,6 @@ import org.springframework.aop.support.MethodMatchers;
import org.springframework.aop.support.StaticMethodMatcher;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
@@ -63,7 +62,7 @@ import org.springframework.util.StringUtils;
public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedenceInformation, Serializable {
/**
* Key used in ReflectiveMethodInvocation userAttributes map for the current joinpoint.
* Key used in ReflectiveMethodInvocation userAtributes map for the current joinpoint.
*/
protected static final String JOIN_POINT_KEY = JoinPoint.class.getName();
@@ -108,7 +107,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
* (used when determining advice precedence so that we can determine
* whether two pieces of advice come from the same aspect).
*/
private String aspectName = "";
private String aspectName;
/**
* The order of declaration of this advice within the aspect.
@@ -117,17 +116,14 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
/**
* This will be non-null if the creator of this advice object knows the argument names
* and sets them explicitly.
* and sets them explicitly
*/
@Nullable
private String[] argumentNames;
/** Non-null if after throwing advice binds the thrown value. */
@Nullable
/** Non-null if after throwing advice binds the thrown value */
private String throwingName;
/** Non-null if after returning advice binds the return value. */
@Nullable
/** Non-null if after returning advice binds the return value */
private String returningName;
private Class<?> discoveredReturningType = Object.class;
@@ -136,22 +132,20 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
/**
* Index for thisJoinPoint argument (currently only
* supported at index 0 if present at all).
* supported at index 0 if present at all)
*/
private int joinPointArgumentIndex = -1;
/**
* Index for thisJoinPointStaticPart argument (currently only
* supported at index 0 if present at all).
* supported at index 0 if present at all)
*/
private int joinPointStaticPartArgumentIndex = -1;
@Nullable
private Map<String, Integer> argumentBindings;
private boolean argumentsIntrospected = false;
@Nullable
private Type discoveredReturningGenericType;
// Note: Unlike return type, no such generic information is needed for the throwing type,
// since Java doesn't allow exception types to be parameterized.
@@ -213,7 +207,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
/**
* Return the ClassLoader for aspect instances.
*/
@Nullable
public final ClassLoader getAspectClassLoader() {
return this.aspectInstanceFactory.getAspectClassLoader();
}
@@ -224,9 +217,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
}
/**
* Set the name of the aspect (bean) in which the advice was declared.
*/
public void setAspectName(String name) {
this.aspectName = name;
}
@@ -270,7 +260,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
}
}
if (this.argumentNames != null) {
if (this.aspectJAdviceMethod.getParameterCount() == this.argumentNames.length + 1) {
if (this.aspectJAdviceMethod.getParameterTypes().length == this.argumentNames.length + 1) {
// May need to add implicit join point arg name...
Class<?> firstArgType = this.aspectJAdviceMethod.getParameterTypes()[0];
if (firstArgType == JoinPoint.class ||
@@ -315,7 +305,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
return this.discoveredReturningType;
}
@Nullable
protected Type getDiscoveredReturningGenericType() {
return this.discoveredReturningGenericType;
}
@@ -470,10 +459,9 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
}
private void bindExplicitArguments(int numArgumentsLeftToBind) {
Assert.state(this.argumentNames != null, "No argument names available");
this.argumentBindings = new HashMap<>();
this.argumentBindings = new HashMap<String, Integer>();
int numExpectedArgumentNames = this.aspectJAdviceMethod.getParameterCount();
int numExpectedArgumentNames = this.aspectJAdviceMethod.getParameterTypes().length;
if (this.argumentNames.length != numExpectedArgumentNames) {
throw new IllegalStateException("Expecting to find " + numExpectedArgumentNames +
" arguments to bind by name in advice, but actually found " +
@@ -511,7 +499,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
}
// configure the pointcut expression accordingly.
configurePointcutParameters(this.argumentNames, argumentIndexOffset);
configurePointcutParameters(argumentIndexOffset);
}
/**
@@ -519,7 +507,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
* pointcut parameters - but returning and throwing vars are handled differently
* and must be removed from the list if present.
*/
private void configurePointcutParameters(String[] argumentNames, int argumentIndexOffset) {
private void configurePointcutParameters(int argumentIndexOffset) {
int numParametersToRemove = argumentIndexOffset;
if (this.returningName != null) {
numParametersToRemove++;
@@ -527,20 +515,20 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
if (this.throwingName != null) {
numParametersToRemove++;
}
String[] pointcutParameterNames = new String[argumentNames.length - numParametersToRemove];
String[] pointcutParameterNames = new String[this.argumentNames.length - numParametersToRemove];
Class<?>[] pointcutParameterTypes = new Class<?>[pointcutParameterNames.length];
Class<?>[] methodParameterTypes = this.aspectJAdviceMethod.getParameterTypes();
int index = 0;
for (int i = 0; i < argumentNames.length; i++) {
for (int i = 0; i < this.argumentNames.length; i++) {
if (i < argumentIndexOffset) {
continue;
}
if (argumentNames[i].equals(this.returningName) ||
argumentNames[i].equals(this.throwingName)) {
if (this.argumentNames[i].equals(this.returningName) ||
this.argumentNames[i].equals(this.throwingName)) {
continue;
}
pointcutParameterNames[index] = argumentNames[i];
pointcutParameterNames[index] = this.argumentNames[i];
pointcutParameterTypes[index] = methodParameterTypes[i];
index++;
}
@@ -551,16 +539,14 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
/**
* Take the arguments at the method execution join point and output a set of arguments
* to the advice method.
* to the advice method
* @param jp the current JoinPoint
* @param jpMatch the join point match that matched this execution join point
* @param returnValue the return value from the method execution (may be null)
* @param ex the exception thrown by the method execution (may be null)
* @return the empty array if there are no arguments
*/
protected Object[] argBinding(JoinPoint jp, @Nullable JoinPointMatch jpMatch,
@Nullable Object returnValue, @Nullable Throwable ex) {
protected Object[] argBinding(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable ex) {
calculateArgumentBindings();
// AMC start
@@ -619,23 +605,20 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
* @return the invocation result
* @throws Throwable in case of invocation failure
*/
protected Object invokeAdviceMethod(
@Nullable JoinPointMatch jpMatch, @Nullable Object returnValue, @Nullable Throwable ex)
throws Throwable {
protected Object invokeAdviceMethod(JoinPointMatch jpMatch, Object returnValue, Throwable ex) throws Throwable {
return invokeAdviceMethodWithGivenArgs(argBinding(getJoinPoint(), jpMatch, returnValue, ex));
}
// As above, but in this case we are given the join point.
protected Object invokeAdviceMethod(JoinPoint jp, @Nullable JoinPointMatch jpMatch,
@Nullable Object returnValue, @Nullable Throwable t) throws Throwable {
protected Object invokeAdviceMethod(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t)
throws Throwable {
return invokeAdviceMethodWithGivenArgs(argBinding(jp, jpMatch, returnValue, t));
}
protected Object invokeAdviceMethodWithGivenArgs(Object[] args) throws Throwable {
Object[] actualArgs = args;
if (this.aspectJAdviceMethod.getParameterCount() == 0) {
if (this.aspectJAdviceMethod.getParameterTypes().length == 0) {
actualArgs = null;
}
try {
@@ -663,7 +646,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
/**
* Get the current join point match at the join point we are being dispatched on.
*/
@Nullable
protected JoinPointMatch getJoinPointMatch() {
MethodInvocation mi = ExposeInvocationInterceptor.currentInvocation();
if (!(mi instanceof ProxyMethodInvocation)) {
@@ -678,10 +660,8 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
// 'last man wins' which is not what we want at all.
// Using the expression is guaranteed to be safe, since 2 identical expressions
// are guaranteed to bind in exactly the same way.
@Nullable
protected JoinPointMatch getJoinPointMatch(ProxyMethodInvocation pmi) {
String expression = this.pointcut.getExpression();
return (expression != null ? (JoinPointMatch) pmi.getUserAttribute(expression) : null);
return (JoinPointMatch) pmi.getUserAttribute(this.pointcut.getExpression());
}
@@ -720,7 +700,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
}
@Override
public boolean equals(@Nullable Object other) {
public boolean equals(Object other) {
if (this == other) {
return true;
}
@@ -735,11 +715,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
public int hashCode() {
return this.adviceMethod.hashCode();
}
@Override
public String toString() {
return getClass().getName() + ": " + this.adviceMethod;
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2012 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.
@@ -17,7 +17,6 @@
package org.springframework.aop.aspectj;
import org.springframework.core.Ordered;
import org.springframework.lang.Nullable;
/**
* Interface implemented to provide an instance of an AspectJ aspect.
@@ -41,10 +40,8 @@ public interface AspectInstanceFactory extends Ordered {
/**
* Expose the aspect class loader that this factory uses.
* @return the aspect class loader (or {@code null} for the bootstrap loader)
* @see org.springframework.util.ClassUtils#getDefaultClassLoader()
* @return the aspect class loader (never {@code null})
*/
@Nullable
ClassLoader getAspectClassLoader();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2017 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.
@@ -30,7 +30,6 @@ import org.aspectj.weaver.tools.PointcutParser;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;
/**
@@ -132,8 +131,8 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
private static final int STEP_REFERENCE_PCUT_BINDING = 7;
private static final int STEP_FINISHED = 8;
private static final Set<String> singleValuedAnnotationPcds = new HashSet<>();
private static final Set<String> nonReferencePointcutTokens = new HashSet<>();
private static final Set<String> singleValuedAnnotationPcds = new HashSet<String>();
private static final Set<String> nonReferencePointcutTokens = new HashSet<String>();
static {
@@ -156,32 +155,29 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
/** The pointcut expression associated with the advice, as a simple String. */
@Nullable
/** The pointcut expression associated with the advice, as a simple String */
private String pointcutExpression;
private boolean raiseExceptions;
/** If the advice is afterReturning, and binds the return value, this is the parameter name used. */
@Nullable
/** If the advice is afterReturning, and binds the return value, this is the parameter name used */
private String returningName;
/** If the advice is afterThrowing, and binds the thrown value, this is the parameter name used. */
@Nullable
/** If the advice is afterThrowing, and binds the thrown value, this is the parameter name used */
private String throwingName;
private Class<?>[] argumentTypes = new Class<?>[0];
private Class<?>[] argumentTypes;
private String[] parameterNameBindings = new String[0];
private String[] parameterNameBindings;
private int numberOfRemainingUnboundArguments;
/**
* Create a new discoverer that attempts to discover parameter names.
* Create a new discoverer that attempts to discover parameter names
* from the given pointcut expression.
*/
public AspectJAdviceParameterNameDiscoverer(@Nullable String pointcutExpression) {
public AspectJAdviceParameterNameDiscoverer(String pointcutExpression) {
this.pointcutExpression = pointcutExpression;
}
@@ -200,7 +196,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* returning variable name must be specified.
* @param returningName the name of the returning variable
*/
public void setReturningName(@Nullable String returningName) {
public void setReturningName(String returningName) {
this.returningName = returningName;
}
@@ -209,7 +205,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* throwing variable name must be specified.
* @param throwingName the name of the throwing variable
*/
public void setThrowingName(@Nullable String throwingName) {
public void setThrowingName(String throwingName) {
this.throwingName = throwingName;
}
@@ -222,7 +218,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* @return the parameter names
*/
@Override
@Nullable
public String[] getParameterNames(Method method) {
this.argumentTypes = method.getParameterTypes();
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
@@ -272,7 +267,15 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
}
}
catch (AmbiguousBindingException | IllegalArgumentException ex) {
catch (AmbiguousBindingException ambigEx) {
if (this.raiseExceptions) {
throw ambigEx;
}
else {
return null;
}
}
catch (IllegalArgumentException ex) {
if (this.raiseExceptions) {
throw ex;
}
@@ -303,7 +306,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
*/
@Override
@Nullable
public String[] getParameterNames(Constructor<?> ctor) {
if (this.raiseExceptions) {
throw new UnsupportedOperationException("An advice method can never be a constructor");
@@ -409,7 +411,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* <p>Some more support from AspectJ in doing this exercise would be nice... :)
*/
private void maybeBindAnnotationsFromPointcutExpression() {
List<String> varNames = new ArrayList<>();
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
String toMatch = tokens[i];
@@ -468,8 +470,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
/*
* If the token starts meets Java identifier conventions, it's in.
*/
@Nullable
private String maybeExtractVariableName(@Nullable String candidateToken) {
private String maybeExtractVariableName(String candidateToken) {
if (!StringUtils.hasLength(candidateToken)) {
return null;
}
@@ -492,7 +493,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* Given an args pointcut body (could be {@code args} or {@code at_args}),
* add any candidate variable names to the given list.
*/
private void maybeExtractVariableNamesFromArgs(@Nullable String argsSpec, List<String> varNames) {
private void maybeExtractVariableNamesFromArgs(String argsSpec, List<String> varNames) {
if (argsSpec == null) {
return;
}
@@ -516,7 +517,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
+ " unbound args at this(),target(),args() binding stage, with no way to determine between them");
}
List<String> varNames = new ArrayList<>();
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
if (tokens[i].equals("this") ||
@@ -533,7 +534,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
else if (tokens[i].equals("args") || tokens[i].startsWith("args(")) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
List<String> candidateVarNames = new ArrayList<>();
List<String> candidateVarNames = new ArrayList<String>();
maybeExtractVariableNamesFromArgs(body.text, candidateVarNames);
// we may have found some var names that were bound in previous primitive args binding step,
// filter them out...
@@ -567,7 +568,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
+ " unbound args at reference pointcut binding stage, with no way to determine between them");
}
List<String> varNames = new ArrayList<>();
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
String toMatch = tokens[i];
@@ -648,7 +649,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
if (tokens[currentIndex].endsWith(")")) {
sb.append(tokens[currentIndex].substring(0, tokens[currentIndex].length() - 1));
sb.append(tokens[currentIndex], 0, tokens[currentIndex].length() - 1);
return new PointcutBody(numTokensConsumed, sb.toString().trim());
}
@@ -669,7 +670,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
/**
* Match up args against unbound arguments of primitive types.
* Match up args against unbound arguments of primitive types
*/
private void maybeBindPrimitiveArgsFromPointcutExpression() {
int numUnboundPrimitives = countNumberOfUnboundPrimitiveArguments();
@@ -679,7 +680,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
if (numUnboundPrimitives == 1) {
// Look for arg variable and bind it if we find exactly one...
List<String> varNames = new ArrayList<>();
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
if (tokens[i].equals("args") || tokens[i].startsWith("args(")) {
@@ -773,10 +774,9 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
private int numTokensConsumed;
@Nullable
private String text;
public PointcutBody(int tokens, @Nullable String text) {
public PointcutBody(int tokens, String text) {
this.numTokensConsumed = tokens;
this.text = text;
}
@@ -22,7 +22,6 @@ import java.lang.reflect.Type;
import org.springframework.aop.AfterAdvice;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
import org.springframework.util.TypeUtils;
@@ -61,7 +60,7 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice
}
@Override
public void afterReturning(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) throws Throwable {
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);
}
@@ -76,7 +75,7 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice
* @param returnValue the return value of the target method
* @return whether to invoke the advice method for the given return value
*/
private boolean shouldInvokeOnReturnValueOf(Method method, @Nullable Object returnValue) {
private boolean shouldInvokeOnReturnValueOf(Method method, Object returnValue) {
Class<?> type = getDiscoveredReturningType();
Type genericType = getDiscoveredReturningGenericType();
// If we aren't dealing with a raw type, check if generic parameters are assignable.
@@ -95,7 +94,7 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice
* @param returnValue the return value of the target method
* @return whether to invoke the advice method for the given return value and type
*/
private boolean matchesReturnValue(Class<?> type, Method method, @Nullable Object returnValue) {
private boolean matchesReturnValue(Class<?> type, Method method, Object returnValue) {
if (returnValue != null) {
return ClassUtils.isAssignableValue(type, returnValue);
}

Some files were not shown because too many files have changed in this diff Show More