Merge branch 'stable-2.11'
* stable-2.11:
Adapt to the JGit v4.0.0.201506090130-r
Change-Id: I24a13ce9aab67322b824cc1b82d65ed579776eec
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
index 6c2f16d..853585d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -92,16 +92,16 @@
@Inject
CreateReviewNotes(@GerritPersonIdent final PersonIdent gerritIdent,
final AccountCache accountCache,
- final @AnonymousCowardName String anonymousCowardName,
+ @AnonymousCowardName final String anonymousCowardName,
final ProjectCache projectCache,
final ApprovalsUtil approvalsUtil,
final ChangeControl.GenericFactory changeControlFactory,
final IdentifiedUser.GenericFactory userFactory,
final NotesBranchUtil.Factory notesBranchUtilFactory,
- final @Nullable @CanonicalWebUrl String canonicalWebUrl,
- final @Assisted ReviewDb reviewDb,
- final @Assisted Project.NameKey project,
- final @Assisted Repository git) {
+ @Nullable @CanonicalWebUrl final String canonicalWebUrl,
+ @Assisted final ReviewDb reviewDb,
+ @Assisted final Project.NameKey project,
+ @Assisted final Repository git) {
this.gerritServerIdent = gerritIdent;
this.accountCache = accountCache;
this.anonymousCowardName = anonymousCowardName;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
index 379f923..d4312f6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java
@@ -81,7 +81,7 @@
db = database.open();
return db.changes().all().toList();
} catch (OrmException e) {
- stderr.print("Cannot read changes from database " + e.getMessage());
+ stderr.println("Cannot read changes from database " + e.getMessage());
return Collections.emptyList();
} finally {
if (db != null) {
@@ -113,6 +113,7 @@
try {
git = gitManager.openRepository(project);
} catch (RepositoryNotFoundException e) {
+ stderr.println("Unable to open project: " + project.get());
return;
}
try {
@@ -120,7 +121,7 @@
crn.createNotes(changes, monitor);
crn.commitNotes();
} catch (ConcurrentRefUpdateException e) {
- stderr.print(e.getMessage());
+ stderr.println(e.getMessage());
} finally {
git.close();
}
@@ -160,7 +161,7 @@
try {
db = database.open();
} catch (OrmException e) {
- stderr.print(e.getMessage());
+ stderr.println(e.getMessage());
return;
}
try {
@@ -170,7 +171,7 @@
try {
export(db, next.getKey(), next.getValue());
} catch (OrmException | IOException e) {
- stderr.print(e.getMessage());
+ stderr.println(e.getMessage());
}
} else {
break;