Skip to content

Commit

Permalink
refactor: Migrate to JSpecify (#62)
Browse files Browse the repository at this point in the history
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.jspecify.MigrateFromOpenRewriteAnnotations?organizationId=TW9kZXJuZQ%3D%3D

Co-authored-by: Moderne <team@moderne.io>
Co-authored-by: Tim te Beek <tim@moderne.io>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent f43f6ee commit 43434d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/yourorg/AppendToReleaseNotes.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import lombok.EqualsAndHashCode;
import lombok.Value;
import org.jspecify.annotations.Nullable;
import org.openrewrite.*;
import org.openrewrite.internal.lang.Nullable;
import org.openrewrite.text.PlainText;
import org.openrewrite.text.PlainTextParser;
import org.openrewrite.text.PlainTextVisitor;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/yourorg/NoCollectionMutation.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import fj.data.Option;
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.jspecify.annotations.Nullable;
import org.openrewrite.*;
import org.openrewrite.analysis.dataflow.DataFlowNode;
import org.openrewrite.analysis.dataflow.DataFlowSpec;
import org.openrewrite.analysis.dataflow.Dataflow;
import org.openrewrite.internal.lang.Nullable;
import org.openrewrite.java.JavaTemplate;
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.MethodMatcher;
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/yourorg/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi
@NullMarked
@NonNullFields
package com.yourorg;

// We annotate the package to indicate that fields and methods in this package are non-null by default.
import org.openrewrite.internal.lang.NonNullApi;
import org.jspecify.annotations.NullMarked;
import org.openrewrite.internal.lang.NonNullFields;

0 comments on commit 43434d7

Please sign in to comment.