diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java index 75bd549dd..cfa53af9c 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java @@ -82,7 +82,7 @@ public interface LargeFileRepository { * @return Action for verifying the object, or {@code null} if the server * doesn't support or require verification */ - public Response.@Nullable Action getVerifyAction(AnyLongObjectId id); + public @Nullable Response.Action getVerifyAction(AnyLongObjectId id); /** * Get size of an object diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/NonNull.java b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/NonNull.java index fd5495886..1cc65c9f4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/NonNull.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/NonNull.java @@ -43,8 +43,12 @@ package org.eclipse.jgit.annotations; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; + import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @@ -59,7 +63,7 @@ import java.lang.annotation.Target; */ @Documented @Retention(RetentionPolicy.CLASS) -@Target(ElementType.TYPE_USE) +@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE }) public @interface NonNull { // marker annotation with no members } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java index e914140ce..f8a7a366d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java @@ -43,8 +43,12 @@ package org.eclipse.jgit.annotations; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; + import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @@ -89,7 +93,7 @@ import java.lang.annotation.Target; */ @Documented @Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE_USE) +@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE }) public @interface Nullable { // marker annotation with no members } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/CorruptObjectException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/CorruptObjectException.java index 314c4e6da..4b503a302 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/CorruptObjectException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/CorruptObjectException.java @@ -140,7 +140,8 @@ public class CorruptObjectException extends IOException { * @return error condition or null. * @since 4.2 */ - public ObjectChecker.@Nullable ErrorType getErrorType() { + @Nullable + public ObjectChecker.ErrorType getErrorType() { return errorType; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java index 3c6f38efb..131b0048a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java @@ -89,7 +89,8 @@ public class FsckError { } /** @return error type of the corruption. */ - public ObjectChecker.@Nullable ErrorType getErrorType() { + @Nullable + public ObjectChecker.ErrorType getErrorType() { return errorType; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java index cd03a3d92..4c70725e4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java @@ -265,7 +265,8 @@ public class TransferConfig { } } - static ObjectChecker.@Nullable ErrorType parse(String key) { + @Nullable + static ObjectChecker.ErrorType parse(String key) { return errors.get(toLowerCase(key)); }