@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SECURITY_ATTRIBUTES extends Structure { public int nLength; public Pointer lpSecurityDescriptor; public boolean bInheritHandle; @Override protected List getFieldOrder() { return Arrays.asList("nLength", "lpSecurityDescriptor", "bInheritHandle"); } }
/** * 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")); }
@DischargesObligation @Override public void close() throws IOException { in.close(); }
@SuppressWarnings("unchecked") @SuppressFBWarnings(value = "BC_IMPOSSIBLE_DOWNCAST", justification = "Such casting is generally unsafe, but we use it as a last resort.") private T[] emptyArray_unsafeCast() { return (T[])new Object[0]; }
@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info { public String lpDescription; } }
@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class FILETIME extends Structure { public int dwLowDateTime; public int dwHighDateTime; @Override protected List getFieldOrder() { return Arrays.asList("dwLowDateTime", "dwHighDateTime"); } } }
@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SERVICE_TABLE_ENTRY extends Structure { public String lpServiceName; public SERVICE_MAIN_FUNCTION lpServiceProc; @Override protected List getFieldOrder() { return Arrays.asList(new String[] {"lpServiceName", "lpServiceProc"}); } }
/** * {@inheritDoc} */ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "The array is not to be modified by contract") public byte[] getBytes() { return binaryRepresentation; }
/** * Creates a new explicit resolution of a given array of binary data. * * @param binaryRepresentation The binary data to represent. The array must not be modified. */ @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "The array is not to be modified by contract") public Explicit(byte[] binaryRepresentation) { this.binaryRepresentation = binaryRepresentation; }
/** * Returns the binary representation of the class file that was looked up. The returned array must never be modified. * * @return The binary representation of the class file or {@code null} if no such class file could * be located. */ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "The array is not to be modified by contract") protected byte[] getBinaryRepresentation() { return binaryRepresentation; } }
/** * {@inheritDoc} */ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "The array is not to be modified by contract") public byte[] resolve() { return binaryRepresentation; } }
/** * {@inheritDoc} */ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Value is null") public String[] toInternalNames() { return NO_INTERFACES; }
/** * {@inheritDoc} */ @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Array is guaranteed to be null") public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { return NO_TRANSFORMATION; } }
/** * Creates a lazy projection of a constructor's parameter. * * @param constructor The constructor of which a parameter type is represented. * @param index The parameter's index. * @param erasure The erasure of the parameter type. */ @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "The array is never exposed outside of the class") public OfConstructorParameter(Constructor<?> constructor, int index, Class<?>[] erasure) { this.constructor = constructor; this.index = index; this.erasure = erasure; }
/** * Creates a lazy projection of a constructor's parameter. * * @param method The method of which a parameter type is represented. * @param index The parameter's index. * @param erasure The erasures of the method's parameter types. */ @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "The array is never exposed outside of the class") public OfMethodParameter(Method method, int index, Class<?>[] erasure) { this.method = method; this.index = index; this.erasure = erasure; }
@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SERVICE_STATUS extends Structure { public int dwServiceType; public int dwCurrentState; public int dwControlsAccepted; public int dwWin32ExitCode; public int dwServiceSpecificExitCode; public int dwCheckPoint; public int dwWaitHint; @Override protected List getFieldOrder() { return Arrays.asList("dwServiceType", "dwCurrentState", "dwControlsAccepted", "dwWin32ExitCode", "dwServiceSpecificExitCode", "dwCheckPoint", "dwWaitHint"); } }
@SuppressWarnings("unused") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS",justification="Closure invokes this via reflection") public Object doCall(Object[] args) throws ChannelClosedException { if (args.length == 1 && args[0] instanceof ChannelClosedException) { throw (ChannelClosedException)args[0]; } return originalErrorHook.call(args); } });
@SuppressFBWarnings(value = "DM_GC", justification = "Garbage collection happens only when " + "GC_AFTER_FAILED_DELETE is true. It's an experimental feature in Jenkins.") private void gcIfEnabled() { /* If the Jenkins process had the file open earlier, and it has not * closed it then Windows won't let us delete it until the Java object * with the open stream is Garbage Collected, which can result in builds * failing due to "file in use" on Windows despite working perfectly * well on other OSs. */ if (gcAfterFailedRemove) System.gc(); }