File tree 1 file changed +4
-7
lines changed
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/io
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,14 @@ class Base64ProtocolResolver implements ProtocolResolver {
35
35
@ Override
36
36
public Resource resolve (String location , ResourceLoader resourceLoader ) {
37
37
if (location .startsWith (BASE64_PREFIX )) {
38
- return new Base64ByteArrayResource (location .substring (BASE64_PREFIX .length ()));
38
+ String value = location .substring (BASE64_PREFIX .length ());
39
+ return new ByteArrayResource (decode (value ));
39
40
}
40
41
return null ;
41
42
}
42
43
43
- static class Base64ByteArrayResource extends ByteArrayResource {
44
-
45
- Base64ByteArrayResource (String location ) {
46
- super (Base64 .getDecoder ().decode (location .getBytes ()));
47
- }
48
-
44
+ private static byte [] decode (String location ) {
45
+ return Base64 .getDecoder ().decode (location );
49
46
}
50
47
51
48
}
You can’t perform that action at this time.
0 commit comments