You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/10/25 09:39:23 UTC
[camel-quarkus] branch master updated: Added Javadoc to Package
Maven plugin
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 87a5d2e Added Javadoc to Package Maven plugin
87a5d2e is described below
commit 87a5d2eba1a08da32d9e83ee62f0272384d7f3bd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Oct 25 11:38:54 2019 +0200
Added Javadoc to Package Maven plugin
---
.../org/apache/camel/quarkus/maven/JSonSchemaHelper.java | 16 ++++++++++++++++
.../org/apache/camel/quarkus/maven/PackageHelper.java | 8 +++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java
index 22ad577..417aa09 100644
--- a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java
+++ b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java
@@ -25,6 +25,7 @@ import java.util.stream.Collectors;
import org.apache.camel.util.json.JsonObject;
import org.apache.camel.util.json.Jsoner;
+
public final class JSonSchemaHelper {
private JSonSchemaHelper() {
@@ -35,6 +36,7 @@ public final class JSonSchemaHelper {
*
* @param group the group to parse from such as <tt>component</tt>, <tt>componentProperties</tt>, or <tt>properties</tt>.
* @param json the json
+ * @param parseProperties parse properties or not
* @return a list of all the rows, where each row is a set of key value pairs with metadata
*/
public static List<Map<String, String>> parseJsonSchema(String group, String json, boolean parseProperties) {
@@ -113,6 +115,10 @@ public final class JSonSchemaHelper {
/**
* Gets the value with the key in a safe way, eg returning an empty string if there was no value for the key.
+ *
+ * @param key the key to search for
+ * @param rows the rows to search in
+ * @return the value found or empty string
*/
public static String getSafeValue(String key, List<Map<String, String>> rows) {
for (Map<String, String> row : rows) {
@@ -126,6 +132,10 @@ public final class JSonSchemaHelper {
/**
* Gets the value with the key in a safe way, eg returning an empty string if there was no value for the key.
+ *
+ * @param key the key to search for
+ * @param rows the rows to search in
+ * @return the value found or empty string
*/
public static String getSafeValue(String key, Map<String, String> rows) {
String value = rows.get(key);
@@ -135,6 +145,12 @@ public final class JSonSchemaHelper {
return "";
}
+ /**
+ *
+ * @param rows the rows to search in
+ * @param name the name to search for
+ * @return the value found or null
+ */
public static String getPropertyDefaultValue(List<Map<String, String>> rows, String name) {
for (Map<String, String> row : rows) {
String defaultValue = null;
diff --git a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PackageHelper.java b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PackageHelper.java
index 15f4e9f..3f34ad5 100644
--- a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PackageHelper.java
+++ b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PackageHelper.java
@@ -31,11 +31,13 @@ public final class PackageHelper {
/**
* Loads the entire stream into memory as a String and returns it.
- * <p/>
- * <b>Notice:</b> This implementation appends a <tt>\n</tt> as line
+ * Notice: This implementation appends a <tt>\n</tt> as line
* terminator at the of the text.
- * <p/>
* Warning, don't use for crazy big streams :)
+ *
+ * @param in the inputStream
+ * @return the text String
+ * @throws IOException InputOutputException
*/
public static String loadText(InputStream in) throws IOException {
StringBuilder builder = new StringBuilder();