Author: sergiykarpenko
Date: 2010-08-30 10:59:35 -0400 (Mon, 30 Aug 2010)
New Revision: 3014
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java
Log:
EXOJCR-924: Warning message is hided in case if there is registered samename properties
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java 2010-08-30
11:41:41 UTC (rev 3013)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java 2010-08-30
14:59:35 UTC (rev 3014)
@@ -1175,11 +1175,17 @@
}
catch (RepositoryException e)
{
- log.warn("Unable to coerce '" + literal + "'
into a NAME: " + e.toString());
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a NAME: " + e.toString());
+ }
}
catch (IllegalNameException e)
{
- log.warn("Unable to coerce '" + literal + "'
into a NAME: " + e.toString());
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a NAME: " + e.toString());
+ }
}
break;
case PropertyType.PATH :
@@ -1192,7 +1198,10 @@
}
catch (RepositoryException e)
{
- log.warn("Unable to coerce '" + literal + "'
into a PATH: " + e.toString());
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a PATH: " + e.toString());
+ }
}
break;
case PropertyType.DATE :
@@ -1205,7 +1214,10 @@
}
else
{
- log.warn("Unable to coerce '" + literal + "'
into a DATE.");
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a DATE.");
+ }
}
break;
case PropertyType.DOUBLE :
@@ -1218,7 +1230,10 @@
}
catch (NumberFormatException e)
{
- log.warn("Unable to coerce '" + literal + "'
into a DOUBLE: " + e.toString());
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a DOUBLE: " + e.toString());
+ }
}
break;
case PropertyType.LONG :
@@ -1231,7 +1246,10 @@
}
catch (NumberFormatException e)
{
- log.warn("Unable to coerce '" + literal + "'
into a LONG: " + e.toString());
+ if (types.length == 1)
+ {
+ log.warn("Unable to coerce '" + literal + "'
into a LONG: " + e.toString());
+ }
}
break;
case PropertyType.STRING :
@@ -1240,6 +1258,7 @@
break;
}
}
+
if (values.size() == 0)
{
// use literal as is then try to guess other types