Skip to content

Commit ae310c4

Browse files
committed
Initial support for JSpecify
1 parent d8c4895 commit ae310c4

File tree

20 files changed

+262
-24
lines changed

20 files changed

+262
-24
lines changed

.mvn/jvm.config

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom
1+
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom
2+
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
3+
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
4+
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
5+
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
6+
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
7+
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
8+
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
9+
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
10+
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
11+
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<bintray.package>commons</bintray.package>
8888
<evictor.version>1.0.0</evictor.version>
8989
<bouncycastle-bcprov-jdk18on.version>1.81</bouncycastle-bcprov-jdk18on.version>
90+
<jspecify.enabled>true</jspecify.enabled>
9091
</properties>
9192
<build>
9293
<plugins>

spring-cloud-commons-dependencies/pom.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<properties>
1818
<okhttp.version>4.12.0</okhttp.version>
1919
<spring-retry.version>2.0.12</spring-retry.version>
20+
<jspecify.version>0.3.0</jspecify.version>
2021
</properties>
2122
<dependencyManagement>
2223
<dependencies>
@@ -66,12 +67,17 @@
6667
<scope>import</scope>
6768
<type>pom</type>
6869
</dependency>
69-
<dependency>
70-
<groupId>org.springframework.retry</groupId>
71-
<artifactId>spring-retry</artifactId>
72-
<version>${spring-retry.version}</version>
73-
</dependency>
74-
</dependencies>
70+
<dependency>
71+
<groupId>org.springframework.retry</groupId>
72+
<artifactId>spring-retry</artifactId>
73+
<version>${spring-retry.version}</version>
74+
</dependency>
75+
<!-- <dependency>-->
76+
<!-- <groupId>org.jspecify</groupId>-->
77+
<!-- <artifactId>jspecify</artifactId>-->
78+
<!-- <version>${jspecify.version}</version>-->
79+
<!-- </dependency>-->
80+
</dependencies>
7581
</dependencyManagement>
7682
<profiles>
7783
<profile>

spring-cloud-commons/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@
107107
<evictor.version>1.0.0</evictor.version>
108108
</properties>
109109
<dependencies>
110+
<!-- <dependency>-->
111+
<!-- <groupId>org.jspecify</groupId>-->
112+
<!-- <artifactId>jspecify</artifactId>-->
113+
<!-- <optional>true</optional>-->
114+
<!-- </dependency>-->
110115
<dependency>
111116
<groupId>org.springframework.boot</groupId>
112117
<artifactId>spring-boot-configuration-processor</artifactId>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Cloud service discovery abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.client.discovery;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Cloud load balancer abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.client.loadbalancer;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Cloud client abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.client;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Cloud service registry abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.client.serviceregistry;

spring-cloud-commons/src/main/java/org/springframework/cloud/commons/config/CommonsConfigAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
import java.util.HashMap;
2020
import java.util.Map;
2121

22+
import org.jspecify.annotations.Nullable;
23+
2224
import org.springframework.boot.context.properties.source.ConfigurationPropertyName;
2325
import org.springframework.context.annotation.Bean;
2426
import org.springframework.context.annotation.Configuration;
25-
import org.springframework.lang.Nullable;
2627
import org.springframework.util.ObjectUtils;
2728

2829
/**
@@ -34,7 +35,7 @@ public class CommonsConfigAutoConfiguration {
3435

3536
@Bean
3637
public DefaultsBindHandlerAdvisor defaultsBindHandlerAdvisor(
37-
@Nullable DefaultsBindHandlerAdvisor.MappingsProvider[] providers) {
38+
DefaultsBindHandlerAdvisor.@Nullable MappingsProvider @Nullable [] providers) {
3839
Map<ConfigurationPropertyName, ConfigurationPropertyName> additionalMappings = new HashMap<>();
3940
if (!ObjectUtils.isEmpty(providers)) {
4041
for (DefaultsBindHandlerAdvisor.MappingsProvider mappingsProvider : providers) {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2013-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Cloud commons utilities and abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.commons;

0 commit comments

Comments
 (0)