Skip to content

Commit 72d10a5

Browse files
committed
Mechanical reformat of class Multibase with google-java-format
1 parent fbc3fe0 commit 72d10a5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/main/java/io/ipfs/multibase/Multibase.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package io.ipfs.multibase;
22

3-
import io.ipfs.multibase.binary.*;
4-
import io.ipfs.multibase.binary.Base64;
3+
import java.util.Map;
4+
import java.util.TreeMap;
55

6-
import java.util.*;
6+
import io.ipfs.multibase.binary.Base32;
7+
import io.ipfs.multibase.binary.Base64;
78

89
public class Multibase {
910

@@ -39,7 +40,7 @@ public enum Base {
3940

4041
private static Map<Character, Base> lookup = new TreeMap<>();
4142
static {
42-
for (Base b: Base.values())
43+
for (Base b : Base.values())
4344
lookup.put(b.prefix, b);
4445
}
4546

@@ -52,6 +53,7 @@ public static Base lookup(char p) {
5253

5354
public static String encode(Base b, byte[] data) {
5455
switch (b) {
56+
case
5557
case Base58BTC:
5658
return b.prefix + Base58.encode(data);
5759
case Base16:
@@ -96,7 +98,7 @@ public static Base encoding(String data) {
9698
}
9799

98100
public static byte[] decode(String data) {
99-
if(data.isEmpty()) {
101+
if (data.isEmpty()) {
100102
throw new IllegalArgumentException("Cannot decode an empty string");
101103
}
102104
Base b = encoding(data);

0 commit comments

Comments
 (0)