You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/03/16 03:34:53 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #8685: Remove hard requirement of BASE64 encoding for binary field

kezhenxu94 commented on a change in pull request #8685:
URL: https://github.com/apache/skywalking/pull/8685#discussion_r827597434



##########
File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/type/HashMapConverter.java
##########
@@ -34,6 +40,25 @@
         public Object get(final String fieldName) {
             return source.get(fieldName);
         }
+
+        @Override
+        public <T, R> R getWith(final String fieldName, final Function<T, R> typeDecoder) {
+            final T value = (T) source.get(fieldName);
+            return typeDecoder.apply(value);
+        }
+
+        /**
+         * Default Base64Decoder supplier
+         */
+        public static class Base64Decoder implements Function<String, byte[]> {

Review comment:
       This can be a singleton?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org