Skip to content

Commit

Permalink
fix: sonarqube suggestion
Browse files Browse the repository at this point in the history
Alternatives in regular expressions should be grouped when used with anchors
  • Loading branch information
teleivo committed Jul 29, 2022
1 parent ab3c2af commit 6f3c72c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class DefaultCsvEventService
private static final CsvSchema CSV_SCHEMA = CSV_MAPPER.schemaFor( CsvEventDataValue.class )
.withLineSeparator( "\n" );

private static final Pattern TRIM_SINGLE_QUOTES = Pattern.compile( "^'|'$" );
private static final Pattern TRIM_SINGLE_QUOTES = Pattern.compile( "(?:^')|(?:'$)" );

@Override
public void writeEvents( OutputStream outputStream, List<Event> events, boolean withHeader )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class TrackerCsvEventService
{
private static final CsvMapper CSV_MAPPER = new CsvMapper().enable( CsvParser.Feature.WRAP_AS_ARRAY );

private static final Pattern TRIM_SINGLE_QUOTES = Pattern.compile( "^'|'$" );
private static final Pattern TRIM_SINGLE_QUOTES = Pattern.compile( "(?:^')|(?:'$)" );

@Override
public void writeEvents( OutputStream outputStream, List<Event> events, boolean withHeader )
Expand Down

0 comments on commit 6f3c72c

Please sign in to comment.