From e7d3e2cfd76b66a07e22e7eb63ea5569693fb6cb Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Fri, 19 Aug 2016 23:08:05 +0200 Subject: [PATCH] FindBugs: Suppress UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD in JNA classes --- core/src/main/java/hudson/util/jna/Advapi32.java | 4 ++++ core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java | 3 +++ core/src/main/java/hudson/util/jna/WINBASE.java | 3 +++ 3 files changed, 10 insertions(+) diff --git a/core/src/main/java/hudson/util/jna/Advapi32.java b/core/src/main/java/hudson/util/jna/Advapi32.java index 7d951c4fbd..fd929d963b 100644 --- a/core/src/main/java/hudson/util/jna/Advapi32.java +++ b/core/src/main/java/hudson/util/jna/Advapi32.java @@ -22,6 +22,7 @@ import com.sun.jna.Pointer; import com.sun.jna.win32.StdCallLibrary; import com.sun.jna.ptr.PointerByReference; import com.sun.jna.ptr.IntByReference; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Arrays; import java.util.List; @@ -318,6 +319,7 @@ typedef struct _SERVICE_STATUS { DWORD dwWaitHint; } SERVICE_STATUS, *LPSERVICE_STATUS;*/ + @SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SERVICE_STATUS extends Structure { public int dwServiceType; public int dwCurrentState; @@ -342,6 +344,7 @@ typedef struct _SERVICE_TABLE_ENTRY { LPSERVICE_MAIN_FUNCTION lpServiceProc; } SERVICE_TABLE_ENTRY, *LPSERVICE_TABLE_ENTRY;*/ + @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; @@ -365,6 +368,7 @@ typedef struct _SERVICE_TABLE_ENTRY { LPTSTR lpDescription; } SERVICE_DESCRIPTION, *LPSERVICE_DESCRIPTION;*/ + @SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info { public String lpDescription; } diff --git a/core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java b/core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java index fab1439a60..4cd28b8673 100644 --- a/core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java +++ b/core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java @@ -26,6 +26,7 @@ package hudson.util.jna; import com.sun.jna.Pointer; import com.sun.jna.Structure; import com.sun.jna.Union; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Arrays; import java.util.List; @@ -56,6 +57,7 @@ typedef struct _SHELLEXECUTEINFO { * @author Kohsuke Kawaguchi * @see MSDN: SHELLEXECUTEINFO */ +@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") public class SHELLEXECUTEINFO extends Structure { public int cbSize = size(); public int fMask; @@ -85,6 +87,7 @@ public class SHELLEXECUTEINFO extends Structure { "hProcess"); } + @SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") public static class DUMMYUNIONNAME_union extends Union { public Pointer hIcon; public Pointer hMonitor; diff --git a/core/src/main/java/hudson/util/jna/WINBASE.java b/core/src/main/java/hudson/util/jna/WINBASE.java index 470e708c81..f0ace4e4cc 100644 --- a/core/src/main/java/hudson/util/jna/WINBASE.java +++ b/core/src/main/java/hudson/util/jna/WINBASE.java @@ -17,6 +17,7 @@ package hudson.util.jna; import com.sun.jna.Structure; import com.sun.jna.Pointer; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Arrays; import java.util.List; @@ -33,6 +34,7 @@ typedef struct _SECURITY_ATTRIBUTES { } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;*/ + @SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class SECURITY_ATTRIBUTES extends Structure { public int nLength; public Pointer lpSecurityDescriptor; @@ -50,6 +52,7 @@ typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME, *PFILETIME, *LPFILETIME;*/ + @SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "JNA Data Structure") class FILETIME extends Structure { public int dwLowDateTime; public int dwHighDateTime;