aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2023-08-23 10:52:41 +0200
committerGitHub <noreply@github.com>2023-08-23 10:52:41 +0200
commit2a45a1c85f78bac78a8eace3c99998e1c92e1c4a (patch)
treed7b57c2c59c567fe8a7bcf12939e700837a2d399
parent2dd6924585799a8d1bc5319093871e586b659add (diff)
parenta267af232edaeb0355be1035728ea83e9613d4ea (diff)
Merge pull request #28121 from vespa-engine/hmusum/warn-when-using-file-type
Give warning when config type 'file' is used
-rw-r--r--configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java b/configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java
index 1395c6814df..59b1c781c76 100644
--- a/configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java
+++ b/configgen/src/main/java/com/yahoo/config/codegen/LeafCNode.java
@@ -24,7 +24,11 @@ public abstract class LeafCNode extends CNode {
case "bool": return new BooleanLeaf(parent, name);
case "string": return new StringLeaf(parent, name);
case "reference": return new ReferenceLeaf(parent, name);
- case "file": return new FileLeaf(parent, name);
+ case "file": {
+ // Note: Used internally and also no support for path in C++, so cannot be removed in Vespa 9
+ System.out.println("Warning: config type 'file' is deprecated, use 'path' instead");
+ return new FileLeaf(parent, name);
+ }
case "path": return new PathLeaf(parent, name);
case "enum": return new EnumLeaf(parent, name, type.enumArray);
case "url" : return new UrlLeaf(parent, name);