Skip to content

Commit c9de458

Browse files
committed
Replace JSR305 with JSpecify
1 parent bb2be8a commit c9de458

File tree

5 files changed

+20
-37
lines changed

5 files changed

+20
-37
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676

7777
<dependencies>
7878
<dependency>
79-
<groupId>com.google.code.findbugs</groupId>
80-
<artifactId>jsr305</artifactId>
81-
<version>3.0.2</version>
79+
<groupId>org.jspecify</groupId>
80+
<artifactId>jspecify</artifactId>
81+
<version>1.0.0</version>
8282
<scope>provided</scope>
8383
</dependency>
8484
<dependency>

src/main/java/net/ltgt/gwt/maven/CommandLine.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import java.nio.file.Paths;import java.util.List;
55
import java.util.Map;
66

7-
import javax.annotation.Nullable;
8-
97
import org.apache.maven.execution.MavenSession;
108
import org.apache.maven.plugin.MojoExecutionException;
119
import org.apache.maven.plugin.logging.Log;
@@ -17,6 +15,7 @@
1715
import org.codehaus.plexus.util.cli.CommandLineUtils;
1816
import org.codehaus.plexus.util.cli.Commandline;
1917
import org.codehaus.plexus.util.cli.StreamConsumer;
18+
import org.jspecify.annotations.Nullable;
2019

2120
class CommandLine {
2221
private final Log log;
@@ -91,8 +90,7 @@ private String getExecutable() {
9190
return Paths.get(System.getProperty("java.home"), "bin", "java").toString();
9291
}
9392

94-
@Nullable
95-
private Toolchain getToolchain() {
93+
private @Nullable Toolchain getToolchain() {
9694
Toolchain tc = null;
9795
if (toolchainRequirements != null && !toolchainRequirements.isEmpty()) {
9896
List<Toolchain> tcs = toolchainManager.getToolchains(session, "jdk", toolchainRequirements);

src/main/java/net/ltgt/gwt/maven/CompileMojo.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import java.util.Map;
99
import java.util.Set;
1010

11-
import javax.annotation.Nullable;
12-
1311
import org.apache.maven.artifact.Artifact;
1412
import org.apache.maven.artifact.DependencyResolutionRequiredException;
1513
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
@@ -27,6 +25,7 @@
2725
import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
2826
import org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping;
2927
import org.codehaus.plexus.util.StringUtils;
28+
import org.jspecify.annotations.Nullable;
3029

3130
/**
3231
* Invokes the GWT Compiler on the project's sources and resources.
@@ -320,21 +319,18 @@ private String getModuleShortName() {
320319
return moduleShortName;
321320
}
322321

323-
@Nullable
324322
@Override
325-
public String getLogLevel() {
323+
public @Nullable String getLogLevel() {
326324
return logLevel;
327325
}
328326

329-
@Nullable
330327
@Override
331-
public String getStyle() {
328+
public @Nullable String getStyle() {
332329
return style;
333330
}
334331

335-
@Nullable
336332
@Override
337-
public Integer getOptimize() {
333+
public @Nullable Integer getOptimize() {
338334
return optimize;
339335
}
340336

@@ -353,9 +349,8 @@ public File getDeployDir() {
353349
return deploy;
354350
}
355351

356-
@Nullable
357352
@Override
358-
public File getExtraDir() {
353+
public @Nullable File getExtraDir() {
359354
return extra;
360355
}
361356

@@ -364,15 +359,13 @@ public boolean isDraftCompile() {
364359
return draftCompile;
365360
}
366361

367-
@Nullable
368362
@Override
369-
public String getLocalWorkers() {
363+
public @Nullable String getLocalWorkers() {
370364
return localWorkers;
371365
}
372366

373-
@Nullable
374367
@Override
375-
public String getSourceLevel() {
368+
public @Nullable String getSourceLevel() {
376369
return sourceLevel;
377370
}
378371
}

src/main/java/net/ltgt/gwt/maven/GwtOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import java.util.ArrayList;
55
import java.util.List;
66

7-
import javax.annotation.Nullable;
8-
97
import org.apache.maven.plugin.logging.Log;
8+
import org.jspecify.annotations.Nullable;
109

1110
public interface GwtOptions {
1211

src/main/java/net/ltgt/gwt/maven/TestMojo.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import java.util.List;
99
import java.util.Map;
1010

11-
import javax.annotation.Nullable;
12-
1311
import org.apache.maven.artifact.Artifact;
1412
import org.apache.maven.model.Resource;
1513
import org.apache.maven.plugin.MojoExecutionException;
@@ -24,6 +22,7 @@
2422
import org.apache.maven.plugins.annotations.ResolutionScope;
2523
import org.apache.maven.surefire.api.suite.RunResult;
2624
import org.apache.maven.surefire.extensions.ForkNodeFactory;
25+
import org.jspecify.annotations.Nullable;
2726

2827
/**
2928
* Runs the project's tests with the specific setup needed for {@code GWTTestCase} tests.
@@ -1004,21 +1003,18 @@ public void setEncoding(String encoding) {
10041003

10051004
// GwtOptions
10061005

1007-
@Nullable
10081006
@Override
1009-
public String getLogLevel() {
1007+
public @Nullable String getLogLevel() {
10101008
return logLevel;
10111009
}
10121010

1013-
@Nullable
10141011
@Override
1015-
public String getStyle() {
1012+
public @Nullable String getStyle() {
10161013
return style;
10171014
}
10181015

1019-
@Nullable
10201016
@Override
1021-
public Integer getOptimize() {
1017+
public @Nullable Integer getOptimize() {
10221018
return optimize;
10231019
}
10241020

@@ -1037,9 +1033,8 @@ public File getDeployDir() {
10371033
return deploy;
10381034
}
10391035

1040-
@Nullable
10411036
@Override
1042-
public File getExtraDir() {
1037+
public @Nullable File getExtraDir() {
10431038
return extra;
10441039
}
10451040

@@ -1048,15 +1043,13 @@ public boolean isDraftCompile() {
10481043
return draftCompile;
10491044
}
10501045

1051-
@Nullable
10521046
@Override
1053-
public String getLocalWorkers() {
1047+
public @Nullable String getLocalWorkers() {
10541048
return localWorkers;
10551049
}
10561050

1057-
@Nullable
10581051
@Override
1059-
public String getSourceLevel() {
1052+
public @Nullable String getSourceLevel() {
10601053
return sourceLevel;
10611054
}
10621055
}

0 commit comments

Comments
 (0)