Commit Graph

6779 Commits

Author SHA1 Message Date
Sam Brannen
96da406057 Upgrade to TestNG 6.8.5
Issue: SPR-10638
2013-06-08 20:21:06 +02:00
Sam Brannen
96e1fbc3bb Polish @Conditional Javadoc and tests 2013-06-08 17:49:54 +02:00
Phillip Webb
239ce1466c Update @Conditional processing logic
Defer @Conditional processing on @Configuration classes until the bean
definitions are loaded, rather than when the @Configuration class is
parsed. This provides better support for @Conditional implementations
that inspect bean definitions.

This commit also fixes some minor problems with original implementation
and replaces the ConditionalAnnotationHelper class with
ConditionEvaluator.

Issue: SPR-10534
2013-06-04 10:27:51 -07:00
Phillip Webb
2ecc51f066 Do not consider all @Components as configuration
Update ConfigurationClassUtils to only consider beans with @Bean
methods as 'lite' configuration candidates.

Prior to this commit all @Component beans were considered 'lite'
configuration candidates which could result in a large number of
ConfigurationClass instance being created that would ultimately be
ignored.

Issue: SPR-10609
2013-06-04 10:26:31 -07:00
Phillip Webb
a8fd832818 Support meta @Component with non-string value
Update AnnotationBeanNameGenerator to only use the value attribute of
a @Component meta-annotated annotation when it is a String.

Issue: SPR-10580
2013-06-04 10:23:23 -07:00
Phillip Webb
5377fae7f5 Remove duplicate Javadoc line from PathResource
Remove duplicate Javadoc comment from PathResource that was
accidentally introduced during the merge.

Issue: SPR-10608
2013-06-03 22:10:57 -07:00
Phillip Webb
5006dcd0ec Merge pull request #295 from marschall/SPR-10608
# By Philippe Marschall
* SPR-10608-rebase:
  Introduce java.nio.file.Path based Resource
2013-06-03 16:25:56 -07:00
Philippe Marschall
2313c9a007 Introduce java.nio.file.Path based Resource
Develop new org.springframework.core.io.Resource implementation
backed by java.nio.file.Path. Primarily developed to allow custom
file system implementations to be used with Spring.

Since the minimum requirement for Spring is still Java 6 the
existing FileSystemResource can't be retrofitted (and no #getPath
method can be added to the Resource interface).

Unlike FileSystemResource, PathResource delegates to the underlying
file system instead of StringUtils. It has therefore slightly
different semantics. First, when building relative resources via
createRelative the relative path will apply to this path (like URL or
Unix). Second, equality is delegated to the underlying file system
provider so it's case-insensitive on Windows.

Issue: SPR-10608
2013-06-03 16:25:45 -07:00
Phillip Webb
1f5467a29d Merge pull request #286 from sslavic/SPR-10571
# By Stevo Slavic
* SPR-10571:
  Replace MaxPermSize use in build scripts
2013-06-03 14:10:33 -07:00
Stevo Slavic
ecf8464d2f Replace MaxPermSize use in build scripts
Since JDK 8 is required to build Spring framework 4, and permanent
generation is gone from Java 8, to eliminate warnings about no longer
available MaxPermSize switch, it should be removed or replaced with new
MaxMetaspaceSize switch.

This fix replaces old with new switch to limit the amount of native
memory used for class metadata.

Issue: SPR-10571
2013-06-03 14:09:33 -07:00
Phillip Webb
4d3383242e Support EnvironmentAware ImportSelector/Registrar
Add support for the EnvironmentAware interface with ImportSelector
and ImportBeanDefinitionRegistrar implementations.

Issue: SPR-10602
2013-06-03 12:19:47 -07:00
Phillip Webb
d7ec20a286 Test for property placeholder with defaults
Test property placeholder with multiple locations and default values.

Issue: SPR-10619
2013-06-03 09:37:43 -07:00
Carson McDonald
ae74a2158a Fix typo {explictly => explicitly}
- cherry-pick of pull request #257, which originally applied to 3.2.x
2013-05-31 08:22:36 +02:00
Rossen Stoyanchev
827e20e37f Upgrade javax.websocket and tyrus dependencies to 1.0 2013-05-30 15:25:01 -04:00
Phillip Webb
e63ee1ee5a Fixed typo in docbook id
Issue: SPR-10394
2013-05-28 14:25:57 -07:00
Chris Beams
ba45f70342 Merge pull request #291 from dsyer/10579
# By Chris Beams (1) and Dave Syer (1)
* SPR-10579:
  Polish pull request #291 per committer guidelines
  Make CommandLinePropertySource enumerable
