Update LICENSE, checkstyle, package-info
diff --git a/LICENSE b/LICENSE
index 3ff6c45..a1ed1a3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -225,10 +225,10 @@
Code locations:
-------------------------------------------------------------
This product contains a method to create a dummy read-only ByteBuffer using unsafe:
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/main/java/org/apache/datasketches/memory/AccessByteBuffer.java,
+ * src/main/java/org/apache/datasketches/memory/AccessByteBuffer.java,
Method: getDummyReadOnlyDirectByteBuffer(...)
and adapted from Java source code located at:
- * https://github.com/odnoklassniki/one-nio/blob/master/src/one/nio/mem/DirectMemory.java,
+ * src/one/nio/mem/DirectMemory.java,
Method: wrap(...).
@@ -242,10 +242,10 @@
Code locations:
-------------------------------------------------------------
This product contains code to implement and test the xxHash function:
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/main/java/org/apache/datasketches/memory/XxHash64.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/XxHash64Test.java
+ * src/main/java/org/apache/datasketches/memory/XxHash64.java
+ * src/test/java/org/apache/datasketches/memory/XxHash64Test.java
Method: collisionTest(),
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/XxHash64LoopingTest.java
+ * src/test/java/org/apache/datasketches/memory/XxHash64LoopingTest.java
Method: testWithSeed() and HASHES_OF_LOOPING_BYTES_WITH_SEED_42 test data,
and adapted from Java source code located at:
* https://github.com/OpenHFT/Zero-Allocation-Hashing
@@ -290,9 +290,9 @@
Code locations:
-------------------------------------------------------------
This product contains code for encoding, decoding and testing UTF8:
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/main/java/org/apache/datasketches/memory/Utf8.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/Utf8Test.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/IsValidUtf8TestUtil.java
+ * src/main/java/org/apache/datasketches/memory/Utf8.java
+ * src/test/java/org/apache/datasketches/memory/Utf8Test.java
+ * src/test/java/org/apache/datasketches/memory/IsValidUtf8TestUtil.java
and adapted from Java source code located at:
* https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/main/java/com/google/protobuf/Utf8.java,
* https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/test/java/com/google/protobuf/Utf8Test.java,
@@ -331,7 +331,7 @@
Code locations:
-------------------------------------------------------------
This product contains code for encoding, decoding and testing UTF8:
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/main/java/org/apache/datasketches/memory/XxHash64.java
+ * src/main/java/org/apache/datasketches/memory/XxHash64.java
and adapted from C++ code located at:
* https://github.com/Cyan4973/xxHash/blob/dev/xxhash.c,
* https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h
@@ -341,9 +341,10 @@
=============================================================
Public Domain (optional notice)
=============================================================
- This product contains the text of Lincoln's Gettysburg Address, which is in the public domain, and is used in various file tests.
- This file is read-only and tested for its exact character sequence and cannot be appended with any additional text.
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/AllocateDirectMapMemoryTest.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/AllocateDirectWritableMapMemoryTest.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/MemoryTest.java
- * https://github.com/apache/incubator-datasketches-memory/blob/master/src/test/java/org/apache/datasketches/memory/UtilTest.java
+ This product contains the text of Lincoln's Gettysburg Address, which is in the public domain,
+ and is used in various file tests. This file is read-only and tested for its exact character
+ sequence and cannot be appended with any additional text.
+ * src/test/java/org/apache/datasketches/memory/AllocateDirectMapMemoryTest.java
+ * src/test/java/org/apache/datasketches/memory/AllocateDirectWritableMapMemoryTest.java
+ * src/test/java/org/apache/datasketches/memory/MemoryTest.java
+ * src/test/java/org/apache/datasketches/memory/UtilTest.java
diff --git a/src/main/java/org/apache/datasketches/memory/package-info.java b/src/main/java/org/apache/datasketches/memory/package-info.java
index 476e82a..6cfbe5f 100644
--- a/src/main/java/org/apache/datasketches/memory/package-info.java
+++ b/src/main/java/org/apache/datasketches/memory/package-info.java
@@ -61,7 +61,7 @@
*
* <p>More specifically, this package provides access to four different types of resources using
* two different access APIs. These resources are contiguous blobs of bytes that provide at least
- * byte-level read and write access. The four resources are:
+ * byte-level read and write access. The four resources are:</p>
*
* <ul><li>Direct (a.k.a. Native) off-heap memory allocated by the user.</li>
* <li>Memory-mapped files, both writable and read-only.</li>
@@ -69,7 +69,7 @@
* <li>Heap-based primitive arrays, which can be accessed as writable or read-only.</li>
* </ul>
*
- * <p>The two different access APIs are:
+ * <p>The two different access APIs are:</p>
* <ul><li><i>Memory, WritableMemory</i>: Absolute offset addressing into a resource.</li>
* <li><i>Buffer, WritableBuffer</i>: Position relative addressing into a resource.</li>
* </ul>
@@ -77,21 +77,21 @@
* <p>In addition, all combinations of access APIs and backing resources can be accessed via
* multibyte primitive methods (e.g.
* <i>getLong(...), getLongArray(...), putLong(...), putLongArray(...)</i>) as either
- * {@link java.nio.ByteOrder#BIG_ENDIAN} or {@link java.nio.ByteOrder#LITTLE_ENDIAN}.
+ * {@link java.nio.ByteOrder#BIG_ENDIAN} or {@link java.nio.ByteOrder#LITTLE_ENDIAN}.</p>
*
* <p>The resources don't know or care about the access APIs, and the access
- * APIs don't really know or care what resource they are accessing.
+ * APIs don't really know or care what resource they are accessing.</p>
*
- * An access API is joined with
+ * <p>An access API is joined with
* a resource either with a static factory method or in combination with a
- * {@link org.apache.datasketches.memory.Handle}, which is used exclusively for resources that are external to
- * the JVM, such as allocation of direct memory and memory-mapped files.
+ * {@link org.apache.datasketches.memory.Handle}, which is used exclusively for resources that are
+ * external to the JVM, such as allocation of direct memory and memory-mapped files.</p>
*
* <p>The role of a Handle is to hold onto the reference of a resource that is outside the control
- * of the JVM. The resource is obtained from the handle with {@code get()}.
+ * of the JVM. The resource is obtained from the handle with {@code get()}.</p>
*
* <p>When a handle is extended for an AutoCloseable resource and then joined with an access API
- * it becomes an <i>implementation handle</i>. There are 3 implementation handles:
+ * it becomes an <i>implementation handle</i>. There are 3 implementation handles:</p>
*
* <ul><li>{@link org.apache.datasketches.memory.MapHandle}
* for read-only access to a memory-mapped file</li>
@@ -101,13 +101,13 @@
* for writable access to off-heap memory.</li>
* </ul>
*
- * <p>As long as the implementation handle is valid the JVM will not attempt to close the resource.
+ * <p>As long as the implementation handle is valid the JVM will not attempt to close the resource.</p>
*
* <p>An implementation handle implements {@link java.lang.AutoCloseable},
* which also enables compile-time checks for non-closed resources. If a Handle is acquired
* in a try-with-resources (TWR) block, it's associated resource will be automatically closed by
* the JVM at the end of the block.
- * The resource can also be explicitly closed by the user by calling {@code Handle.close()}.
+ * The resource can also be explicitly closed by the user by calling {@code Handle.close()}.</p>
* <blockquote><pre>
* //Using try-with-resources block:
* try (WritableyMapHandle handle = WritableMemory.map(File file)) {
@@ -123,18 +123,18 @@
* </pre></blockquote>
*
* <p>Where it is desirable to pass ownership of the resource (and the {@code close()}
- * responsibility) one can not use the TWR block. Instead:
+ * responsibility) one can not use the TWR block. Instead:</p>
* <blockquote><pre>
* WritableMapHandle handler = WritableMemory.map(File file);
* doWorkAndClose(handle); //passes the handle to object that closes the resource.
* </pre></blockquote>
*
- * Whatever part of your process is responsible for allocating a resource external
+ * <p>Whatever part of your process is responsible for allocating a resource external
* to the JVM must be responsible for closing it or making sure it gets closed.
* Since only the implementation Handles implement AutoCloseable, you must not let go of the
- * handle reference until you are done with its associated resource.
+ * handle reference until you are done with its associated resource.</p>
*
- * As mentioned above, there are two ways to do this:
+ * <p>As mentioned above, there are two ways to do this:</p>
* <ul><li>Use a try-with-resources block. At the end of the block, the JVM will automatically
* close the resource.</li>
*
@@ -149,7 +149,7 @@
* hard-to-find bug.</li>
* </ul>
*
- *<p>Moving back and forth between <i>Memory</i> and <i>Buffer</i>:
+ *<p>Moving back and forth between <i>Memory</i> and <i>Buffer</i>:</p>
*<blockquote><pre>
* Memory mem = ...
* Buffer buf = mem.asBuffer();
@@ -158,15 +158,15 @@
* ...
* </pre></blockquote>
*
- * <p>Hierarchical memory regions can be easily created:
+ * <p>Hierarchical memory regions can be easily created:</p>
* <blockquote><pre>
* WritableMemory wMem = ...
* WritableMemory wReg = wMem.writableRegion(offset, length); //OR
* Memory reg = wMem.region(offset, length);
* </pre></blockquote>
*
- * With asserts enabled in the JVM, all methods are checked for bounds and
- * use-after-close violations.
+ * <p>With asserts enabled in the JVM, all methods are checked for bounds and
+ * use-after-close violations.</p>
*
* @author Lee Rhodes
*/
diff --git a/tools/MemoryCheckstyle.xml b/tools/MemoryCheckstyle.xml
index 33ceb8b..1769b6c 100644
--- a/tools/MemoryCheckstyle.xml
+++ b/tools/MemoryCheckstyle.xml
@@ -48,6 +48,14 @@
<property name="lineSeparator" value="lf"/>
</module>
+ <!-- Size Violations -->
+ <module name="LineLength">
+ <property name="severity" value="warning"/>
+ <property name="max" value="110"/>
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+ <!-- <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/> -->
+ </module>
+
<module name="TreeWalker">
<!-- Annotations -->
@@ -185,7 +193,7 @@
<property name="allowMissingParamTags" value="false"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="false"/>
- <property name="minLineCount" value="2"/>
+ <!-- <property name="minLineCount" value="2"/> -->
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
@@ -333,14 +341,6 @@
<property name="ignoreComments" value="true"/>
</module>
- <!-- Size Violations -->
- <module name="LineLength">
- <property name="severity" value="warning"/>
- <property name="max" value="110"/>
- <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
- <!-- <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/> -->
- </module>
-
<!-- Whitespace -->
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>