1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

[xdata] Use extra registry for fields in clark notation

If a field name is in clark notation, then lookup the field's type via
an extra registry.
This commit is contained in:
Florian Schmaus 2021-02-21 13:01:43 +01:00
parent ce4f85acf8
commit 1c262471e5
3 changed files with 69 additions and 88 deletions

View file

@ -64,4 +64,13 @@ public class XmlUtil {
return stringWriter.toString();
}
public static boolean isClarkNotation(String text) {
if (text.isEmpty()) {
return false;
}
// TODO: This is currently a mediocre heuristic to check for clark notation.
return text.charAt(0) == '{';
}
}