You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2019/07/10 20:08:32 UTC

[accumulo] branch 2.0 updated: Improve ID javadoc (#1261)

This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.0 by this push:
     new 5a4a969  Improve ID javadoc (#1261)
5a4a969 is described below

commit 5a4a969ab1b873393fce1ffac2d474e60d0efb0c
Author: Mike Miller <mm...@apache.org>
AuthorDate: Wed Jul 10 16:08:26 2019 -0400

    Improve ID javadoc (#1261)
---
 core/src/main/java/org/apache/accumulo/core/data/AbstractId.java  | 2 +-
 core/src/main/java/org/apache/accumulo/core/data/NamespaceId.java | 3 ++-
 core/src/main/java/org/apache/accumulo/core/data/TableId.java     | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/data/AbstractId.java b/core/src/main/java/org/apache/accumulo/core/data/AbstractId.java
index 63492d0..af2c5b2 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/AbstractId.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/AbstractId.java
@@ -56,7 +56,7 @@ public abstract class AbstractId<T extends AbstractId<T>> implements Comparable<
   }
 
   /**
-   * Returns a string of the canonical ID
+   * Returns a string of the canonical ID. This is guaranteed to be non-null.
    */
   @Override
   public String toString() {
diff --git a/core/src/main/java/org/apache/accumulo/core/data/NamespaceId.java b/core/src/main/java/org/apache/accumulo/core/data/NamespaceId.java
index 643e0ae..16952c2 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/NamespaceId.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/NamespaceId.java
@@ -24,6 +24,7 @@ import com.google.common.cache.CacheBuilder;
 /**
  * A strongly typed representation of a namespace ID. This class cannot be used to get a namespace
  * ID from a namespace name, but does provide the namespace ID string wrapped with a stronger type.
+ * The constructor for this class will throw an error if the canonical parameter is null.
  *
  * @since 2.0.0
  */
@@ -36,7 +37,7 @@ public class NamespaceId extends AbstractId<NamespaceId> {
   }
 
   /**
-   * Get a Namespace.ID object for the provided canonical string.
+   * Get a NamespaceId object for the provided canonical string. This is guaranteed to be non-null
    *
    * @param canonical
    *          Namespace ID string
diff --git a/core/src/main/java/org/apache/accumulo/core/data/TableId.java b/core/src/main/java/org/apache/accumulo/core/data/TableId.java
index 7ed052f..71e7377 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/TableId.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/TableId.java
@@ -23,7 +23,8 @@ import com.google.common.cache.CacheBuilder;
 
 /**
  * A strongly typed representation of a table ID. This class cannot be used to get a table ID from a
- * table name, but does provide the table ID string wrapped with a stronger type.
+ * table name, but does provide the table ID string wrapped with a stronger type. The constructor
+ * for this class will throw an error if the canonical parameter is null.
  *
  * @since 2.0.0
  */
@@ -36,7 +37,7 @@ public class TableId extends AbstractId<TableId> {
   }
 
   /**
-   * Get a Table.ID object for the provided canonical string.
+   * Get a TableId object for the provided canonical string. This is guaranteed to be non-null.
    *
    * @param canonical
    *          table ID string