Skip to content

Commit

Permalink
script jar and annotation add
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahiatul Islam committed Apr 5, 2024
1 parent 103430b commit 9cd32a1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
import java.util.ListIterator;
import java.util.NoSuchElementException;

import org.checkerframework.checker.nullness.qual.NonNull;

Check failure on line 38 in core/src/main/java/org/apache/calcite/util/ImmutableIntList.java

View workflow job for this annotation

GitHub Actions / macOS (JDK 14)

[Task :core:compileJava] package org.checkerframework.checker.nullness.qual does not exist
import org.checkerframework.checker.nullness.qual.Nullable;

Check failure on line 39 in core/src/main/java/org/apache/calcite/util/ImmutableIntList.java

View workflow job for this annotation

GitHub Actions / macOS (JDK 14)

[Task :core:compileJava] package org.checkerframework.checker.nullness.qual does not exist

/**
* An immutable list of {@link Integer} values backed by an array of
* {@code int}s.
Expand Down Expand Up @@ -112,7 +115,7 @@ private static ImmutableIntList copyFromCollection(
return Arrays.hashCode(ints);
}

@Override public boolean equals(Object obj) {
@Override public boolean equals(@Nullable Object obj) {

Check failure on line 118 in core/src/main/java/org/apache/calcite/util/ImmutableIntList.java

View workflow job for this annotation

GitHub Actions / macOS (JDK 14)

[Task :core:compileJava] cannot find symbol @OverRide public boolean equals(@nullable Object obj) { ^ symbol: class Nullable
return this == obj
|| obj instanceof ImmutableIntList
? Arrays.equals(ints, ((ImmutableIntList) obj).ints)
Expand Down
26 changes: 26 additions & 0 deletions specimin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
id 'java-library'
id 'org.checkerframework' version '0.6.37'
}

apply plugin: 'org.checkerframework'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
repositories {
mavenCentral()
}
checkerFramework {
checkers = [
'org.checkerframework.checker.nullness.NullnessChecker'
]
excludeTests = true
incrementalize = false
}
dependencies {
compileOnly 'org.checkerframework:checker-qual:3.6.0'
checkerFramework 'org.checkerframework:checker:3.6.0'
}
Binary file added specimin/checker-qual.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions specimin/expected_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ImmutableIntList.java:120: error: [contracts.conditional.postcondition.not.satisfied] the conditional postcondition about 'EnsuresNonNullIf' at this return statement is not satisfied
return this == obj
^
1 change: 1 addition & 0 deletions specimin/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'calcite'

0 comments on commit 9cd32a1

Please sign in to comment.