Skip to content

Commit

Permalink
Update Errorprone and nullaway
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopatkin committed Nov 10, 2024
1 parent c48a8ee commit 09085a0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static Function<Throwable, Void> exceptionHandler(Runnable consumer) {
* @return the function that adapts the consumer to Void returning type
*/
public static <T> BiFunction<T, @Nullable Throwable, Void> consumingHandler(
BiConsumer<? super @Nullable T, @Nullable ? super Throwable> consumer) {
BiConsumer<? super @Nullable T, ? super @Nullable Throwable> consumer) {
return (r, th) -> {
consumer.accept(r, th);
return null;
Expand All @@ -189,7 +189,7 @@ public static Function<Throwable, Void> exceptionHandler(Runnable consumer) {
* @return the function that adapts the consumers to Void returning type
*/
public static <T> BiFunction<T, @Nullable Throwable, Void> consumingHandler(
Consumer<? super T> valueConsumer, Consumer<@Nullable ? super Throwable> errorConsumer) {
Consumer<? super T> valueConsumer, Consumer<? super Throwable> errorConsumer) {
return (r, th) -> {
if (th != null) {
errorConsumer.accept(th);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.android.ddmlib.MultiLineReceiver;

import org.apache.log4j.Logger;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.io.IOException;
Expand Down Expand Up @@ -137,7 +136,7 @@ private String formatCommandLine() {
return String.join(" ", commandLine);
}

private <@NonNull T extends ForStderr> T getRedirectWithDefault(@Nullable T redirect, T defRedirect) {
private <T extends ForStderr> T getRedirectWithDefault(@Nullable T redirect, T defRedirect) {
if (redirect != null) {
return redirect;
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ sourceJavaVersion = "16"
runtimeJdkVersion = "8" # JDK version used at runtime, determines available APIs

[libraries]
build-errorprone-core = "com.google.errorprone:error_prone_core:2.22.0"
build-errorprone-core = "com.google.errorprone:error_prone_core:2.35.1"
build-errorprone-plugin = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "errorpronePlugin" }
build-jabel = "com.github.bsideup.jabel:jabel-javac-plugin:1.0.0"
build-javapoet = "com.squareup:javapoet:1.13.0"
build-nullaway = "com.uber.nullaway:nullaway:0.10.14"
build-nullaway = "com.uber.nullaway:nullaway:0.12.1"
checkerframeworkAnnotations = "org.checkerframework:checker-qual:3.38.0"
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
dagger-runtime = { module = "com.google.dagger:dagger", version.ref = "dagger" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import com.google.common.base.CharMatcher;
import com.google.common.base.Preconditions;

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

/**
* This class parses a single query and determines whether it is a plain text search or regex. Then it extracts query
* value and asks delegate to create a searcher.
Expand All @@ -35,7 +33,7 @@
*
* @param <T> the type of the searcher to build
*/
public class SearchRequestParser<@NonNull T> {
public class SearchRequestParser<T> {
/**
* Delegate that actually creates a searcher.
*
Expand Down
1 change: 1 addition & 0 deletions src/name/mlopatkin/andlogview/ui/logtable/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public String getStrValue(int rowIndex, LogRecord record) {
return String.valueOf(getValue(rowIndex, record));
}

@SuppressWarnings("EnumOrdinal")
private int getIndex() {
return ordinal();
}
Expand Down

0 comments on commit 09085a0

Please sign in to comment.