Skip to content

Commit

Permalink
AVRO-3677: Make IDL detection fail faster
Browse files Browse the repository at this point in the history
  • Loading branch information
opwvhk committed May 1, 2024
1 parent 585f9e8 commit 2b8269b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class IdlSchemaParser implements FormattedSchemaParser {
private static final Pattern START_OF_IDL_PATTERN = Pattern.compile("\\A" + // Start of input
"(?:\\s*|/\\*(?:[^*]|\\*(?!/))*\\*/|//(?:(?!\\R).)*\\R)*" + // Initial whitespace & comments
"(?:\\s*+|/\\*(?:[^*]|\\*(?!/))*+\\*/|//(?:(?!\\R).)*+\\R)*+" + // Initial whitespace & comments
"(?:@|(?:namespace|schema|protocol|record|enum|fixed|import)\\s)", // First keyword mor @
Pattern.UNICODE_CHARACTER_CLASS | Pattern.MULTILINE);

Expand Down

0 comments on commit 2b8269b

Please sign in to comment.