-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should the Decoding of the Attribute Name Surrogate within the initial vocabulary be more robust? #50
Comments
@glassfishrobot Commented |
@glassfishrobot Commented String prefix = ""; { prefix = ""; } } |
@glassfishrobot Commented String namespaceName = ""; { namespaceName = ""; } } |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
We've been using a Fast Infoset document that contains a large initial vocabulary that was created by another tool and we're trying to parse it with the Java FI library. One interesting issue we've hit is that apparently the other tool encoded a final entry in the attribute-name surrogate table of the initial vocabulary where the prefix-string-index bit was present, and the index encoded referred to a null value in the prefixes table. The same thing happens for the namespace-name-prefix and the namespaceName table. This results in an exception in the call to the QualifiedName constructor inside of decodeTableItems(QualifiedNameArray array, boolean isAttribute) in the Decoder class. The exception(s) are the result of the prefix string and namespaceName strings being assigned a null value, which then causes a later exception in the QualifiedName constructor since the QualifiedName constructor assumes that various input variables are not null.
Since we've parsed this other file with a handful of over FI tools, we were thinking one approach might be to just add some additional robustness checking to decodeTableItems() to ensure that the prefix variable is set back to an empty string if the lookup in the prefix table returns null. The same could be done with the namespaceName attribute and the lookup in the namespaceName table. Alternatively, the constructor to QualifiedName could have more sanity checks and not assume that various parameters are not null.
The text was updated successfully, but these errors were encountered: