Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #20 to receive Base64 encoder from java util API #21

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixes #20 to receive Base64 encoder from java util API
  • Loading branch information
osmman committed Dec 20, 2018
commit f5f16e1c62469ee5fc2a83ea18f71065e3efba75
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import qa.tools.ikeeper.IssueDetails;
import sun.misc.BASE64Encoder;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -16,6 +15,7 @@
import java.net.URL;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.util.Base64;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
Expand Down Expand Up @@ -112,7 +112,7 @@ private String get(String url) {

if(username != null && password != null) {
final String userPassword = username + ":" + password;
String basicAuth = "Basic " + new String(new BASE64Encoder().encode(userPassword.getBytes()));
String basicAuth = "Basic " + new String(Base64.getEncoder().encode(userPassword.getBytes()));
conn.setRequestProperty("Authorization", basicAuth);
}

Expand Down