mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Make codegen default to jspecify NonNull annotations (#1607)
With JSpecify now a dependency of pkl-config-java, this moves the non-null annotation to jspecify's. This makes it simpler for users to do nullness checks, as tooling already understands JSpecify nullness annotations.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,8 +21,16 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/** Indicates that a type does not accept {@code null} as a value. */
|
||||
/**
|
||||
* Indicates that a type does not accept {@code null} as a value.
|
||||
*
|
||||
* <p>This annotation is deprecated, and any usage should be replaced with {@link
|
||||
* org.jspecify.annotations.NonNull}.
|
||||
*
|
||||
* @deprecated since 0.32.0
|
||||
*/
|
||||
@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Documented
|
||||
@Deprecated(forRemoval = true)
|
||||
public @interface NonNull {}
|
||||
|
||||
Reference in New Issue
Block a user