From 0947834ac950fb4dd59b719cbdddc1726e68674b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 11 Jan 2007 23:19:44 +0000 Subject: Fixes for bugs found using FindBugs. --- src/main/java/com/amazon/carbonado/info/StorableIndex.java | 2 +- src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/amazon/carbonado/info') diff --git a/src/main/java/com/amazon/carbonado/info/StorableIndex.java b/src/main/java/com/amazon/carbonado/info/StorableIndex.java index c1a5c47..49697c0 100644 --- a/src/main/java/com/amazon/carbonado/info/StorableIndex.java +++ b/src/main/java/com/amazon/carbonado/info/StorableIndex.java @@ -115,7 +115,7 @@ public class StorableIndex implements Appender { int size = properties.size(); if (size == 0 || size != directions.size()) { - new IllegalArgumentException("No properties specified"); + throw new IllegalArgumentException("No properties specified"); } StorableIndex index = new StorableIndex diff --git a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java index 29158f1..8be3d02 100644 --- a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java +++ b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java @@ -250,6 +250,12 @@ public class StorableIntrospector { this.name = name; this.direction = direction; } + + @Override + public int hashCode() { + return name.hashCode() + direction.hashCode(); + } + @Override public boolean equals(Object obj) { if (this == obj) { -- cgit v1.2.3