diff options
Diffstat (limited to 'container-search/src/main/java/com')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java b/container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java index 4e340d47016..c9f935e5f52 100644 --- a/container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java +++ b/container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java @@ -38,17 +38,17 @@ public class RankProfileInputProperties extends Properties { @Override public void set(CompoundName name, Object value, Map<String, String> context) { if (RankFeatures.isFeatureName(name.toString())) { - TensorType expectedType = typeOf(name); - if (expectedType != null) { - try { + try { + TensorType expectedType = typeOf(name); + if (expectedType != null) { value = tensorConverter.convertTo(expectedType, name.last(), value, query.getModel().getLanguage()); } - catch (IllegalArgumentException e) { - throw new IllegalInputException("Could not set '" + name + "' to '" + value + "'", e); - } + } + catch (IllegalArgumentException e) { + throw new IllegalInputException("Could not set '" + name + "' to '" + value + "'", e); } } super.set(name, value, context); |