diff src/org/tmatesoft/hg/repo/HgChangelog.java @ 365:3572fcb06473

Don't expose methods with DataAccess in public API
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sun, 11 Dec 2011 00:39:07 +0100
parents d9dfa9fe9cec
children 189dc6dc1c3e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgChangelog.java	Fri Dec 09 02:09:22 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgChangelog.java	Sun Dec 11 00:39:07 2011 +0100
@@ -238,19 +238,15 @@
 			}
 		}
 
-		// FIXME internal class DataAccess as part of API
-		public static RawChangeset parse(DataAccess da) {
-			try {
-				byte[] data = da.byteArray();
-				RawChangeset rv = new RawChangeset();
-				rv.init(data, 0, data.length, null);
-				return rv;
-			} catch (IOException ex) {
-				throw new HgBadStateException(ex); // FIXME "Error reading changeset data"
-			}
+		/*package*/ static RawChangeset parse(DataAccess da) throws IOException {
+			byte[] data = da.byteArray();
+			RawChangeset rv = new RawChangeset();
+			rv.init(data, 0, data.length, null);
+			return rv;
 		}
 
 		// @param usersPool - it's likely user names get repeated again and again throughout repository. can be null
+		// FIXME throws "Error reading changeset data"
 		/* package-local */void init(byte[] data, int offset, int length, Pool<String> usersPool) {
 			final int bufferEndIndex = offset + length;
 			final byte lineBreak = (byte) '\n';