@@ -76,23 +76,7 @@ public void processStream(InputStream input) throws IOException {
76
76
}
77
77
if (state == ParseState .TAG ) {
78
78
if (s .startsWith ("\t " )) {
79
- String [] pair = s .trim ().split (": " );
80
- if (pair .length != 2 ) {
81
- //
82
- // Overriding processStream() thus need to comply with the
83
- // set of exceptions it can throw.
84
- //
85
- throw new IOException ("Failed to parse tag: '" + s + "'" );
86
- } else {
87
- if (tags .containsKey (pair [1 ])) {
88
- // Join multiple tags for one revision
89
- String oldtag = tags .get (pair [1 ]);
90
- tags .remove (pair [1 ]);
91
- tags .put (pair [1 ], oldtag + " " + pair [0 ]);
92
- } else {
93
- tags .put (pair [1 ], pair [0 ]);
94
- }
95
- }
79
+ parseTag (tags , s );
96
80
} else {
97
81
state = ParseState .REVISION ;
98
82
s = in .readLine ();
@@ -158,6 +142,26 @@ public void processStream(InputStream input) throws IOException {
158
142
history .setHistoryEntries (entries );
159
143
}
160
144
145
+ private void parseTag (HashMap <String , String > tags , String s ) throws IOException {
146
+ String [] pair = s .trim ().split (": " );
147
+ if (pair .length != 2 ) {
148
+ //
149
+ // Overriding processStream() thus need to comply with the
150
+ // set of exceptions it can throw.
151
+ //
152
+ throw new IOException ("Failed to parse tag: '" + s + "'" );
153
+ } else {
154
+ if (tags .containsKey (pair [1 ])) {
155
+ // Join multiple tags for one revision
156
+ String oldTag = tags .get (pair [1 ]);
157
+ tags .remove (pair [1 ]);
158
+ tags .put (pair [1 ], oldTag + " " + pair [0 ]);
159
+ } else {
160
+ tags .put (pair [1 ], pair [0 ]);
161
+ }
162
+ }
163
+ }
164
+
161
165
/**
162
166
* Sort history entries in the object according to semantic ordering of the revision string.
163
167
* @param history {@link History} object
0 commit comments