File tree Expand file tree Collapse file tree 5 files changed +6
-12
lines changed
src/main/java/com/github/dockerjava/api/model
docker-java-core/src/main/java/com/github/dockerjava/core Expand file tree Collapse file tree 5 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 2626 <artifactId >commons-lang</artifactId >
2727 <version >${commons-lang.version} </version >
2828 </dependency >
29- <dependency >
30- <groupId >commons-codec</groupId >
31- <artifactId >commons-codec</artifactId >
32- <version >${commons-codec.version} </version >
33- </dependency >
3429
3530 <dependency >
3631 <groupId >com.google.guava</groupId >
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonInclude ;
55import com .fasterxml .jackson .annotation .JsonProperty ;
6- import org .apache .commons .codec .binary .Base64 ;
76import org .apache .commons .lang .builder .EqualsBuilder ;
87import org .apache .commons .lang .builder .HashCodeBuilder ;
98import org .apache .commons .lang .builder .ToStringBuilder ;
109import org .apache .commons .lang .builder .ToStringStyle ;
1110
1211import javax .annotation .CheckForNull ;
1312import java .io .Serializable ;
13+ import java .util .Base64 ;
1414import java .util .Map ;
1515
1616/**
@@ -65,7 +65,7 @@ public String getData() {
6565 * @see #data
6666 */
6767 public SecretSpec withData (String data ) {
68- this .data = Base64 .encodeBase64String (data .getBytes ());
68+ this .data = Base64 .getEncoder (). encodeToString (data .getBytes ());
6969 return this ;
7070 }
7171
Original file line number Diff line number Diff line change 66import com .fasterxml .jackson .databind .ObjectMapper ;
77import com .github .dockerjava .api .model .AuthConfig ;
88import com .github .dockerjava .api .model .AuthConfigurations ;
9- import org .apache .commons .codec .binary .Base64 ;
109import org .apache .commons .io .FileUtils ;
1110import org .apache .commons .lang .StringUtils ;
1211
1514import java .io .File ;
1615import java .io .IOException ;
1716import java .nio .charset .StandardCharsets ;
17+ import java .util .Base64 ;
1818import java .util .Collections ;
1919import java .util .HashMap ;
2020import java .util .List ;
@@ -204,7 +204,7 @@ private static void decodeAuth(AuthConfig config) throws IOException {
204204 return ;
205205 }
206206
207- String str = new String (Base64 .decodeBase64 (config .getAuth ()), StandardCharsets .UTF_8 );
207+ String str = new String (Base64 .getDecoder (). decode (config .getAuth ()), StandardCharsets .UTF_8 );
208208 String [] parts = str .split (":" , 2 );
209209 if (parts .length != 2 ) {
210210 throw new IOException ("Invalid auth configuration file" );
Original file line number Diff line number Diff line change 33import static com .google .common .base .Preconditions .checkNotNull ;
44
55import java .io .IOException ;
6+ import java .util .Base64 ;
67
7- import org .apache .commons .codec .binary .Base64 ;
88import org .apache .commons .lang .builder .ReflectionToStringBuilder ;
99import org .apache .commons .lang .builder .ToStringStyle ;
1010import org .slf4j .Logger ;
@@ -46,7 +46,7 @@ public String toString() {
4646
4747 protected String registryAuth (AuthConfig authConfig ) {
4848 try {
49- return Base64 .encodeBase64String ( new ObjectMapper ().writeValueAsString (authConfig ). getBytes ( ));
49+ return Base64 .getEncoder (). encodeToString ( new ObjectMapper ().writeValueAsBytes (authConfig ));
5050 } catch (IOException e ) {
5151 throw new RuntimeException (e );
5252 }
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ Import-Template:
1111 com.google.common.*;version="${guava.version:short}",
1212 io.netty.*;version="${netty.version:default}";resolution:=optional,
1313 javax.ws.rs.*;version="[2.0.0, 2.1.0)",
14- org.apache.commons.codec.*;version="${commons-codec.version:short}",
1514 org.apache.commons.compress.*;version="${commons-compress.version:short}",
1615 org.apache.commons.io.*;version="${commons-io.version:short}",
1716 org.apache.commons.lang.*;version="${commons-lang.version:short}",
You can’t perform that action at this time.
0 commit comments