We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c955f commit 465e77eCopy full SHA for 465e77e
src/library/scala/xml/Null.scala
@@ -11,6 +11,7 @@
11
12
package scala.xml
13
14
+import Predef.IllegalArgumentException
15
import compat.StringBuilder
16
17
case object Null extends MetaData {
@@ -55,7 +56,11 @@ case object Null extends MetaData {
55
56
def next = null
57
58
/** null */
- def apply(key: String) = null
59
+ def apply(key: String) = {
60
+ if(!Parsing.isNameStart (key charAt 0))
61
+ throw new IllegalArgumentException("not a valid attribute name '"+key+"', so can never match !")
62
+ null
63
+ }
64
65
/** gets value of qualified (prefixed) attribute with given key */
66
def apply(namespace: String, scope: NamespaceBinding, key: String) = null
0 commit comments