Accumulo
  1. Accumulo
  2. ACCUMULO-2021

Replace ArgumentChecker with Guava's Preconditions

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: client
    • Labels:
      None

      Description

      ArgumentChecker has some convenience methods to perform validation on variables provided to methods to ensure that they meet certain requirements. ArgumentChecker works in that regard, but lacks some helpfulness like allowing the caller to provide an error message.

      Guava's Preconditions class has a wide variety of methods that perform the same functionality and already have the error message support built in.

        Issue Links

          Activity

          Hide
          Bill Havanki added a comment -

          Review up. Lots of little changes.

          Show
          Bill Havanki added a comment - Review up. Lots of little changes.
          Hide
          ASF subversion and git services added a comment -

          Commit b94e308e5dcfc4bd19c735e9d323ea90b3d7d54c in branch refs/heads/master from Bill Havanki
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=b94e308 ]

          ACCUMULO-2021 Replace ArgumentChecker with Guava Preconditions

          The ArgumentChecker offers some of the same argument checks as the Preconditions class
          in Guava. This commit eliminates ArgumentChecker and replaces its uses with calls to
          Preconditions, particularly Preconditions.checkArgument(). The Validator class inside
          ArgumentChecker was also promoted to a regular class with its own unit test.

          Show
          ASF subversion and git services added a comment - Commit b94e308e5dcfc4bd19c735e9d323ea90b3d7d54c in branch refs/heads/master from Bill Havanki [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=b94e308 ] ACCUMULO-2021 Replace ArgumentChecker with Guava Preconditions The ArgumentChecker offers some of the same argument checks as the Preconditions class in Guava. This commit eliminates ArgumentChecker and replaces its uses with calls to Preconditions, particularly Preconditions.checkArgument(). The Validator class inside ArgumentChecker was also promoted to a regular class with its own unit test.
          Hide
          ASF subversion and git services added a comment -

          Commit dcc19ccbada8c2f0a206ec797455294015e8ca6d in accumulo's branch refs/heads/master from Christopher Tubbs
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=dcc19cc ]

          ACCUMULO-1961 Re-apply inadvertently dropped 4abb3f1 to master branch

          Fixes trivial warnings and broken javadocs which have been recently
          introduced. Specifically, removes references to private and
          package-private (default) classes in public javadoc comments (internal
          details aren't relevant to the API and subject to change). Another
          common warning was unused imports and javadoc param tags that refer to
          non-existent parameters.

          Commits against the following JIRA issues introduced these:
          ACCUMULO-1948, ACCUMULO-1974, ACCUMULO-2021, ACCUMULO-2136,
          ACCUMULO-2322, ACCUMULO-2334, ACCUMULO-2350

          Show
          ASF subversion and git services added a comment - Commit dcc19ccbada8c2f0a206ec797455294015e8ca6d in accumulo's branch refs/heads/master from Christopher Tubbs [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=dcc19cc ] ACCUMULO-1961 Re-apply inadvertently dropped 4abb3f1 to master branch Fixes trivial warnings and broken javadocs which have been recently introduced. Specifically, removes references to private and package-private (default) classes in public javadoc comments (internal details aren't relevant to the API and subject to change). Another common warning was unused imports and javadoc param tags that refer to non-existent parameters. Commits against the following JIRA issues introduced these: ACCUMULO-1948 , ACCUMULO-1974 , ACCUMULO-2021 , ACCUMULO-2136 , ACCUMULO-2322 , ACCUMULO-2334 , ACCUMULO-2350

            People

            • Assignee:
              Bill Havanki
              Reporter:
              Josh Elser
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development