File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed
scribejava-core/src/main/java/com/github/scribejava/core/base64 Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1+ [SNAPSHOT]
2+ * fix java.lang.NoClassDefFoundError for non-java8 runtimes (e.g. Android 7.1.1)
3+ (thanks to https://github.com/ChristopherGittner)
4+
15[8.3.0]
26 * add Instagram (https://www.instagram.com/) API (thanks to https://github.com/faent)
37 * add getErrorMessage method to FacebookAccessTokenErrorResponse. Should be used instead of general getMessage method
Original file line number Diff line number Diff line change 22
33public class CommonsCodecBase64 extends Base64 {
44
5- private static final org .apache .commons .codec .binary .Base64 BASE64_ENCODER
6- = new org .apache .commons .codec .binary .Base64 ();
7- private static final org .apache .commons .codec .binary .Base64 BASE64_URL_ENCODER_WITHOUT_PADDING
8- = new org .apache .commons .codec .binary .Base64 (0 , null , true );
5+ private static final org .apache .commons .codec .binary .Base64 BASE64_ENCODER ;
6+ private static final org .apache .commons .codec .binary .Base64 BASE64_URL_ENCODER_WITHOUT_PADDING ;
7+
8+ static {
9+ if (isAvailable ()) {
10+ BASE64_ENCODER = new org .apache .commons .codec .binary .Base64 ();
11+ BASE64_URL_ENCODER_WITHOUT_PADDING = new org .apache .commons .codec .binary .Base64 (0 , null , true );
12+ } else {
13+ BASE64_ENCODER = null ;
14+ BASE64_URL_ENCODER_WITHOUT_PADDING = null ;
15+ }
16+ }
917
1018 @ Override
1119 protected String internalEncode (byte [] bytes ) {
Original file line number Diff line number Diff line change 33public class Java8Base64 extends Base64 {
44
55 private static final com .github .scribejava .java8 .base64 .Java8Base64 JAVA8_BASE64
6- = new com .github .scribejava .java8 .base64 .Java8Base64 ();
6+ = isAvailable () ? new com .github .scribejava .java8 .base64 .Java8Base64 () : null ;
77
88 @ Override
99 protected String internalEncode (byte [] bytes ) {
You can’t perform that action at this time.
0 commit comments