You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/03/29 18:51:30 UTC
[datasketches-memory] 01/01: Compiles but won't run.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch JDK14
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit b193f119563b6820b11ec89a61dad7677ac49333
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Mon Mar 29 11:45:01 2021 -0700
Compiles but won't run.
---
pom.xml | 2 +-
src/main/java/org/apache/datasketches/memory/NioBits.java | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index cfdef41..cda169e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,7 +95,7 @@ under the License.
<!-- System-wide properties -->
<maven.version>3.5.0</maven.version>
- <java.version>15</java.version>
+ <java.version>14</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<argLine>-Xmx4g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8</argLine>
diff --git a/src/main/java/org/apache/datasketches/memory/NioBits.java b/src/main/java/org/apache/datasketches/memory/NioBits.java
index c683491..efa85b4 100644
--- a/src/main/java/org/apache/datasketches/memory/NioBits.java
+++ b/src/main/java/org/apache/datasketches/memory/NioBits.java
@@ -66,11 +66,11 @@ final class NioBits {
NIO_BITS_CLASS = Class.forName("java.nio.Bits");
NIO_BITS_RESERVE_MEMORY_METHOD = NIO_BITS_CLASS
- .getDeclaredMethod("reserveMemory", long.class, int.class); //JD16 requires (long, long)
+ .getDeclaredMethod("reserveMemory", long.class, int.class); //TODO JD16 requires (long, long)
NIO_BITS_RESERVE_MEMORY_METHOD.setAccessible(true);
NIO_BITS_UNRESERVE_MEMORY_METHOD = NIO_BITS_CLASS
- .getDeclaredMethod("unreserveMemory", long.class, int.class); //JD16 requires (long, long)
+ .getDeclaredMethod("unreserveMemory", long.class, int.class); //TODO JD16 requires (long, long)
NIO_BITS_UNRESERVE_MEMORY_METHOD.setAccessible(true);
//JDK 8-10: "count", "reservedMemory", "totalCapacity"
@@ -167,9 +167,9 @@ final class NioBits {
while (capacity > 0) {
final long chunk = Math.min(capacity, chunkSizeLimit);
if (capacity == chunk) {
- method.invoke(null, allocationSize, (int) capacity); //JDK 16 remove cast to int
+ method.invoke(null, allocationSize, (int) capacity); //TODO JDK 16 remove cast to int
} else {
- method.invoke(null, chunk, (int) chunk); //JDK 16 remove cast to int
+ method.invoke(null, chunk, (int) chunk); //TODO JDK 16 remove cast to int
}
capacity -= chunk;
allocationSize -= chunk;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org