Merge "Add logging when an NPE is imminent when writing WBXML data"
This commit is contained in:
commit
d05cc9196a
@ -146,6 +146,9 @@ public class Serializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Serializer data(int tag, String value) throws IOException {
|
public Serializer data(int tag, String value) throws IOException {
|
||||||
|
if (value == null) {
|
||||||
|
Log.e(TAG, "Writing null data for tag: " + tag);
|
||||||
|
}
|
||||||
start(tag);
|
start(tag);
|
||||||
text(value);
|
text(value);
|
||||||
end();
|
end();
|
||||||
@ -162,6 +165,9 @@ public class Serializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Serializer text(String text) throws IOException {
|
public Serializer text(String text) throws IOException {
|
||||||
|
if (text == null) {
|
||||||
|
Log.e(TAG, "Writing null text for pending tag: " + pendingTag);
|
||||||
|
}
|
||||||
checkPendingTag(false);
|
checkPendingTag(false);
|
||||||
buf.write(Wbxml.STR_I);
|
buf.write(Wbxml.STR_I);
|
||||||
writeLiteralString(buf, text);
|
writeLiteralString(buf, text);
|
||||||
|
Loading…
Reference in New Issue
Block a user