mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MNT-21967 - ClassCastException when using CMIS query with SCORE() function (#128)
* Added missing validation before if columnName is the expected column before normalizing value to float, in case the column is Score
This commit is contained in:
@@ -177,13 +177,13 @@ public class CMISResultSetRow implements ResultSetRow
|
||||
context.setScore(getScore());
|
||||
for (Column column : query.getColumns())
|
||||
{
|
||||
// When an SCORE selector is included, score must be adapted to range 0..1 due to CMIS specification
|
||||
if (column.getAlias().equals(columnName))
|
||||
{
|
||||
//When an SCORE selector is included, score must be adapted to range 0..1 due to CMIS specification
|
||||
if (column.getFunction()!= null && column.getFunction().getName().equals(Score.NAME))
|
||||
{
|
||||
return getNormalisedScore();
|
||||
}
|
||||
else if (column.getAlias().equals(columnName))
|
||||
{
|
||||
return column.getFunction().getValue(column.getFunctionArguments(), context);
|
||||
}
|
||||
// Special case for one selector - ignore any table aliases
|
||||
|
Reference in New Issue
Block a user