gnodet commented on code in PR #23443:
URL: https://github.com/apache/camel/pull/23443#discussion_r3287565778
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/PluginHelper.java:
##########
@@ -575,6 +576,37 @@ public static void savePluginConfig(JsonObject plugins) {
}
}
+ /**
+ * Loads the list of known 3rd party plugins from the classpath resource
known-plugins.json.
+ */
+ public static List<JsonObject> loadKnownPlugins() {
+ try (InputStream is =
PluginHelper.class.getClassLoader().getResourceAsStream("known-plugins.json")) {
+ if (is != null) {
+ String text = new String(is.readAllBytes(),
java.nio.charset.StandardCharsets.UTF_8);
+ JsonArray arr = (JsonArray) Jsoner.deserialize(text);
+ List<JsonObject> result = new ArrayList<>(arr.size());
+ for (Object o : arr) {
Review Comment:
FQCN usage: `java.nio.charset.StandardCharsets.UTF_8` should be replaced
with `StandardCharsets.UTF_8` and `import java.nio.charset.StandardCharsets;`
added to the import block. The project convention (enforced by OpenRewrite in
CI) forbids inline FQCNs.
```suggestion
String text = new String(is.readAllBytes(),
StandardCharsets.UTF_8);
```
_Claude Code on behalf of Guillaume Nodet_
##########
dsl/camel-jbang/camel-jbang-core/src/main/resources/known-plugins.json:
##########
@@ -0,0 +1,20 @@
+[
+ {
+ "name": "forage",
+ "command": "forage",
+ "description": "Utilities for working with Forage components",
Review Comment:
@Croway suggested a better description for Forage: _"Configure components
via opinionated bean factories"_.
```suggestion
"description": "Configure components via opinionated bean factories",
```
_Claude Code on behalf of Guillaume Nodet_
--
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]