diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-01-11 23:19:44 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-01-11 23:19:44 +0000 |
commit | 0947834ac950fb4dd59b719cbdddc1726e68674b (patch) | |
tree | dbd0be38df31a000ee178a60dac3557de0f1ad58 /src/main/java/com/amazon/carbonado/info | |
parent | 1ce80a9798cc52b12074fcdf1acf32b0fdfe0569 (diff) |
Fixes for bugs found using FindBugs.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/info')
-rw-r--r-- | src/main/java/com/amazon/carbonado/info/StorableIndex.java | 2 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | 6 |
2 files changed, 7 insertions, 1 deletions
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<S extends Storable> implements Appender { int size = properties.size();
if (size == 0 || size != directions.size()) {
- new IllegalArgumentException("No properties specified");
+ throw new IllegalArgumentException("No properties specified");
}
StorableIndex<S> index = new StorableIndex<S>
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) {
|