File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
main/java/org/culturegraph/mf/stream/converter
test/java/org/culturegraph/mf/stream/converter Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,12 @@ public void setDefaultLiteralName(final String defaultLiteralName) {
125
125
public void process (final String string ) {
126
126
matcher .reset (string );
127
127
128
- String id = null ;
128
+ final String id ;
129
129
final int groupIndex = captureGroupNames .indexOf (ID_CAPTURE_GROUP ) + 1 ;
130
130
if (groupIndex > 0 && matcher .find ()) {
131
131
id = matcher .group (groupIndex );
132
+ } else {
133
+ id = "" ;
132
134
}
133
135
getReceiver ().startRecord (id );
134
136
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public final class RegexDecoderTest {
44
44
public void testRegex () {
45
45
final EventList expected = new EventList ();
46
46
47
- expected .startRecord (null );
47
+ expected .startRecord ("" );
48
48
expected .literal (DEFAULT_LITERAL_NAME , INPUT );
49
49
expected .literal (GROUP_NAME_1 , "42" );
50
50
expected .literal (GROUP_NAME_2 , "xyzzy" );
You can’t perform that action at this time.
0 commit comments