Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 36d5b09

Browse filesBrowse files
committed
Java 5 doesn't have new String(byte[], Charset)
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html
1 parent f9014db commit 36d5b09
Copy full SHA for 36d5b09

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎src/main/java/org/kohsuke/github/GitHub.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import com.fasterxml.jackson.databind.ObjectMapper;
5858
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
5959
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
60-
import java.nio.charset.Charset;
6160
import java.util.logging.Logger;
6261

6362
/**
@@ -134,8 +133,8 @@ public class GitHub {
134133
} else {
135134
if (password!=null) {
136135
String authorization = (login + ':' + password);
137-
Charset charset = Charsets.UTF_8;
138-
encodedAuthorization = "Basic "+new String(Base64.encodeBase64(authorization.getBytes(charset)), charset);
136+
String charsetName = Charsets.UTF_8.name();
137+
encodedAuthorization = "Basic "+new String(Base64.encodeBase64(authorization.getBytes(charsetName)), charsetName);
139138
} else {// anonymous access
140139
encodedAuthorization = null;
141140
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.