2013-05-28 13:52:01 +02:00
Chris Beams
46d47fef9a Polish pull request #291 per committer guidelines
- Update Apache license headers
 - Remove trailing whitespace
 - Edit original commit comment to use 'Issue:' syntax
 - Revert use of diamond operator (<>) in main sources

See committer guidelines at
https://github.com/SpringSource/spring-framework/blob/master/CONTRIBUTING.md

Issue: SPR-10579
2013-05-28 13:51:35 +02:00
Dave Syer
7860af8624 Make CommandLinePropertySource enumerable
JOpt 4.4 has enumerable options, so this change can be made
if we upgrade. The only awkward thing is that JOpt allows
aliases for options, so we have to pick one to avoid double
counting. This implementation picks the last one in the list
which is the alphebtically last of the long options, if there
are any (e.g. "o1", "option1" returns "option1"). Most of the
time there will only be one or two aliases for each option so
it won't matter.

Issue: SPR-10579
2013-05-28 12:57:01 +02:00
Chris Beams
3c73a8fc4f Instruct contributors to branch from master 2013-05-28 13:54:14 +03:00
Sam Brannen
00fea1f715 Fix minor typo in README.md 2013-05-26 14:28:37 +02:00
Rob Winch
07b7553355 Fix MergePlugin
The submitted pull requests for SPR-10572 did not build.

This commit fixes the MergePlugin to create from configurations rather
than the project. It also removes unnecessarily added code that was
commented out.

Issue: SPR-10572
2013-05-22 14:57:22 -05:00
Stevo Slavic
bf205bfe79 Eliminate Gradle 1.6 deprecation warnings
Recently Spring framework build has been updated to use Gradle 1.6.
With the new version some of the Gradle APIs have been deprecated.
These deprecated APIs have been used by Spring build specific Gradle
plugins, which resulted in deprecation warnings in build output.

This patch changes Spring build specific Gradle plugins to use new
Gradle APIs instead of deprecated ones.

Even after this change build still produces warnings about Gradle
deprecated APIs being used. These come from Spring shared Gradle
plugins and other 3rd party Gradle plugins in use, like Gradle
Artifactory Plugin (GAP), which are still not updated to Gradle 1.6.
Related tickets for updating of these plugins to Gradle 1.6 are
GRADLE-53 and GAP-144, and once they get resolved Spring framework
build should further be updated.

Issue: SPR-10572
2013-05-22 14:57:21 -05:00
Chris Beams
3865a8706c Revise note on avoiding "lambda" JDK 2013-05-22 10:06:13 +02:00
Chris Beams
eae0f8b53a Merge pull request #288 from dsyer/patch-1
Update README adding explicit JDK instructions
2013-05-22 00:58:23 -07:00
Chris Beams
08f255d746 Mention JDK 8 in IDE import instructions 2013-05-22 09:55:18 +02:00
Chris Beams
d97f6cf5b8 Clarify instructions for building from source
Re-order subsections to make it clear that running a full
`./gradlew build` is not necessary just to import projects
into your IDE or to build and install jars to your .m2 cache.
2013-05-22 09:48:14 +02:00
Dave Syer
c3a5b415cf Update README adding explicit JDK instructions 2013-05-22 09:37:29 +02:00
Spring Buildmaster
f9b5b1df53 Increment version to 4.0.0.BUILD-SNAPSHOT 2013-05-17 09:55:02 -07:00
Spring Buildmaster
9ee292aaf7 Release version 4.0.0.M1 2013-05-16 21:43:41 -07:00
Phillip Webb
6fe50b502f Enforce JDK version on CI server
Add a test to ensure that the CI server does not accidentally build
with the wrong JDK version.

