summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/resources
diff options
context:
space:
mode:
authorAndrey Loskutov <loskutov@gmx.de>2015-11-15 23:59:41 +0100
committerAndrey Loskutov <loskutov@gmx.de>2015-11-25 20:52:19 +0100
commit1020f40813356ffa4b2576f38c749fc0db30ea20 (patch)
treed79b0127f03940ee4baa7231f12de8ad8eeeee21 /org.eclipse.jgit.pgm/resources
parentd2faec27a7af7c9ea7db6b4ac31f75533ca45b80 (diff)
downloadjgit-1020f40813356ffa4b2576f38c749fc0db30ea20.tar.gz
jgit-1020f40813356ffa4b2576f38c749fc0db30ea20.zip
Null-annotated Repository class and fixed related compiler errors
org.eclipse.jgit.lib.Repository class is an example of the API which should be written with Java 8 java.util.Optional<T> type. Unfortunately this API is already released and widely used. The good clients are currently doing their best with checking return values for null and bad clients do not know how bad their code is. I've tried not to change any logic and to be as less intrusive as possible. Most of the JGit code was well prepared to this, only few classes needed some smaller fixes. This change fixes all compiler errors in JGit and replaces possible NPE's with either appropriate exceptions, avoiding multiple "Nullable return" method calls or early returning from the method. Because annotating getDirectory() and getFS() as Nullable would cause lot of additional changes in JGit and EGit they are postponed. Change-Id: Ie8369d2c9c5fac5ce83b3b1b9bc217d7b55502a3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.jgit.pgm/resources')
-rw-r--r--org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
index aa32478ff0..8aeb7e8753 100644
--- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
+++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
@@ -143,6 +143,7 @@ notAJgitCommand={0} is not a jgit command
notARevision=Not a revision: {0}
notATree={0} is not a tree
notAValidRefName={0} is not a valid ref name
+notAValidCommitName={0} is not a valid commit name
notAnIndexFile={0} is not an index file
notAnObject={0} is not an object
notFound=!! NOT FOUND !!