@@ -210,30 +210,29 @@ public static Map<Tag,String> parse(Transfer t) throws RemoteException
210
210
public static Map <Tag ,String > parse (String ... lines ) throws RemoteException
211
211
{
212
212
// Wir parsen erstmal alles mit "+".
213
- Map <Tag ,String > result = parse (true , '+' ,lines );
213
+ Map <Tag ,String > result = parse ('+' ,lines );
214
214
if (result == null || result .size () == 0 )
215
215
{
216
216
// Vielleicht enthaelt es ja nur Tags mit Doppelpunkt?
217
- return parse (true , ':' ,lines );
217
+ return parse (':' ,lines );
218
218
}
219
219
220
220
// Jetzt schauen wir, ob wir den Verwendungszweck per ":" noch weiter zerlegen koennen
221
221
String svwz = result .get (Tag .SVWZ );
222
222
if (StringUtils .trimToNull (svwz ) != null )
223
- result .putAll (parse (true , ':' ,svwz ));
223
+ result .putAll (parse (':' ,svwz ));
224
224
225
225
return result ;
226
226
}
227
227
228
228
/**
229
229
* Parst die SEPA-Tags aus den Verwendungszweck-Zeilen.
230
- * @param leadingSvwz true, wenn ein fuehrerender Verwendungszweck ohne dediziertes Tag beachtet werden soll.
231
230
* @param sep das zu verwendende Trennzeichen.
232
231
* @param lines die Verwendungszweck-Zeilen.
233
232
* @return Map mit den geparsten Infos. Niemals NULL sondern hoechstens eine leere Map.
234
233
* @throws RemoteException
235
234
*/
236
- private static Map <Tag ,String > parse (boolean leadingSvwz , char sep , String ... lines ) throws RemoteException
235
+ private static Map <Tag ,String > parse (char sep , String ... lines ) throws RemoteException
237
236
{
238
237
Map <Tag ,String > result = new HashMap <Tag ,String >();
239
238
@@ -298,7 +297,7 @@ private static Map<Tag,String> parse(boolean leadingSvwz, char sep, String... li
298
297
// Sprich: Der Verwendungszweck enthaelt zwar Tags, der Verwendungszweck selbst hat aber keines
299
298
// sondern steht nur vorn dran.
300
299
// Wenn wir Tags haben, SVWZ aber fehlt, nehmen wir als SVWZ den Text bis zum ersten Tag
301
- if (leadingSvwz && result .size () > 0 && !result .containsKey (Tag .SVWZ ) && first > 0 )
300
+ if (result .size () > 0 && !result .containsKey (Tag .SVWZ ) && first > 0 )
302
301
{
303
302
result .put (Tag .SVWZ ,StringUtils .trimToEmpty (line .substring (0 ,first ).replace ("\n " ,"" )));
304
303
}
0 commit comments