diff --git a/G-Earth/src/main/java/gearth/encoding/Base64Encoding.java b/G-Earth/src/main/java/gearth/encoding/Base64Encoding.java index 02aaaf7..bf45ceb 100644 --- a/G-Earth/src/main/java/gearth/encoding/Base64Encoding.java +++ b/G-Earth/src/main/java/gearth/encoding/Base64Encoding.java @@ -20,14 +20,10 @@ public class Base64Encoding { public static int decode(byte[] data) { int res = 0; - for (int k = data.length - 1, i = 0; k >= 0; k--, i++) - { - int x = data[k] - 0x40; - if (i > 0){ - res += x << (i * 6); - } else { - res += x; - } + for (byte x : data) { + final int byteVal = x - 0x40; + + res = (res << 6) | byteVal; } return res; diff --git a/pom.xml b/pom.xml index 3e2c7b6..e2c5cfd 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ - 1.5.4-beta-5 + 1.5.4-beta-6 -SNAPSHOT 1.5.3