1717
1818package pl .project13 .core ;
1919
20+ import org .jspecify .annotations .NonNull ;
21+ import org .jspecify .annotations .Nullable ;
2022import pl .project13 .core .cibuild .BuildServerDataProvider ;
2123import pl .project13 .core .git .GitDescribeConfig ;
2224import pl .project13 .core .log .LogInterface ;
2325import pl .project13 .core .util .BuildFileChangeListener ;
2426import pl .project13 .core .util .GitDirLocator ;
2527
26- import javax .annotation .Nonnull ;
27- import javax .annotation .Nullable ;
2828import java .io .File ;
2929import java .nio .charset .Charset ;
3030import java .nio .file .Path ;
@@ -55,14 +55,14 @@ default Map<String, String> getSystemEnv() {
5555 /**
5656 * @return Logging Interface
5757 */
58- @ Nonnull
58+ @ NonNull
5959 LogInterface getLogInterface ();
6060
6161 /**
6262 * @return The date format to be used for any dates exported by this plugin.
6363 * It should be a valid {@link SimpleDateFormat} string.
6464 */
65- @ Nonnull
65+ @ NonNull
6666 String getDateFormat ();
6767
6868 /**
@@ -74,15 +74,15 @@ default Map<String, String> getSystemEnv() {
7474 *
7575 * @return The timezone used in the date format of dates exported by this plugin.
7676 */
77- @ Nonnull
77+ @ NonNull
7878 String getDateFormatTimeZone ();
7979
8080 /**
8181 * The prefix to expose the properties on. For example {@code 'git'} would allow you to access {@code ${git.branch}}.
8282 *
8383 * @return The prefix to expose the properties on.
8484 */
85- @ Nonnull
85+ @ NonNull
8686 String getPrefixDot ();
8787
8888 /**
@@ -297,7 +297,7 @@ default Map<String, String> getSystemEnv() {
297297
298298 protected static final Pattern allowedCharactersForEvaluateOnCommit = Pattern .compile ("[a-zA-Z0-9\\ _\\ -\\ ^\\ /\\ .]+" );
299299
300- public static void runPlugin (@ Nonnull Callback cb , @ Nullable Properties contextProperties ) throws GitCommitIdExecutionException {
300+ public static void runPlugin (@ NonNull Callback cb , @ Nullable Properties contextProperties ) throws GitCommitIdExecutionException {
301301 PropertiesFilterer propertiesFilterer = new PropertiesFilterer (cb .getLogInterface ());
302302
303303 // The properties we store our data in and then expose them.
@@ -334,7 +334,7 @@ public static void runPlugin(@Nonnull Callback cb, @Nullable Properties contextP
334334 cb .performPublishToAllSystemEnvironments (properties );
335335 }
336336
337- protected static void loadBuildData (@ Nonnull Callback cb , @ Nonnull Properties properties ) throws GitCommitIdExecutionException {
337+ protected static void loadBuildData (@ NonNull Callback cb , @ NonNull Properties properties ) throws GitCommitIdExecutionException {
338338 Map <String , Supplier <String >> additionalProperties = Collections .singletonMap (
339339 GitCommitPropertyConstant .BUILD_VERSION , cb .supplyProjectVersion ());
340340 BuildServerDataProvider buildServerDataProvider = BuildServerDataProvider .getBuildServerProvider (
@@ -349,7 +349,7 @@ protected static void loadBuildData(@Nonnull Callback cb, @Nonnull Properties pr
349349 buildServerDataProvider .loadBuildData (properties , cb .getReproducibleBuildOutputTimestamp ());
350350 }
351351
352- protected static void loadGitData (@ Nonnull Callback cb , @ Nonnull Properties properties ) throws GitCommitIdExecutionException {
352+ protected static void loadGitData (@ NonNull Callback cb , @ NonNull Properties properties ) throws GitCommitIdExecutionException {
353353 String evaluateOnCommit = cb .getEvaluateOnCommit ();
354354 if ((evaluateOnCommit == null ) || !allowedCharactersForEvaluateOnCommit .matcher (evaluateOnCommit ).matches ()) {
355355 throw new GitCommitIdExecutionException ("suspicious argument for evaluateOnCommit, aborting execution!" );
@@ -375,9 +375,9 @@ protected static void loadGitData(@Nonnull Callback cb, @Nonnull Properties prop
375375 }
376376
377377 private static void loadGitDataWithNativeGit (
378- @ Nonnull Callback cb ,
379- @ Nonnull File dotGitDirectory ,
380- @ Nonnull Properties properties ) throws GitCommitIdExecutionException {
378+ @ NonNull Callback cb ,
379+ @ NonNull File dotGitDirectory ,
380+ @ NonNull Properties properties ) throws GitCommitIdExecutionException {
381381 GitDataProvider nativeGitProvider = NativeGitProvider
382382 .on (dotGitDirectory , cb .getNativeGitTimeoutInMs (), cb .getLogInterface ());
383383
@@ -387,9 +387,9 @@ private static void loadGitDataWithNativeGit(
387387 }
388388
389389 private static void loadGitDataWithJGit (
390- @ Nonnull Callback cb ,
391- @ Nonnull File dotGitDirectory ,
392- @ Nonnull Properties properties ) throws GitCommitIdExecutionException {
390+ @ NonNull Callback cb ,
391+ @ NonNull File dotGitDirectory ,
392+ @ NonNull Properties properties ) throws GitCommitIdExecutionException {
393393 GitDataProvider jGitProvider = JGitProvider
394394 .on (dotGitDirectory , cb .getLogInterface ());
395395
@@ -399,9 +399,9 @@ private static void loadGitDataWithJGit(
399399 }
400400
401401 private static void configureCommonProvider (
402- @ Nonnull GitDataProvider provider ,
403- @ Nonnull Callback cb ,
404- @ Nonnull File dotGitDirectory ) {
402+ @ NonNull GitDataProvider provider ,
403+ @ NonNull Callback cb ,
404+ @ NonNull File dotGitDirectory ) {
405405 provider
406406 .setPrefixDot (cb .getPrefixDot ())
407407 .setAbbrevLength (cb .getAbbrevLength ())
@@ -425,7 +425,7 @@ private static void configureCommonProvider(
425425 * Returns null if the project directory is not within the repository or if resolution fails.
426426 */
427427 @ Nullable
428- private static String resolveRelativeModulePath (@ Nonnull Callback cb , @ Nonnull File dotGitDirectory ) {
428+ private static String resolveRelativeModulePath (@ NonNull Callback cb , @ NonNull File dotGitDirectory ) {
429429 try {
430430 // Determine repository work tree
431431 // If dotGitDirectory is named ".git", the work tree is its parent
0 commit comments