accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhutchis <>
Subject [GitHub] accumulo pull request: Fix precondition check in AbstractEncoder.
Date Fri, 12 Jun 2015 06:20:01 GMT
Github user dhutchis commented on the pull request:
    Apparently this isn't as simple a fix as I thought.  Why is it supposed to fail in this
    try {
          lexicoder.decode(encoded, encoded.length, 0);
          fail("Should throw on offset==length.");
        } catch (IllegalArgumentException e) {}
    Here is my use case:
      public void testAbstractEncoderDecode() {
        AbstractEncoder<Long> encoder = new LongCombiner.StringEncoder();
        byte[] bytes = "a334".getBytes();
        Assert.assertEquals(334, encoder.decode(bytes, 1, 3).longValue());
    Will have to look further into the tests.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message