From 7872ad6e183e0d6ecbef38f28a768cca5df21f5d Mon Sep 17 00:00:00 2001 From: Will Sargent Date: Fri, 19 Aug 2022 09:32:24 -0700 Subject: [PATCH] fix gradle to require jdk 8 compat (#43) --- .../tersesystems/blacklite/codec/zstd/ZStdDictCodec.java | 2 +- .../com/tersesystems/blacklite/codec/zstd/ZStdUtils.java | 3 ++- .../tersesystems/blacklite/reader/BlackliteReader.java | 3 ++- .../tersesystems/blacklite/reader/CompressDatabase.java | 9 +++------ .../tersesystems/blacklite/reader/QueryBuilderTest.java | 3 +-- build.gradle | 6 ++++++ 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdDictCodec.java b/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdDictCodec.java index ee4e29a..73aa5d1 100644 --- a/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdDictCodec.java +++ b/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdDictCodec.java @@ -74,7 +74,7 @@ public byte[] decode(byte[] compressed) { } else { // XXX should cache this so we don't have to do look up repeatedly final Optional lookup = repository.lookup(dictIdFromDict); - if (lookup.isEmpty()) { + if (! lookup.isPresent()) { throw new NoDictionaryFoundException("No dictionary found for dictId", dictIdFromDict); } final ZStdDict zstdDict = lookup.get(); diff --git a/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdUtils.java b/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdUtils.java index 9082d5e..8b3b910 100644 --- a/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdUtils.java +++ b/blacklite-codec-zstd/src/main/java/com/tersesystems/blacklite/codec/zstd/ZStdUtils.java @@ -36,7 +36,8 @@ public static byte[] trainDictionary(int sampleSize, int dictSize, Stream