From 2fde52b819f597916702ac76548d4f2c766a697f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Ho=C3=9F?= Date: Sun, 13 Apr 2014 23:29:01 +0200 Subject: [PATCH] Move annotation type information before final keyword MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- src/main/java/com/github/sebhoss/nullanalysis/Nullsafe.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/github/sebhoss/nullanalysis/Nullsafe.java b/src/main/java/com/github/sebhoss/nullanalysis/Nullsafe.java index dcb7f0f..8f45b0e 100644 --- a/src/main/java/com/github/sebhoss/nullanalysis/Nullsafe.java +++ b/src/main/java/com/github/sebhoss/nullanalysis/Nullsafe.java @@ -13,13 +13,17 @@ import javax.annotation.Nullable; */ public final class Nullsafe { + private Nullsafe() { + // utility class + } + /** * @param reference * A possible null reference. * @return Either the reference itself, or an {@link NullPointerException}, in case the reference was * null. */ - public static T nullsafe(@Nullable final T reference) { + public static T nullsafe(final @Nullable T reference) { if (reference != null) { return reference; } @@ -35,7 +39,7 @@ public final class Nullsafe { * @return Either the reference itself, or an {@link NullPointerException}, in case the reference was * null. */ - public static T nullsafe(@Nullable final T reference, final String message) { + public static T nullsafe(final @Nullable T reference, final String message) { if (reference != null) { return reference; } @@ -43,8 +47,4 @@ public final class Nullsafe { throw new NullPointerException(message); // NOPMD - we want to throw NPE here } - private Nullsafe() { - // utility class - } - } -- 2.11.4.GIT