You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by th...@apache.org on 2009/08/28 09:16:10 UTC
svn commit: r808783 -
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java
Author: thomasm
Date: Fri Aug 28 07:16:10 2009
New Revision: 808783
URL: http://svn.apache.org/viewvc?rev=808783&view=rev
Log:
JSR 283: QOM and SQL2 - improve error message
("Static value 3.0 cannot be converted to a Long" instead of
"Static value InternalValue@xyz cannot be converted to a Long")
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java?rev=808783&r1=808782&r2=808783&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java Fri Aug 28 07:16:10 2009
@@ -188,7 +188,7 @@
staticValue.getLong();
} catch (ValueFormatException e) {
throw new InvalidQueryException("Static value " +
- staticValue.toString() + " cannot be converted to a Long");
+ staticValue.getString() + " cannot be converted to a Long");
}
PropertyValueImpl propValue = (PropertyValueImpl) node.getPropertyValue();
return new LengthOperand((PropertyValueOperand) propValue.accept(this, null));
Re: svn commit: r808783 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java
Posted by Thomas Müller <th...@day.com>.
Hi,
> Why not change the toString() method?
Good idea. I will file a bug.
Regards,
Thomas
Re: svn commit: r808783 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/constraint/ConstraintBuilder.java
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Fri, Aug 28, 2009 at 9:16 AM, <th...@apache.org> wrote:
> throw new InvalidQueryException("Static value " +
> - staticValue.toString() + " cannot be converted to a Long");
> + staticValue.getString() + " cannot be converted to a Long");
Why not change the toString() method? Then you could also write:
"Static value " + staticValue + " cannot be converted to a Long"
BR,
Jukka Zitting