Merge branch '1.6.0-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/80f8439a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/80f8439a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/80f8439a Branch: refs/heads/master Commit: 80f8439ab110b82e6a39d4a2103c9357f082ff9d Parents: a23cd8e 3ec25db Author: Eric Newton <[email protected]> Authored: Wed Dec 18 09:50:35 2013 -0500 Committer: Eric Newton <[email protected]> Committed: Wed Dec 18 09:50:35 2013 -0500 ---------------------------------------------------------------------- .../java/org/apache/accumulo/core/data/Key.java | 13 ++ .../org/apache/accumulo/core/data/Mutation.java | 7 + .../org/apache/accumulo/core/data/KeyTest.java | 30 +++- .../apache/accumulo/core/data/MutationTest.java | 143 ++++++++++++------- .../apache/accumulo/core/data/OldMutation.java | 7 + 5 files changed, 143 insertions(+), 57 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/80f8439a/core/src/main/java/org/apache/accumulo/core/data/Key.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/80f8439a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java ---------------------------------------------------------------------- diff --cc core/src/main/java/org/apache/accumulo/core/data/Mutation.java index d7f7f58,83a2dc1..42fa143 --- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java +++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java @@@ -151,13 -111,15 +151,20 @@@ public class Mutation implements Writab this.data = ByteBufferUtil.toBytes(tmutation.data); this.entries = tmutation.entries; this.values = ByteBufferUtil.toBytesList(tmutation.values); + + if (this.row == null) { + throw new IllegalArgumentException("null row"); + } + if (this.data == null) { + throw new IllegalArgumentException("null serialized data"); + } } + /** + * Creates a new mutation by copying another. + * + * @param m mutation to copy + */ public Mutation(Mutation m) { m.serialize(); this.row = m.row;