Issue: SPR-10569
2013-05-16 17:06:30 -07:00
Rossen Stoyanchev
87a9602f65 Fix bug in WebSocketClient implementations 2013-05-16 19:12:27 -04:00
Rossen Stoyanchev
fb4e34fce4 Add partial WebSocketMessage support 2013-05-16 12:17:40 -04:00
Juergen Hoeller
814d24e64f Consistent detection of Order annotation in superclasses and interfaces
Issue: SPR-10514
2013-05-16 18:05:56 +02:00
Juergen Hoeller
16548d23e9 Consistent use of Class<?> in Assert 2013-05-16 16:10:36 +02:00
Juergen Hoeller
a19c976f7f Avoid NPE in ContextLoader when dealing with an untyped ApplicationContextInitializer
Issue: SPR-10449
2013-05-16 16:09:54 +02:00
Juergen Hoeller
c8b071c89e Fixed BeanPropertyRowMapper to only prefix actual upper-case letters with underscores
Issue: SPR-10547
2013-05-16 14:33:15 +02:00
Juergen Hoeller
cd3d0c35c3 Replaced Map synchronization with ConcurrentHashMap to avoid session access deadlocks
Issue: SPR-10436
2013-05-16 14:33:14 +02:00
Rossen Stoyanchev
81bce424cb Fix bug with deriving SockJS path 2013-05-15 21:31:51 -04:00
Juergen Hoeller
28164b4b23 Introduced "jsonPrefix" bean property
This change involves a modification of the "writeContent" template method to include the "jsonPrefix" String instead of the "prefixJson" boolean flag. Since said template method has only been introduced in 3.2.2, this change should hopefully not be a problem.

Issue: SPR-10567
2013-05-15 23:54:51 +02:00
Juergen Hoeller
7e01578515 Avoid unnecessary creation of default StandardEnvironment instances
Issue: SPR-10568
2013-05-15 23:41:32 +02:00
Juergen Hoeller
7cddeb6db9 Polishing 2013-05-15 17:19:57 +02:00
Juergen Hoeller
070103b17e Fixed type detection to avoid reuse of parent bean's targetType on child definition merge
Issue: SPR-10374
2013-05-15 16:41:32 +02:00
Juergen Hoeller
3f7007f73a Properly handle knownSuperclasses in case of an overridden ConfigurationClass
Issue: SPR-10546
(cherry picked from commit 6e4317e)
2013-05-15 14:30:32 +02:00
Rob Winch
d1859c8c86 Ensure Parent ConfigurationClass loaded on overrides
Previously ConfigurationClassParser could override a nested
@Configuration without consideration of @Bean's defined in parent
classes.

This commit ensures that if the original ConfigurationClass contains
additional bean definitions it is processed again.

Issue: SPR-10546
(cherry picked from commit 940011e)
2013-05-15 14:24:25 +02:00
Rossen Stoyanchev
a86283eb28 Make removal of jsessionid case insensitive
Issue: SPR-10398
2013-05-14 22:06:59 -04:00
Rossen Stoyanchev
d23de282a6 Reinstate removal of semicolon content
Commit 5b1165 was an attempt to leave semicolon content in the URL path
while ignoring it for request mapping purposes. However, it becomes
quite difficult to manage and semicolon content should not always be
ignored (sometimes a semicolon is used as a separator of multiple items
in a path segment, rather than for matrix variables).

This change effectively reverts back to the original approach in 3.2
where a flag on AbstractHandlerMapping can be used to have semicolon
content removed or kept. If kept, path segments with matrix variables
must be represented with a path segment.

The main difference is that by default it is removed everywhere
including the MVC namespace and Java config.

Issue: SPR-10427, SPR-10234
2013-05-14 21:32:09 -04:00
Rossen Stoyanchev
db596d23de Fix deadlock issue in DeferredResult
Previously DeferredResult locked around the setting of the result
including handling up to the part of submitting a dispatch. This
can cause a deadlock if a timeout occurs at the same time since
the Tomcat timeout thread has its own locking that permits only
one thread to do timeout or dispatch processing.

The fix reduces the locking to cover only the attempt to set the
DeferredResult but not the dispatching.

Issue: SPR-10485
2013-05-14 17:01:46 -04:00
Rossen Stoyanchev
6825aaf41f Add Javadoc 2013-05-14 16:41:47 -04:00
Juergen Hoeller
59ef34d769 Polishing 2013-05-14 21:20:24 +02:00
Juergen Hoeller
5dbbd8fe72 Clarified that CronTrigger never schedules overlapping executions
Issue: SPR-10556
2013-05-14 21:16:04 +02:00