diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-05-30 14:59:41 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-05-30 14:59:41 +0000 |
commit | 685ae449325bb6196c767dedf5d1902927abfb48 (patch) | |
tree | d3a391604f57662c86be9cc1672f3816ac74cc0d /src | |
parent | 76ec35bfe6aabf8c8cb0141dd7d3d123b5a4c181 (diff) |
Fixed bug which allowed dereferencing properties against type Query in filter expressions.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/amazon/carbonado/filter/FilterParser.java | 4 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/info/ChainedProperty.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/amazon/carbonado/filter/FilterParser.java b/src/main/java/com/amazon/carbonado/filter/FilterParser.java index baf264d..a0a178d 100644 --- a/src/main/java/com/amazon/carbonado/filter/FilterParser.java +++ b/src/main/java/com/amazon/carbonado/filter/FilterParser.java @@ -220,7 +220,7 @@ class FilterParser<S extends Storable> { }
List<StorableProperty<?>> chain = new ArrayList<StorableProperty<?>>(4);
- Class<?> type = prime.isJoin() ? prime.getJoinedType() : prime.getType();
+ Class<?> type = prime.getType();
while (true) {
ident = parseIdentifier();
@@ -238,7 +238,7 @@ class FilterParser<S extends Storable> { type = prop.isJoin() ? prop.getJoinedType() : prop.getType();
} else {
throw error("Property \"" + ident + "\" not found for type \"" +
- type.getName() + "\" because type has no properties");
+ type.getName() + "\" because it has no properties");
}
if (nextCharIgnoreWhitespace() != '.') {
mPos--;
diff --git a/src/main/java/com/amazon/carbonado/info/ChainedProperty.java b/src/main/java/com/amazon/carbonado/info/ChainedProperty.java index 0299ae8..7d21a49 100644 --- a/src/main/java/com/amazon/carbonado/info/ChainedProperty.java +++ b/src/main/java/com/amazon/carbonado/info/ChainedProperty.java @@ -101,7 +101,7 @@ public class ChainedProperty<S extends Storable> implements Appender { }
List<StorableProperty<?>> chain = new ArrayList<StorableProperty<?>>(4);
- Class<?> type = prime.isJoin() ? prime.getJoinedType() : prime.getType();
+ Class<?> type = prime.getType();
while (pos > 0) {
dot = str.indexOf('.', pos);
@@ -127,7 +127,7 @@ public class ChainedProperty<S extends Storable> implements Appender { } else {
throw new IllegalArgumentException
("Property \"" + name + "\" not found for type \"" +
- type.getName() + "\" because type has no properties");
+ type.getName() + "\" because it has no properties");
}
}
|