diff src/org/tmatesoft/hg/internal/LineReader.java @ 649:e79cf9a8130b

Push: phase4 - update local and remote phase information
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 26 Jun 2013 20:52:38 +0200
parents 6526d8adbc0f
children 12a4f60ea972
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/LineReader.java	Tue Jun 25 20:48:37 2013 +0200
+++ b/src/org/tmatesoft/hg/internal/LineReader.java	Wed Jun 26 20:52:38 2013 +0200
@@ -95,7 +95,14 @@
 			return this;
 		}
 
-		public <T> void read(LineConsumer<T> consumer, T paramObj) throws HgIOException {
+		/**
+		 * 
+		 * @param consumer where to pipe read lines to
+		 * @param paramObj parameterizes consumer
+		 * @return paramObj value for convenience
+		 * @throws HgIOException if there's {@link IOException} while reading file
+		 */
+		public <T> T read(LineConsumer<T> consumer, T paramObj) throws HgIOException {
 			BufferedReader statusFileReader = null;
 			try {
 //				consumer.begin(file, paramObj);
@@ -119,6 +126,7 @@
 						ok = consumer.consume(line, paramObj);
 					}
 				}
+				return paramObj;
 			} catch (IOException ex) {
 				throw new HgIOException(ex.getMessage(), ex, file);
 			} finally {