Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Oct 25, 2022
1 parent 8930ae0 commit 20f6293
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tech.picnic.errorprone.bugpatterns.util;

import com.google.errorprone.VisitorState;
import com.google.errorprone.bugpatterns.BugChecker;
import com.google.errorprone.suppliers.Supplier;
import com.sun.tools.javac.code.ClassFinder;
import com.sun.tools.javac.code.Symbol.CompletionFailure;
Expand All @@ -10,8 +11,8 @@
* Utility class that helps decide whether it is appropriate to introduce references to (well-known)
* third-party libraries.
*
* <p>This class should be used by bug checkers that may otherwise suggest the introduction of code
* that depends on possibly-not-present third-party libraries.
* <p>This class should be used by {@link BugChecker}s that may otherwise suggest the introduction
* of code that depends on possibly-not-present third-party libraries.
*/
// XXX: Consider giving users more fine-grained control. This would be beneficial in cases where a
// dependency is on the classpath, but new usages are undesirable.
Expand All @@ -25,14 +26,14 @@ public enum ThirdPartyLibrary {
/**
* Google's Guava.
*
* @see <a href="https://github.com/google/guava">Guava on Github</a>
* @see <a href="https://github.com/google/guava">Guava on GitHub</a>
*/
GUAVA("com.google.common.collect.ImmutableList"),
/**
* New Relic's Java agent API.
*
* @see <a href="https://github.com/newrelic/newrelic-java-agent/tree/main/newrelic-api">New Relic
* Java agent API on Github</a>
* Java agent API on GitHub</a>
*/
NEW_RELIC_AGENT_API("com.newrelic.api.agent.Agent"),
/**
Expand All @@ -57,7 +58,7 @@ public enum ThirdPartyLibrary {
* the given context.
*
* @param state The context under consideration.
* @return {@code true} iff if it is okay to assume or create a dependency on this library.
* @return {@code true} iff it is okay to assume or create a dependency on this library.
*/
public boolean canUse(VisitorState state) {
return canUse.get(state);
Expand Down

0 comments on commit 20f6293

Please sign in to comment.