Commit Graph

7980 Commits

Author SHA1 Message Date
Sam Brannen
8028eae786 Fix CGLIB memory leak for method injection
This commit continues the work for fixing memory leaks resulting from
CGLIB subclass generation for beans relying on method injection.

- Set proxy callbacks on the CGLIB Factory (i.e., the instance) instead
  of in the generated subclass (i.e., via the Enhancer).

- Convert private inner classes in CglibSubclassingInstantiationStrategy
  to private static classes in order to avoid unnecessary coupling to
  classes generated using CGLIB.

- Tidy up XmlBeanFactoryTests.

- Update logic in serializableMethodReplacerAndSuperclass() so that it
  finally aligns with the decision made for SPR-356.

Issue: SPR-10785, SPR-356
2014-02-13 01:45:41 +01:00
Juergen Hoeller
bda8f2b4cf Upgraded to Jetty 9.1.2 and Guava 16.0.1 2014-02-13 01:09:16 +01:00
Juergen Hoeller
ce39146be8 Polishing 2014-02-13 01:08:35 +01:00
Sam Brannen
f2a4537b6c Test against CGLIB memory leak for method injection
This commit introduces a test in XmlBeanFactoryTests that verifies that
CGLIB generated subclasses for method injected beans are reused across
bean factories for identical bean definitions. In other words, by
verifying that the same CGLIB generated class is reused for identical
bean definitions, we can be certain that Spring is no longer generating
identical, duplicate classes that consume memory in the VM.

Issue: SPR-10785, SPR-11420
2014-02-13 00:28:37 +01:00
Juergen Hoeller
674169fe07 Actually upgraded to Gradle 1.11 2014-02-13 00:10:21 +01:00
Juergen Hoeller
520ef9ec23 Polishing
Issue: SPR-11422
2014-02-12 23:48:37 +01:00
Juergen Hoeller
603cdea26e resolveFactoryMethodIfPossible considers nonPublicAccessAllowed and SecurityManager
Issue: SPR-11422
2014-02-12 23:48:16 +01:00
Juergen Hoeller
0ec99fdef7 Polishing 2014-02-12 18:36:04 +01:00
Juergen Hoeller
6f58491b9c MarshallingView explicitly skips BindingResult when searching for a model object
Just implementing common custom subclass behavior out-of-the-box...

Issue: SPR-11417
2014-02-12 18:35:36 +01:00
Juergen Hoeller
3716a8ef7d Upgraded to Gradle 1.11 2014-02-12 18:29:14 +01:00
Rossen Stoyanchev
891ec56607 Upgrade to Tomcat 8.0.3 2014-02-12 11:06:51 -05:00
Rossen Stoyanchev
dfe2234781 Upgrade to Undertow 1.0 Final (WildFly 8 Final) 2014-02-12 11:06:51 -05:00
Sam Brannen
9534245660 Exclude overloaded from equals & hashCode in MethodOverride
Prior to this commit, the inclusion of the 'overloaded' flag in the
implementations of equals() and hashCode() in MethodOverride could lead
to adverse effects in the outcome of equals() in AbstractBeanDefinition.

For example, given two bean definitions A and B that represent the
exact same bean definition metadata for a bean that relies on method
injection, if A has been validated and B has not, then A.equals(B) will
potentially return false, which is not acceptable behavior.

This commit addresses this issue by removing the 'overloaded' flag from
the implementations of equals() and hashCode() for MethodOverride.

Issue: SPR-11420
2014-02-12 16:56:03 +01:00
Juergen Hoeller
8ae3aa7f59 Upgraded to Commons Logging 1.1.3 2014-02-12 00:13:16 +01:00
Juergen Hoeller
cead06a3d9 Polishing 2014-02-12 00:12:52 +01:00
Juergen Hoeller
4a45af0038 AbstractHandlerMethodMapping should reuse BeanFactory.getType result 2014-02-12 00:11:36 +01:00
Juergen Hoeller
949338009b Ignore container callback and marker interfaces for auto-proxy decisions
Issue: SPR-11416
2014-02-12 00:01:20 +01:00
Juergen Hoeller
1a1c72ce4b Revised InvocableHandlerMethod exception handling
Issue: SPR-11281
2014-02-11 23:48:10 +01:00
Juergen Hoeller
5f1592a61a Consistently avoid close() call on Servlet OutputStream
Issue: SPR-11413
2014-02-11 23:42:37 +01:00
Juergen Hoeller
648245b200 MarshallingView should not close response OutputStream after copying to it
Also throws IllegalStateException instead of ServletException now, consistent with other Spring MVC classes.

Issue: SPR-11411
2014-02-11 23:41:09 +01:00
Rossen Stoyanchev
7301b58ec9 Improve info on use of @Controller's with aop proxying
Before this change, issues surrounding the use of @Controller's in
combination with AOP proxying, resulted in an IllegalArgumentException
when trying to invoke the controller method.

This change detects such cases proactively and reports them with a
clear recommendation to use class-based proxying when it comes to
@Controller's. This is the most optimcal approach for controllers
in many respects, also allows @MVC annotations to remain on the
class.

The documentation has also been updated to have a specific section
on @Controller's and AOP proxying providing the same advice.

Issue:SPR-11281
2014-02-11 12:25:54 -05:00
Rossen Stoyanchev
12598f8581 Fix issue w/ use of UrlPathHelper's urlDecode property
Before this change the getPathWithinServletMapping method of
UrlPathHelper could not work properly when a default servlet mapping
(i.e. "/") was used in combination with urlDecode=false. The fact that
the getServletPath() method of HttpServletRequest always returns a
decoded path was getting in the way.

