Skip to content

Commit 5cc3ea7

Browse files
author
Caitlin Bales (MSFT)
committed
Remove Base64 references
1 parent cb87e9d commit 5cc3ea7

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/main/java/com/microsoft/graph/serializer/ByteArraySerializer.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222

2323
package 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+
2827
import 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
}

src/test/java/com/microsoft/graph/functional/SharePointTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.junit.*;
1111
import static org.junit.Assert.*;
1212

13-
import java.util.Base64;
1413
import java.util.LinkedList;
1514
import java.util.List;
1615

src/test/java/com/microsoft/graph/functional/WebhooksTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.junit.Test;
77
import static org.junit.Assert.*;
88

9-
import java.util.Base64;
109
import java.util.Calendar;
1110

1211
@Ignore

0 commit comments

Comments
 (0)