{"record":{"id":"de1b5298ac14c8ba","repo":"MuntashirAkon/AppManager","slug":"namespaces-are-not-supported","errorCode":null,"errorMessage":"Namespaces are not supported","messagePattern":"Namespaces are not supported","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"libcore/compat/src/main/java/io/github/muntashirakon/compat/xml/BinaryXmlPullParser.java","lineNumber":669,"sourceCode":"    public boolean getFeature(String name) {\n        // Features are not supported\n        throw new UnsupportedOperationException();\n    }\n\n    @Override\n    public void setProperty(String name, Object value) throws XmlPullParserException {\n        // Properties are not supported\n        throw new UnsupportedOperationException();\n    }\n\n    @Override\n    public Object getProperty(String name) {\n        // Properties are not supported\n        throw new UnsupportedOperationException();\n    }\n\n    private static IllegalArgumentException illegalNamespace() {\n        throw new IllegalArgumentException(\"Namespaces are not supported\");\n    }\n\n    /**\n     * Holder representing a single attribute. This design enables object\n     * recycling without resorting to autoboxing.\n     * <p>\n     * To support conversion between human-readable XML and binary XML, the\n     * various accessor methods will transparently convert from/to\n     * human-readable values when needed.\n     */\n    private static class Attribute {\n        public String name;\n        public int type;\n\n        public String valueString;\n        public byte[] valueBytes;\n        public int valueInt;\n        public long valueLong;","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/libcore/compat/src/main/java/io/github/muntashirakon/compat/xml/BinaryXmlPullParser.java#L651-L687","documentation":"This IllegalArgumentException('Namespaces are not supported') is thrown by the private illegalNamespace() helper whenever a namespace-aware XmlPullParser API is invoked: require(feature, ...) with a namespace feature, and getAttributeIndex(namespace, name). Binary XML parsing in this library is namespace-free by design.","triggerScenarios":"Calling parser.require(type, namespace, name) with a non-null namespace, or parser.getAttributeIndex(namespace, name) to look up an attribute by namespace.","commonSituations":"Namespace-qualified matching code reused from text XML parsing; lookup of Android attributes like http://schemas.android.com/apk/res/android names on binary XML.","solutions":["Pass null as the namespace argument to require() and use the String[]-based or non-namespace getAttributeIndex overload","Match attributes by plain local name only","Pre-strip namespace expectations: binary XML attribute names are stored unqualified"],"exampleFix":"// before\nint i = parser.getAttributeIndex(\"http://schemas.android.com/apk/res/android\", \"name\");\n// after\nint i = parser.getAttributeIndex(null, \"name\");","handlingStrategy":"type-guard","validationCode":"if (namespace != null && parser instanceof BinaryXmlPullParser) throw new IllegalStateException(\"namespace args unsupported\");","typeGuard":"boolean acceptsNamespaceArgs(XmlPullParser p) { return !(p instanceof BinaryXmlPullParser); }","tryCatchPattern":"try { parser.require(t, ns, name); } catch (IllegalArgumentException e) { parser.require(t, null, name); }","preventionTips":["Always pass null as namespace with BinaryXmlPullParser","Use the no-namespace getAttributeIndex overload","Remember binary XML stores unqualified names"],"tags":["xml","binary-xml","namespaces","illegal-argument"],"backgroundTag":"unsupported-operation","analyzedSha":"0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5","analyzedAt":"2026-09-12T14:03:37.243Z","contentChangedAt":"2026-09-12T14:03:37.243Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}