Base64Utils falls back to JAXB DatatypeConverter for String-based encoding
Issue: SPR-12938
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,10 +52,6 @@ public abstract class GsonBuilderUtils {
|
||||
* On Java 8, the standard {@link java.util.Base64} facility is used instead.
|
||||
*/
|
||||
public static GsonBuilder gsonBuilderWithBase64EncodedByteArrays() {
|
||||
// Assert that Base64 support is available, as long we're not on Java 8+
|
||||
Base64Utils.encode(null);
|
||||
|
||||
// Now, construct a pre-configured GsonBuilder...
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.registerTypeHierarchyAdapter(byte[].class, new Base64TypeAdapter());
|
||||
return builder;
|
||||
|
||||
Reference in New Issue
Block a user