Skip to content

Commit bd37c84

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

File tree

16 files changed

+235
-18
lines changed

16 files changed

+235
-18
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>
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;
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 auto-configuration classes.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.autoconfigure;
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 bootstrap abstractions.
19+
*/
20+
@org.jspecify.annotations.NullMarked
21+
package org.springframework.cloud.bootstrap;

0 commit comments

Comments
 (0)