File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
main/java/com/microsoft/graph/serializer
test/java/com/microsoft/graph/functional Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 2222
2323package com .microsoft .graph .serializer ;
2424
25- import java .util .Base64 ;
26- import java .util .Base64 .Decoder ;
27- import java .util .Base64 .Encoder ;
25+ import com .google .common .io .BaseEncoding ;
26+
2827import java .text .ParseException ;
2928
3029/**
@@ -46,8 +45,7 @@ private ByteArraySerializer() {
4645 * @throws ParseException if there is any problem processing the value
4746 */
4847 public static byte [] deserialize (final String strVal ) throws ParseException {
49- Decoder base64Decoder = Base64 .getDecoder ();
50- return base64Decoder .decode (strVal );
48+ return BaseEncoding .base64 ().decode (strVal );
5149 }
5250
5351 /**
@@ -57,7 +55,6 @@ public static byte[] deserialize(final String strVal) throws ParseException {
5755 * @return the string
5856 */
5957 public static String serialize (final byte [] src ) {
60- Encoder base64Encoder = Base64 .getEncoder ();
61- return base64Encoder .encodeToString (src );
58+ return BaseEncoding .base64 ().encode (src );
6259 }
6360}
Original file line number Diff line number Diff line change 1010import org .junit .*;
1111import static org .junit .Assert .*;
1212
13- import java .util .Base64 ;
1413import java .util .LinkedList ;
1514import java .util .List ;
1615
Original file line number Diff line number Diff line change 66import org .junit .Test ;
77import static org .junit .Assert .*;
88
9- import java .util .Base64 ;
109import java .util .Calendar ;
1110
1211@ Ignore
You can’t perform that action at this time.
0 commit comments