Skip to content

[RestrictTo] @RestrictTo cannot be used outside the support library #812

@vanniktech

Description

@vanniktech

The following class gets flagged:

@RestrictTo(LIBRARY) public final class Utils {
  public static void raiseEvent(final GeoFire geoFire, final Runnable runnable) {
    geoFire.raiseEvent(runnable);
  }

  private Utils() {
    throw new AssertionError("No instances.");
  }
}

with [RestrictTo] @RestrictTo cannot be used outside the support library. The package of the utility class is com.firebase.geofire while all of the other things are in a different package. I basically need the Utility class to call a package private function. Is this a false positive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions