From 7e291224fc03fd7e5db3c1c9a776f7e095f0a7cd Mon Sep 17 00:00:00 2001 From: Alberto Fernandez Date: Thu, 4 Jan 2024 01:01:45 +0100 Subject: [PATCH] Set minimum required java version to 1.8 before releasing version 2.0 --- pom.xml | 6 +++--- src/main/java/com/linuxense/javadbf/DBFUtils.java | 12 +----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 4044b74..c514b16 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ - 1.6 + 1.8 9 UTF-8 UTF-8 @@ -57,8 +57,8 @@ maven-compiler-plugin 3.7.0 - 1.6 - 1.6 + 1.8 + 1.8 diff --git a/src/main/java/com/linuxense/javadbf/DBFUtils.java b/src/main/java/com/linuxense/javadbf/DBFUtils.java index 7bc6e71..f17d98e 100644 --- a/src/main/java/com/linuxense/javadbf/DBFUtils.java +++ b/src/main/java/com/linuxense/javadbf/DBFUtils.java @@ -412,17 +412,7 @@ protected static byte[] readAllBytes(File file) throws IOException { } protected static BitSet getBitSet(byte[] bytes) { -// return BitSet.valueOf(bytes); - - BitSet bits = new BitSet(); - for (int i = 0; i < bytes.length * 8; i++) { - byte b = bytes[i/8]; - int bit = b & (1 << (i % 8)); - if (bit > 0) { - bits.set(i); - } - } - return bits; + return BitSet.valueOf(bytes); } protected static double toDouble(byte[] data) {