Jak powstrzymać ostrzeżenia FindBugs dla pól lub zmiennych lokalnych

Chciałbym wyłączyć ostrzeżenia FindBugs dla określonych pól lub zmiennych lokalnych. FindBugs dokumentuje, że celem może być Typ, Pole, Metoda, Parametr, Konstruktor, Pakiet dla adnotacji edu.umd.cs.findbugs.annotations.SuppressWarning [1]. Ale nie działa dla mnie przypisywanie pola, tylko wtedy, gdy opisuję metodę, której ostrzeżenie jest tłumione.

Opisywanie całej metody wydaje mi się szerokie. Czy jest jakiś sposób na powstrzymanie ostrzeżeń na określonych polach? Jest jeszcze inne powiązane pytanie [2], ale nie ma odpowiedzi.

[1]http://findbugs.sourceforge.net/manual/annotations.html

[2]Pomiń ostrzeżenia FindBugs w Eclipse

Kod demonstracyjny:

public class SyncOnBoxed
{
    static int counter = 0;
    // The following SuppressWarnings does NOT prevent the FindBugs warning
    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE")
    final static Long expiringLock = new Long(System.currentTimeMillis() + 10);

    public static void main(String[] args) {
        while (increment(expiringLock)) {
            System.out.println(counter);
        }
    }

    // The following SuppressWarnings prevents the FindBugs warning
    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE")
    protected static boolean increment(Long expiringLock)
    {
        synchronized (expiringLock) { // <<< FindBugs warning is here: Synchronization on Long in SyncOnBoxed.increment()
            counter++;
        }
        return expiringLock > System.currentTimeMillis(); // return false when lock is expired
    }
}

questionAnswers(2)

yourAnswerToTheQuestion