You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kyle Weaver (Jira)" <ji...@apache.org> on 2022/01/19 22:31:00 UTC

[jira] [Commented] (BEAM-13696) FieldAccessDescriptorParser failures throw NPE

    [ https://issues.apache.org/jira/browse/BEAM-13696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17479009#comment-17479009 ] 

Kyle Weaver commented on BEAM-13696:
------------------------------------

The farthest I traced back the error was here, where dotE.exception is not null. So one way to fix this would be to simply throw there. https://github.com/apache/beam/blob/a5935c7c866f04dba79ce311bb482faa7b7945b4/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/parser/FieldAccessDescriptorParser.java#L74

Alternatively, we may be able to configure the lexer to throw errors instead of continuing: https://www.antlr2.org/doc/err.html

> FieldAccessDescriptorParser failures throw NPE
> ----------------------------------------------
>
>                 Key: BEAM-13696
>                 URL: https://issues.apache.org/jira/browse/BEAM-13696
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Kyle Weaver
>            Priority: P3
>
> An actual parser error is logged, but then a null pointer exception is thrown.
> Example code:
> FieldAccessDescriptor.withFieldNamesAs(ImmutableMap.of("\"", "\""));
> Logs:
> line 1:0 token recognition error at: '"'
> line 1:1 mismatched input '<EOF>' expecting {IDENTIFIER, '*'}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)