Refine search
/** * Creates a new LocalPluginManager * @param rootDir Jenkins home directory. */ public LocalPluginManager(@NonNull File rootDir) { this(null, rootDir); }
/** * Creates a new LocalPluginManager * @param context Servlet context. Provided for compatibility as {@code Jenkins.getInstance().servletContext} should be used. * @param rootDir Jenkins home directory. */ public LocalPluginManager(@CheckForNull ServletContext context, @NonNull File rootDir) { super(context, new File(rootDir,"plugins")); }
void foo(@CheckForNull Object o) { @NonNull Object l = o; } }
@Override public void f(@NonNull Object obj, @CheckForNull Object obj2); }
@NonNull T set2(@CheckForNull T o); }
/** * Extract a Cell. * @return a parsed Cell or throws an Exception. EOFException or a generic IOException maybe * thrown if EOF is reached prematurely. Does not return null. * @throws IOException */ @NonNull protected abstract Cell parseCell() throws IOException;
public class TestFieldAnnotations { @NonNull Object x; @CheckForNull Object y;
@Override @CheckForNull @ExpectWarning("NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION,NP_METHOD_RETURN_RELAXING_ANNOTATION") public Integer set2(@NonNull Integer o){ return null; } }
/** * the only difference with Works.bar() is that the parameter is * annotated as NonNull */ public void foo(@NonNull Object o) { } }
@Override @CheckForNull @ExpectWarning("NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION,NP_METHOD_RETURN_RELAXING_ANNOTATION") public Integer set2(@NonNull Integer o){ return null; } }
@NonNull public static String nonNullLoop(String[] args) { String ret = null; for (String s : args) { ret = s; } return ret; // no warning reported here }
/** * Constructs an instance that matches the specified java bean property against the supplied value. * * @param name the property name. * @param expected the expected value. */ public BeanPropertyMatcher(@NonNull String name, @CheckForNull T expected) { this.name = name; this.expected = expected; }
@NonNull Object bar() { return null; } }
/** * Our constructor. * * @param divId id of the {@literal <input>} element on the {@code window.opener} of the * pop-up to inject the uploaded content into. * @param uploadedKeystore the content. */ public Upload(@NonNull String divId, @CheckForNull SecretBytes uploadedKeystore) { this.divId = divId; this.uploadedKeystore = uploadedKeystore; }
void foo(Object o) { @NonNull Object l = o; } }
/** * Configures the {@link GitTool#getName()} to use. * * @param gitTool the {@link GitTool#getName()} or {@code null} to use the system default. * @return {@code this} for method chaining. */ @SuppressWarnings("unchecked") @NonNull public final B withGitTool(@CheckForNull String gitTool) { this.gitTool = gitTool; return (B) this; }