165 Commits

Author SHA1 Message Date
Phillip Webb
9543fcf44d Upgrade to spring-javaformat 0.0.6 2018-08-30 15:59:27 -07:00
Johnny Lim
9fba2c4a62 Remove carriage returns in TypeUtils.getJavaDoc()
Closes gh-13779
2018-07-16 14:11:32 +02:00
Stephane Nicoll
e556c04d83 Remove class file 2018-07-13 09:21:27 +02:00
Stephane Nicoll
6602fa3c90 Clean line breaks in configuration metadata descriptions.
Closes gh-13601
2018-07-13 09:19:17 +02:00
Stephane Nicoll
36605b3b49 Polish
See gh-13534
2018-06-21 09:16:44 +02:00
Phillip Webb
37646517cf Polish 2018-05-21 15:17:42 -07:00
Stephane Nicoll
563d7d70a2 Polish "Respect lombok.AccessLevel attributes"
Closes gh-13175
2018-05-16 13:12:16 +02:00
Jonas Keßler
3699132cf0 Respect lombok.AccessLevel attributes
See gh-13175
2018-05-16 09:54:50 +02:00
Phillip Webb
99dad81e9a Update copyright header year for changed files 2018-05-04 12:15:13 -07:00
Phillip Webb
0a0247975c Formatting 2018-05-04 12:00:50 -07:00
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
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
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
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01: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
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
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
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
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
Phillip Webb
6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb
4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb
bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Stephane Nicoll
f84fd19eaa Polish contribution
Closes gh-7491
2016-11-29 15:20:53 +01:00
Hrishikesh Joshi
b3220985bb Detect default values defined in the parent
Closes gh-5434
2016-11-29 15:20:10 +01:00
Andy Wilkinson
22e456a177 Merge branch '1.4.x' into 1.5.x 2016-11-15 13:14:30 +00:00
Andy Wilkinson
c2730ac63f Polish formatting and address warnings 2016-11-15 11:48:35 +00:00
Phillip Webb
5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb
57d5a2ebc6 Formatting 2016-10-31 11:41:45 -07:00