]> source.dussan.org Git - jgit.git/commitdiff
Include the number of ms in timeout error message 83/10983/1
authorRobin Stocker <robin@nibor.org>
Fri, 8 Mar 2013 17:00:19 +0000 (18:00 +0100)
committerRobin Stocker <robin@nibor.org>
Fri, 8 Mar 2013 17:00:19 +0000 (18:00 +0100)
Noticed that while analyzing bug 402131.

Change-Id: If3fd40b64d5088c4579946271a67346cbd9e6556

org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java

index 18f33147ce849fafdc97bd9b5eb1d4cdcfd306ec..677f735cec3386c34ff71f775314c5334c8be05f 100644 (file)
@@ -385,7 +385,7 @@ pushIsNotSupportedForBundleTransport=Push is not supported for bundle transport
 pushNotPermitted=push not permitted
 rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry
 readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0}
-readTimedOut=Read timed out
+readTimedOut=Read timed out after {0} ms
 receivePackObjectTooLarge1=Object too large, rejecting the pack. Max object size limit is {0} bytes.
 receivePackObjectTooLarge2=Object too large ({0} bytes), rejecting the pack. Max object size limit is {1} bytes.
 receivingObjects=Receiving objects
@@ -541,7 +541,7 @@ weeksAgo={0} weeks ago
 windowSizeMustBeLesserThanLimit=Window size must be < limit
 windowSizeMustBePowerOf2=Window size must be power of 2
 writerAlreadyInitialized=Writer already initialized
-writeTimedOut=Write timed out
+writeTimedOut=Write timed out after {0} ms
 writingNotPermitted=Writing not permitted
 writingNotSupported=Writing {0} not supported.
 writingObjects=Writing objects
index cda2b59b4306cf38632c5ed309e522c746bb6465..fe452c255dc2c800108b84cabcc51a30661fef23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2009, 2013 Google Inc.
  * and other copyright owners as documented in the project's IP log.
  *
  * This program and the accompanying materials are made available
@@ -137,7 +137,8 @@ public class TimeoutInputStream extends FilterInputStream {
                myTimer.end();
        }
 
-       private static InterruptedIOException readTimedOut() {
-               return new InterruptedIOException(JGitText.get().readTimedOut);
+       private InterruptedIOException readTimedOut() {
+               return new InterruptedIOException(MessageFormat.format(
+                               JGitText.get().readTimedOut, Integer.valueOf(timeout)));
        }
 }
index b074396a75e39b7f1c02397c8d0f2e51f28eee6c..7ca11ca05537fdfc3c0de02979087dc1a272c153 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2009, 2013 Google Inc.
  * and other copyright owners as documented in the project's IP log.
  *
  * This program and the accompanying materials are made available
@@ -150,7 +150,8 @@ public class TimeoutOutputStream extends OutputStream {
                myTimer.end();
        }
 
-       private static InterruptedIOException writeTimedOut() {
-               return new InterruptedIOException(JGitText.get().writeTimedOut);
+       private InterruptedIOException writeTimedOut() {
+               return new InterruptedIOException(MessageFormat.format(
+                               JGitText.get().writeTimedOut, Integer.valueOf(timeout)));
        }
 }