Dhairya-007 opened a new pull request, #29952:
URL: https://github.com/apache/camel/pull/29952
## Problem
In `CamelJBangConstants`, two boolean properties declare a directory path as
their default value:
```java
@Metadata(description = "Work directory for compiler. Can be used to write
compiled classes or other resources.",
javaType = "String", defaultValue = ".camel-jbang/compile", label
= "advanced")
public static final String COMPILE_WORK_DIR = "camel.jbang.compileWorkDir";
@Deprecated
@Metadata(description = "Health check at /observe/health on local HTTP
server (port 8080 by default)",
javaType = "boolean", defaultValue = ".camel-jbang/compile",
deprecationNote = "Deprecated: use observe instead")
public static final String HEALTH = "camel.jbang.health";
@Deprecated
@Metadata(description = "Metrics ... when running standalone Camel",
javaType = "boolean", defaultValue = ".camel-jbang/compile",
deprecationNote = "Deprecated: use observe instead")
public static final String METRICS = "camel.jbang.metrics";
```
`.camel-jbang/compile` belongs to `COMPILE_WORK_DIR` directly above, and was
carried down onto the next two properties.
It stays invisible today only by coincidence: the metadata generator sees
`javaType = "boolean"` and runs the string through boolean parsing, where
anything unparseable gives `false`, and `false` happens to be the real default
- `Run.ServerOptions` declares `boolean health;` and `boolean metrics;` with no
initialiser. So the published catalog reads `"defaultValue": false` and nobody
has had a reason to look at the source.
## Fix
Declare `defaultValue = "false"` on both, matching how the other boolean
properties in the class are written (`camel.jbang.download`,
`camel.jbang.fresh` and the rest).
The generated `camel-jbang-configuration-metadata.json` and
`camel-jbang-configuration.adoc` are unchanged by this, which is why no
generated file is in the diff.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]