{"action":"created","issue":{"url":"https://api.github.com/repos/EXIficient/exificient-core/issues/1","repository_url":"https://api.github.com/repos/EXIficient/exificient-core","labels_url":"https://api.github.com/repos/EXIficient/exificient-core/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/EXIficient/exificient-core/issues/1/comments","events_url":"https://api.github.com/repos/EXIficient/exificient-core/issues/1/events","html_url":"https://github.com/EXIficient/exificient-core/issues/1","id":168490236,"number":1,"title":"NullPointerException when decoding an EXI stream with FidelityOptions.FEATURE_PREFIX","user":{"login":"rovarga","id":3847030,"avatar_url":"https://avatars.githubusercontent.com/u/3847030?v=3","gravatar_id":"","url":"https://api.github.com/users/rovarga","html_url":"https://github.com/rovarga","followers_url":"https://api.github.com/users/rovarga/followers","following_url":"https://api.github.com/users/rovarga/following{/other_user}","gists_url":"https://api.github.com/users/rovarga/gists{/gist_id}","starred_url":"https://api.github.com/users/rovarga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovarga/subscriptions","organizations_url":"https://api.github.com/users/rovarga/orgs","repos_url":"https://api.github.com/users/rovarga/repos","events_url":"https://api.github.com/users/rovarga/events{/privacy}","received_events_url":"https://api.github.com/users/rovarga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-30T22:32:53Z","updated_at":"2016-08-01T11:22:46Z","closed_at":null,"body":"For OpenDaylight's NETCONF implementation we have tried to switch from OpenEXI to Exificient (https://git.opendaylight.org/gerrit/35131), but our unit tests (which use FidelityOptions.FEATURE_PREFIX) are triggering:\r\n\r\nCaused by: java.lang.NullPointerException\r\n        at com.siemens.ct.exi.util.xml.QNameUtilities.getQualifiedName(QNameUtilities.java:86)\r\n        at com.siemens.ct.exi.core.AbstractEXIBodyDecoder.getAttributeQNameAsString(AbstractEXIBodyDecoder.java:297)\r\n        at com.siemens.ct.exi.api.sax.SAXDecoder.handleAttribute(SAXDecoder.java:588)\r\n        at com.siemens.ct.exi.api.sax.SAXDecoder.parseEXIEvents(SAXDecoder.java:288)\r\n\r\nWhich seems to be indicating that the prefix passed to getQualifiedName() is null and trips on pfx.length() check. I am not sure if this is an codec problem (and pfx should never be null), or if the null should be treated as an empty string."},"comment":{"url":"https://api.github.com/repos/EXIficient/exificient-core/issues/comments/236555039","html_url":"https://github.com/EXIficient/exificient-core/issues/1#issuecomment-236555039","issue_url":"https://api.github.com/repos/EXIficient/exificient-core/issues/1","id":236555039,"user":{"login":"danielpeintner","id":11281461,"avatar_url":"https://avatars.githubusercontent.com/u/11281461?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpeintner","html_url":"https://github.com/danielpeintner","followers_url":"https://api.github.com/users/danielpeintner/followers","following_url":"https://api.github.com/users/danielpeintner/following{/other_user}","gists_url":"https://api.github.com/users/danielpeintner/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpeintner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpeintner/subscriptions","organizations_url":"https://api.github.com/users/danielpeintner/orgs","repos_url":"https://api.github.com/users/danielpeintner/repos","events_url":"https://api.github.com/users/danielpeintner/events{/privacy}","received_events_url":"https://api.github.com/users/danielpeintner/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T11:22:46Z","updated_at":"2016-08-01T11:22:46Z","body":"Hi,\r\n\r\nI did look at your PR which threats every prefix which is null as empty string on decoder. This might work in some cases but not in all. Moreover, I think the stream is corrupted if Preserve.Prefixes is set to TRUE and does not contain prefixes (i.e. null)\r\n\r\nI believe that the problem is not on decoder but on encoder side. IF Preserve.Prefixes is set to TRUE the encoder needs to know the prefix. If the prefix is not reported the codec can't preserve it.\r\n\r\nThat said, the XMLReader on encoder side need to report NS prefixes properly...\r\n\r\n```\r\n// set XMLReader features\r\nxmlReader.setFeature(\"http://xml.org/sax/features/namespaces\", true);\r\n// do not report namespace declarations as attributes\r\nxmlReader.setFeature(\"http://xml.org/sax/features/namespace-prefixes\", false);\r\n```\r\n\r\nMay I ask whether this is done or can you share the test-case and the EXI options you use to track the issue.\r\n\r\nThanks!"}}
{"actor":{"display_login":"danielpeintner"}}