Skip to content

Commit

Permalink
Remove a few unnecessary @NotNull annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Jan 16, 2024
1 parent 08d8525 commit e6019c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/main/java/org/openrewrite/kotlin/Assertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


import org.intellij.lang.annotations.Language;
import org.jetbrains.annotations.NotNull;
import org.openrewrite.*;
import org.openrewrite.internal.ThrowingConsumer;
import org.openrewrite.internal.lang.Nullable;
Expand Down Expand Up @@ -248,7 +247,6 @@ public Space visitSpace(Space space, KSpace.Location loc, Integer integer) {
return next(space);
}

@NotNull
private Space next(Space space) {
if (!space.getComments().isEmpty()) {
return space;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import lombok.AllArgsConstructor;
import lombok.Data;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.KtFakeSourceElement;
import org.jetbrains.kotlin.KtRealPsiSourceElement;
import org.jetbrains.kotlin.KtSourceElement;
Expand Down Expand Up @@ -133,7 +132,7 @@ public static String printFirFile(FirFile file) {
TreePrinterContext context = new TreePrinterContext(lines, 1);
new FirDefaultVisitor<Void, TreePrinterContext>() {
@Override
public Void visitElement(@NotNull FirElement firElement, TreePrinterContext ctx) {
public Void visitElement(FirElement firElement, TreePrinterContext ctx) {
StringBuilder line = new StringBuilder();
line.append(leftPadding(ctx.getDepth()))
.append(printFirElement(firElement));
Expand Down Expand Up @@ -164,7 +163,7 @@ public static String printFirTree(FirElement firElement) {
TreePrinterContext context = new TreePrinterContext(lines, 1);
new FirDefaultVisitor<Void, TreePrinterContext>() {
@Override
public Void visitElement(@NotNull FirElement fir, TreePrinterContext ctx) {
public Void visitElement(FirElement fir, TreePrinterContext ctx) {
StringBuilder line = new StringBuilder();
line.append(leftPadding(ctx.getDepth()))
.append(printFirElement(fir));
Expand All @@ -190,7 +189,7 @@ public Void visitElement(@NotNull FirElement fir, TreePrinterContext ctx) {
}

public static class IrPrinter {
public void printElement(@NotNull IrElement element, @NotNull PsiTreePrinter.TreePrinterContext ctx) {
public void printElement(IrElement element, PsiTreePrinter.TreePrinterContext ctx) {
StringBuilder line = new StringBuilder();
line.append(leftPadding(ctx.getDepth()))
.append(printIrElement(element));
Expand Down

0 comments on commit e6019c0

Please sign in to comment.