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/qe/IndexedQueryAnalyzer.java | 2 +- src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/qe') diff --git a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java index 6e87c7a..366c2d7 100644 --- a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java +++ b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java @@ -113,7 +113,7 @@ public class IndexedQueryAnalyzer { // Now try to find best foreign index. - if (bestLocalScore.getFilteringScore().isKeyMatch()) { + if (bestLocalScore != null && bestLocalScore.getFilteringScore().isKeyMatch()) { // Don't bother checking foreign indexes. The local one is perfect. return new Result(filter, bestLocalScore, bestLocalIndex, null, null); } diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java index 64888ba..ea60490 100644 --- a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java +++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java @@ -330,7 +330,7 @@ public class UnionQueryAnalyzer implements QueryExecutorFact OrderingScore score = result.getCompositeScore().getOrderingScore(); OrderingList handled = score.getHandledOrdering(); for (OrderedProperty property : handled) { - if (chained.equals(property)) { + if (chained.equals(property.getChainedProperty())) { return property.getDirection(); } } -- cgit v1.2.3