From 8becab6c0ef366812526617d963a26745d1abf9c Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 7 Jun 2022 16:20:08 +0200 Subject: GC deprecation warnings. --- .../serialization/XmlSerializationHelper.java | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java') diff --git a/document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java b/document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java index 1bb91b91762..899ef1f9195 100644 --- a/document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java +++ b/document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java @@ -3,7 +3,21 @@ package com.yahoo.document.serialization; import com.yahoo.document.Document; import com.yahoo.document.Field; -import com.yahoo.document.datatypes.*; +import com.yahoo.document.datatypes.Array; +import com.yahoo.document.datatypes.BoolFieldValue; +import com.yahoo.document.datatypes.ByteFieldValue; +import com.yahoo.document.datatypes.DoubleFieldValue; +import com.yahoo.document.datatypes.FieldValue; +import com.yahoo.document.datatypes.Float16FieldValue; +import com.yahoo.document.datatypes.FloatFieldValue; +import com.yahoo.document.datatypes.IntegerFieldValue; +import com.yahoo.document.datatypes.LongFieldValue; +import com.yahoo.document.datatypes.MapFieldValue; +import com.yahoo.document.datatypes.Raw; +import com.yahoo.document.datatypes.StringFieldValue; +import com.yahoo.document.datatypes.Struct; +import com.yahoo.document.datatypes.StructuredFieldValue; +import com.yahoo.document.datatypes.WeightedSet; import com.yahoo.text.Utf8; import java.util.Base64; @@ -46,7 +60,6 @@ public class XmlSerializationHelper { xml.addContent(b.toString()); } - @SuppressWarnings("deprecation") public static void printDocumentXml(Document doc, XmlStream xml) { xml.addAttribute("documenttype", doc.getDataType().getName()); xml.addAttribute("documentid", doc.getId()); @@ -121,13 +134,6 @@ public class XmlSerializationHelper { } } - private static boolean containsNonPrintableCharactersByte(final byte[] buffer) { - for (byte b : buffer) { - if (b < 32 && (b != 9 && b != 10 && b != 13)) return true; - } - return false; - } - private static boolean containsNonPrintableCharactersString(final CharSequence buffer) { for (int i = 0; i < buffer.length(); i++) { char b = buffer.charAt(i); -- cgit v1.2.3