196 Commits

Author SHA1 Message Date
Phillip Webb
64930d4e5b Polish caught exception names
Prefer `ex` over `e`.
2018-05-03 09:46:15 -07:00
Phillip Webb
3ee777e142 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
2018-05-03 09:46:15 -07:00
Stephane Nicoll
dd3f57d816 Avoid potentially mutating item metadata collection
Closes gh-13027
2018-05-02 15:55:29 +02:00
Spring Buildmaster
c10aad165f Next Development Version 2018-04-09 23:14:33 +00:00
Spring Buildmaster
ade4760842 Next Development Version 2018-04-05 09:01:52 +00:00
Phillip Webb
a8f366a554 Fix copyright header for edited files 2018-03-16 15:07:23 -07:00
Stephane Nicoll
b4a7e1d64b Use toLowerCase() and toUpperCase() with Locale.ENGLISH
This commit updates all `toLowerCase()` and `toUpperCase` invocations to
use the variant that takes a `Locale` to avoid locale-specific side
effect.

Closes gh-12213
2018-02-26 17:49:03 +01:00
Phillip Webb
798522d890 Format with Eclipse Oxygen SR2 2018-02-08 15:46:49 -08:00
Spring Buildmaster
6414b42335 Next Development Version 2018-01-30 23:29:33 +00:00
Phillip Webb
61f7bd8576 Polish 2018-01-30 12:37:40 -08:00
Stephane Nicoll
f86b44f2ec Reduce StringBuilder creation in TypeExtractor.visitDeclared()
Closes gh-11845
2018-01-30 16:40:32 +01:00
Phillip Webb
8e783cdae9 Polish 2018-01-18 21:42:11 -08:00
Stephane Nicoll
71ab5dd748 Restore proper handling of array types
Closes gh-11512
2018-01-18 22:07:49 +01:00
Stephane Nicoll
927c2cacfa Rework type generation algorithm
The initial solution to gh-11512 was still using a plain `toString` that
could potentially break with a JDK upgrade. Turns out that JDK9 actually
uses the same type for AnnotatedType and ClassType so the trick of using
a visitor doesn't work anymore.

Retrospectively, it is quite easy to generate the full type once we have
the DeclaredType as we already have some logic to get the qualified,
that is raw, type and we have access to the type parameters.

This commit still uses a `toString` to generate the representation of
the type parameters but this looks much safer than trying to redo what
such a simple `toString` should do. Also, the additional metadata that
we could get on an ExecutableElement does not apply to them.

Closes gh-11512
2018-01-18 13:52:12 +01:00
Stephane Nicoll
d8b1f1692a Fix type detection with annotated getter
This commit makes sure that the `type` of a property is generated
property if the getter of the property is annotated. Previously, a type
implementation may expose the annotation information.

Closes gh-11512
2018-01-17 13:30:57 +01:00
Phillip Webb
700d3c3907 Relocate shaded JSON API in annotation-processor
Move the 'shade' copy of the JSON API to a separate src folder to make
it clearer that we don't own the code. Also polished some formatting
and suppressed a few warnings.

Closes gh-10307
2018-01-08 12:24:19 -08:00
Stephane Nicoll
b9f4fd0b65 Fix exclude filter to not exclude MediaType
This commit removes MediaType from the list of exclude types as it looks
like an error: MediaType has a constructor taking a `String` and binding
works fine with it.

This has the effect of properly generating the metadata for the only key
that Spring Boot exposes with a MediaType type:
spring.data.rest.default-media-type.

Closes gh-11568
2018-01-08 17:44:32 +01:00
Stephane Nicoll
4568f14c71 Fix javadoc warnings 2018-01-08 15:55:24 +01:00
Stephane Nicoll
d49b022ce3 Shade json in configuration processor
This commit shades the json API in the configuration processor so that
it doesn't bring `android-json` to the classpath anymore.

Closes gh-10307
2018-01-04 10:10:56 +01:00
Phillip Webb
2c429ba77d Restore static final formatting
Restore static final constants to upper case formatting.

See gh-10457
2017-12-13 12:21:57 -08:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Andy Wilkinson
e0be40cd94 Polish "Locate additional metadata when using Gradle 4"
Closes gh-9732
2017-07-25 16:48:46 +01:00
Misagh Moayyed
980b83c0d8 Locate additional metadata when using Gradle 4
Closes gh-9758
2017-07-25 16:48:27 +01:00
Andy Wilkinson
59122358d3 Clean up and format code 2017-06-16 08:58:14 +01:00
Stephane Nicoll
acda4f905f Add support for deprecation level
This commit ensures that deprecation level set in manual metadata is
properly merged in the generated one.

Closes gh-9449
2017-06-14 09:28:59 +02:00
Spring Buildmaster
05d4d0281c Next Development Version 2017-06-08 12:47:16 +00:00
Stephane Nicoll
643dea18ee Accommodate with Lombok generation ordering
Previously, if lombok was running before the configuration metadata
annotation processor, duplicated keys were created as both the
getter/setter and the special lombok handling applied.

This commit makes sure to be lenient by removing duplicate metadata
entries. This commit also makes sure to identify the getter of a
nested group if present. That way, the sourceMethod is set consistently
and avoid the creation of a duplicate group.

Closes gh-8886
2017-05-12 16:48:31 +02:00
Spring Buildmaster
9768b0a8c2 Next Development Version 2017-04-21 08:32:01 +00:00
Spring Buildmaster
d23fa24340 Next Development Version 2017-03-03 16:18:26 +00:00
Phillip Webb
ca1540cefe Update header copyright for changed files 2017-02-27 20:41:18 -08:00
Phillip Webb
47fd5f4fac Merge branch '1.4.x' into 1.5.x 2017-02-27 14:00:46 -08:00
Phillip Webb
47b00c086c Polish 2017-02-27 13:56:17 -08:00
Spring Buildmaster
5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Andy Wilkinson
20c1370107 Correct the scope of the spring-boot-test-support dependency
Closes gh-8136
2017-01-30 13:15:49 +00:00
Spring Buildmaster
a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Spring Buildmaster
ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Madhura Bhave
ca435512c0 Introduce spring-boot-autoconfigure-processor
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.

The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.

See gh-7573
2017-01-23 22:14:56 -08:00
Phillip Webb
6bc37c0589 Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.
(cherry-picked from 4cb7d86aec5)

Fixes gh-7882
2017-01-05 10:44:48 -08:00
Stephane Nicoll
c06ff7061f Revert Shade annotation processor dependencies
This commit reverts 45d5b60

See gh-7883
2017-01-05 17:04:34 +01:00
Phillip Webb
45d5b60f6d Shade annotation processor dependencies
Update the annotation processor to be completely self contained. The
single required dependency is now "shaded" into the jar.

Fixes gh-7883
2017-01-04 23:02:24 -08:00
Phillip Webb
cc7c2ebb87 Migrate to android-json
Migrate from `org.json:json` to the clean room Apache 2.0 licensed
version that was developed for Android.

Fixes gh-5929
2017-01-04 23:00:06 -08:00
Phillip Webb
4cb7d86aec Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.

Fixes gh-7882
2017-01-04 22:58:28 -08:00
Phillip Webb
aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Spring Buildmaster
9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb
6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00