Although there is no way to check Servlet mappings through the Servlet
API, this change aims to detect the given scenario and returns the full
path following the context path thus avoiding URL decoding.

Note that the same can be achieved by setting urlDecode=false and
alwaysUseFullPath=true. However this change ensures that urlDecode
works properly without having to know that.

Issue: SPR-11101
2014-02-10 21:08:57 -05:00
Rob Winch
14616a445a Update javadoc to conform to JDK8 styling
Issue: SPR-11412
2014-02-10 15:07:34 -06:00
Sam Brannen
b4f1a4c6dc Merge pull request #458 from abobov/master
Fix example in Javadoc for ResultActions.andExpect()
2014-02-10 15:23:48 +01:00
Anton Bobov
1cf38a98a4 Fixed example in JavaDoc.
mimeType is not a valid method on ContentResultMatche.

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.
2014-02-10 14:23:10 +06:00
Sam Brannen
ac22b786be Delete unused imports 2014-02-09 18:58:41 +01:00
Juergen Hoeller
57c4eca039 Revised ExcelViewTests 2014-02-09 01:34:34 +01:00
Juergen Hoeller
53aab24690 Polishing 2014-02-09 01:08:56 +01:00
Juergen Hoeller
74ad2081aa Upgraded to JasperReports 5.5.1 2014-02-09 01:08:45 +01:00
Sam Brannen
f77bf2422e Polish Javadoc for LookupOverride and related code 2014-02-09 00:30:44 +01:00
Sam Brannen
c335e99e3f Remove trailing whitespace from source code 2014-02-08 17:30:39 +01:00
Sam Brannen
1f778530b5 Polish test classes
- Consistent importing of org.junit.Assert.*;
- Proper declaration of expected exceptions via @Test(expected).
- Renamed SpEL ExpressionTestCase to AbstractExpressionTests.
- Formatting and test method naming conventions.
2014-02-08 17:24:11 +01:00
Sam Brannen
f717b55035 Fix test bug related to legacy JUnit AssertionFailedError
AssertionFailedError was thrown by JUnit 3.8. Since RedirectViewTests
has been upgraded to JUnit 4, now standard java.lang.AssertionErrors are
thrown. Thus, attempting to catch an AssertionFailedError is futile.

Of course, since these tests have not been failing, it is likely a moot
point, but changing the try-catch blocks to catch a possible
AssertionError can't be a bad thing.
2014-02-08 16:14:26 +01:00
Sam Brannen
08842f3fdf Delete legacy JUnit 3.8 test from spring-test 2014-02-08 15:50:04 +01:00
Sam Brannen
2d5c5fc18e Delete legacy JUnit 3.8 test from spring-test 2014-02-08 15:49:07 +01:00
Juergen Hoeller
8c0e3040c2 Polishing 2014-02-07 18:06:13 +01:00
Juergen Hoeller
749b65b0b2 Polishing 2014-02-07 17:42:37 +01:00
Juergen Hoeller
99f9dce14a Fixed all List return types to ? instead of Object, restoring backwards compatibility with existing Spring 3.2.x based code and allowing easier casts to other element types
Also declaring findByExample generically based on the given example object's type.

Issue: SPR-11402
2014-02-07 17:39:55 +01:00
Juergen Hoeller
919d6ccb3b Actually log the cause of canRead/canWrite failures
Issue: SPR-11403
2014-02-07 17:27:17 +01:00
Juergen Hoeller
9a8f860318 Fixed broken link to jax-ws-commons website
Issue: SPR-11404
2014-02-07 17:24:47 +01:00
Juergen Hoeller
631b07aef8 Upgraded to Commons FileUpload 1.3.1 2014-02-07 17:23:31 +01:00
Sam Brannen
de5b7a378b Fix grammar and update link in Javadoc for SimpleThreadScope 2014-02-07 12:27:35 +01:00
Sam Brannen
f1d146f305 Merge pull request #457 from mebigfatguy/master
Fix typo in log output for SimpleThreadScope
2014-02-07 12:15:06 +01:00
Dave Brosius
cdd2324ab5 fix log spelling typo 2014-02-06 19:58:20 -05:00
Rossen Stoyanchev
42d0470d94 Improve expanding in MvcUriComponentsBuilder
Before this change MvcUriComponentsBuilder could not create a
UriComponentsBuilder for methods where the mapping has a URI variable
and no matching method argument for it.

For example a URI variable may be in the type-level mapping but not
all methods may have an @PathVariable argument for it.

This fix addresses the shortcoming such that MvcUriComponentsBuilder
expands the method argument values available to it and leaves remaining
URI variables to be further expanded via UriComponents.expand().

Issue: SPR-11391
2014-02-06 16:55:19 -05:00
Rossen Stoyanchev
bdb742b8db Polish MvcUriComponentsBuilder
Issue: SPR-11391
2014-02-06 16:55:19 -05:00
Juergen Hoeller
09e2e5897d Removed outdated hibernate3 references across the codebase
Issue: SPR-9028
2014-02-06 22:15:59 +01:00
Juergen Hoeller
2410e29dda Introduced OpenSessionInterceptor as a streamlined alternative to HibernateInterceptor
Issue: SPR-9028
2014-02-06 22:13:52 +01:00
Sam Brannen
7566ceb5f2 Fix minor typo in testing chapter 2014-02-06 21:47:42 +01:00
Sam Brannen
9a6252d715 Fix formatting in 'TCF support classes' section of ref
This commit fixes some formatting issues in the 'TestContext Framework
support classes' section of the reference manual that were introduced
in the conversion from DocBook to AsciiDoc.
2014-02-06 21:12:00 +01:00