Skip to content

Commit

Permalink
Merge branch 'master' into issue-1014
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Aug 17, 2024
2 parents e11cae0 + b37f5f9 commit c87c2ed
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
epVersion: 2.14.0
- os: macos-latest
java: 11
epVersion: 2.29.0
epVersion: 2.30.0
- os: ubuntu-latest
java: 11
epVersion: 2.29.0
epVersion: 2.30.0
- os: windows-latest
java: 11
epVersion: 2.29.0
epVersion: 2.30.0
- os: ubuntu-latest
java: 17
epVersion: 2.29.0
epVersion: 2.30.0
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
run: ./gradlew codeCoverageReport
continue-on-error: true
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.29.0' && github.repository == 'uber/NullAway'
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.30.0' && github.repository == 'uber/NullAway'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.gradle.util.VersionNumber
// The oldest version of Error Prone that we support running on
def oldestErrorProneVersion = "2.14.0"
// Latest released Error Prone version that we've tested with
def latestErrorProneVersion = "2.29.0"
def latestErrorProneVersion = "2.30.0"
// Default to using latest tested Error Prone version
def defaultErrorProneVersion = latestErrorProneVersion
def errorProneVersionToCompileAgainst = defaultErrorProneVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.errorprone.CompilationTestHelper;
import com.uber.nullaway.NullAwayTestsBase;
import java.util.Arrays;
import org.junit.Ignore;
import org.junit.Test;

public class BytecodeGenericsTests extends NullAwayTestsBase {
Expand Down Expand Up @@ -222,6 +223,25 @@ public void overrideReturnTypes() {
.doTest();
}

@Test
@Ignore("Failing due to https://bugs.openjdk.org/browse/JDK-8337795")
// TODO Re-enable this test once the JDK bug is fixed, on appropriate JDK versions
// See https://github.com/uber/NullAway/issues/1011
public void callMethodTakingJavaUtilFunction() {
makeHelper()
.addSourceLines(
"Test.java",
"package com.uber;",
"import org.jspecify.annotations.Nullable;",
"import com.uber.lib.generics.JavaUtilFunctionMethods;",
"class Test {",
" static void testNegative() {",
" JavaUtilFunctionMethods.withFunction(s -> { return null; });",
" }",
"}")
.doTest();
}

private CompilationTestHelper makeHelper() {
return makeTestHelperWithArgs(
Arrays.asList(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.uber.lib.generics;

import java.util.function.Function;
import org.jspecify.annotations.Nullable;

public class JavaUtilFunctionMethods {

public static void withFunction(Function<String, @Nullable String> f) {}
}

0 comments on commit c87c2ed

Please sign in to comment.