From 608b6b03b1182329ae6f76a4c3938874dcc9c210 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 9 Oct 2018 15:48:16 -0700 Subject: Format @Nullable on return value as method annotation For example, instead of using public @Nullable String getMyFavoriteString() { ... } use @Nullable public String getMyFavoriteString() { ... } This makes the style more consistent (the existing JGit code base tends to lean toward the second style) and makes the source code better reflect how the annotation is parsed, as a METHOD annotation. Longer term, we should switch to a TYPE_USE annotation and switch to the first style. Noticed using a style checker that follows https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations Change-Id: I07f4e67cc149fb8007f696a4663e10d4bfc57e3a Reported-by: Ivan Frade Signed-off-by: Jonathan Nieder --- .../src/org/eclipse/jgit/lfs/server/LargeFileRepository.java | 3 ++- .../src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'org.eclipse.jgit.lfs.server/src') 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 cfa53af9cd..4cb0277b64 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,8 @@ public interface LargeFileRepository { * @return Action for verifying the object, or {@code null} if the server * doesn't support or require verification */ - public @Nullable Response.Action getVerifyAction(AnyLongObjectId id); + @Nullable + public Response.Action getVerifyAction(AnyLongObjectId id); /** * Get size of an object diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java index 55d9093241..0a7c37ca55 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java @@ -99,7 +99,8 @@ public class FileLfsRepository implements LargeFileRepository { /** {@inheritDoc} */ @Override - public @Nullable Action getVerifyAction(AnyLongObjectId id) { + @Nullable + public Action getVerifyAction(AnyLongObjectId id) { return null; } -- cgit v1.2.3