Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 3bb2ec2

Browse files
SynapticloopSynapticloop
authored andcommitted
fixed compiler version and base64
1 parent 85a10ef commit 3bb2ec2

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: java
22
jdk:
3-
- oraclejdk8
3+
- oraclejdk7
44
script: ./gradlew --info build

build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ plugins {
55
id "maven-publish"
66
id 'net.saliman.cobertura' version '2.2.6'
77
id "com.jfrog.bintray" version "1.4"
8+
id 'co.riiid.gradle' version '0.3.1'
89
}
910

1011
group = 'synapticloop'
1112
archivesBaseName = 'backblaze-b2-java-api'
1213
description = """An api for backblaze b2 storage in java"""
1314

14-
version = 'v1.1.1'
15+
version = 'v1.1.2'
1516

1617
description = """backblaze-b2-java-api"""
1718

@@ -130,3 +131,16 @@ bintray {
130131
}
131132

132133
}
134+
135+
github {
136+
owner = group
137+
repo = archivesBaseName
138+
if(System.getenv('GITHUB_TOKEN')) {
139+
token = System.getenv('GITHUB_TOKEN')
140+
}
141+
tagName = version
142+
name = version
143+
assets = [
144+
'build/libs/' + archivesBaseName + '-' + version + '-all.jar'
145+
]
146+
}

src/main/java/synapticloop/b2/request/B2AuthorizeAccountRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package synapticloop.b2.request;
22

3-
import java.util.Base64;
43

4+
import org.apache.commons.codec.binary.Base64;
55
import org.slf4j.Logger;
66
import org.slf4j.LoggerFactory;
77

@@ -35,7 +35,7 @@ public class B2AuthorizeAccountRequest extends BaseB2Request {
3535
public B2AuthorizeAccountRequest(String accountId, String applicationKey) {
3636
super(null);
3737
url = B2_AUTHORIZE_ACCOUNT;
38-
unencodedHeaders.put(REQUEST_PROPERTY_AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString((accountId + ":" + applicationKey).getBytes()));
38+
unencodedHeaders.put(REQUEST_PROPERTY_AUTHORIZATION, "Basic " + Base64.encodeBase64String((accountId + ":" + applicationKey).getBytes()));
3939
}
4040

4141
/**

0 commit comments

Comments
 (0)