summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-10-27 16:33:24 +0200
committerjonmv <venstad@gmail.com>2023-10-27 16:33:24 +0200
commit575257be6623d1aaeeeb83d66ab6ffb536b00999 (patch)
tree84620ffdfd397e8fc2b4a00ce6c7fe6ff6798ad8 /container-search/src/main/java/com/yahoo/search/query
parent026305ca0de9f2b446e62d85c153df6324e0a0ff (diff)
Catch IAE when looking up tensor type in rank profile input properties
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/RankProfileInputProperties.java12
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);