[johnzon] branch master updated: update maven plugins (#96)

2022-11-14 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/johnzon.git


The following commit(s) were added to refs/heads/master by this push:
 new 039fe142 update maven plugins (#96)
039fe142 is described below

commit 039fe142944de529fbe8c84badea67b848dc2ff8
Author: Samael 
AuthorDate: Mon Nov 14 16:04:14 2022 +

update maven plugins (#96)

* Update Maven Plugins (except those from base pom)
* Fix Javadoc errors
* Replace findbugs with spotbugs
---
 .github/workflows/maven.yml|   3 -
 .../org/apache/johnzon/jsonb/JsonbRecordTest.java  |   2 +-
 .../java/org/apache/johnzon/mapper/Adapter.java|  10 +-
 .../org/apache/johnzon/mapper/JohnzonRecord.java   |   2 +-
 .../mapper/internal/JsonPointerTracker.java|   2 +-
 .../org/apache/johnzon/mapper/util/BeanUtil.java   |  10 +-
 johnzon-maven-plugin/pom.xml   |  26 ++-
 johnzon-osgi/pom.xml   |   4 +
 johnzon-websocket/pom.xml  |   7 -
 pom.xml| 202 -
 10 files changed, 157 insertions(+), 111 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 8a0ad739..4fe88968 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -26,6 +26,3 @@ jobs:
 env:
   MAVEN_OPTS: -Dmaven.artifact.threads=64
 run: mvn -V package --no-transfer-progress
-
-  #- name: Maven javadoc
-  #  run: mvn javadoc:javadoc -Ddoclint=all --no-transfer-progress
diff --git 
a/johnzon-jsonb/src/test/java/org/apache/johnzon/jsonb/JsonbRecordTest.java 
b/johnzon-jsonb/src/test/java/org/apache/johnzon/jsonb/JsonbRecordTest.java
index 81e28e3d..8560ee9c 100644
--- a/johnzon-jsonb/src/test/java/org/apache/johnzon/jsonb/JsonbRecordTest.java
+++ b/johnzon-jsonb/src/test/java/org/apache/johnzon/jsonb/JsonbRecordTest.java
@@ -46,7 +46,7 @@ public class JsonbRecordTest {
 private final String name;
 
 public Record(@JohnzonRecord.Name("age") final int age,
-  @JohnzonRecord.Name("name") @JsonbProperty("_name") 
final String name) { // simulate custom constructor
+   @JohnzonRecord.Name("name") @JsonbProperty("_name") 
final String name) { // simulate custom constructor
 this.age = age;
 this.name = name;
 }
diff --git 
a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java 
b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
index abbd25c7..0ffad873 100644
--- a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
+++ b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
@@ -29,25 +29,23 @@ package org.apache.johnzon.mapper;
  * Our {@code Mapper} should treat it as a {@code java.util.Date}.
  * For doing so we create a {@code DateHolderAdapter} like the following 
example shows:
  * 
- * {@code
- * public static class DateHolderAdapter implements Adapter {
- * @Override
+ * {@code public static class DateHolderAdapter implements Adapter} {
+ * {@code @Override}
  * public DateHolder to(Date date) {
  * DateHolder dh = new DateHolder(date.getTime());
  * return dh;
  * }
  *
- * @Override
+ * {@code @Override}
  * public Date from(DateHolder dateHolder) {
  *return new Date(dateHolder.getDate());
  * }
  * }
- * }
  * 
  *
  * Consider a POJO has a DateHolder.
  * When serialising the {@code Mapper} will first use the {@code 
DateHolderAdapter#from(DateHolder)} and from there to JSON.
- * When reading JSON the {@code to(Date}} method will be used.
+ * When reading JSON the {@code to(Date)} method will be used.
  *
  * @param  The Java type in the POJO (Plain Old Java Object)
  * @param  The Java Type which will be used to transform to JSON.
diff --git 
a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/JohnzonRecord.java 
b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/JohnzonRecord.java
index d57a0b8c..8516a0f1 100644
--- a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/JohnzonRecord.java
+++ b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/JohnzonRecord.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
 /**
  * Forces method named as properties to be used as getters (String foo() will 
match the attribute foo).
  * Also enables a constructor with all properties even if not marked as 
@ConstructorProperties or equivalent.
- * It simulates java >= 14 record style.
+ * It simulates Java 14+ records.
  */
 @Target({ TYPE })
 @Retention(RUNTIME)
diff --git 
a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/internal/JsonPointerTracker.java
 
b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/internal/JsonPointerTracker.java
index c6d3495e..bd123d6e 100644
--- 

[johnzon] branch master updated: fixes for Javadoc errors and some warnings (#95)

2022-11-14 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/johnzon.git


The following commit(s) were added to refs/heads/master by this push:
 new e7418157 fixes for Javadoc errors and some warnings (#95)
e7418157 is described below

commit e7418157680f3fbd29fa7a5e79b269565d24f7fc
Author: Samael 
AuthorDate: Mon Nov 14 10:23:29 2022 +

fixes for Javadoc errors and some warnings (#95)
---
 .../main/java/org/apache/johnzon/core/BufferStrategyFactory.java  | 2 ++
 johnzon-core/src/main/java/org/apache/johnzon/core/Buffered.java  | 3 ++-
 .../main/java/org/apache/johnzon/core/JsonStreamParserImpl.java   | 1 +
 .../src/main/java/org/apache/johnzon/core/util/ArrayUtil.java | 2 ++
 .../src/main/java/org/apache/johnzon/mapper/Adapter.java  | 8 +++-
 .../src/main/java/org/apache/johnzon/mapper/Converter.java| 4 ++--
 .../java/org/apache/johnzon/mapper/JohnzonDeduplicateObjects.java | 2 +-
 7 files changed, 17 insertions(+), 5 deletions(-)

diff --git 
a/johnzon-core/src/main/java/org/apache/johnzon/core/BufferStrategyFactory.java 
b/johnzon-core/src/main/java/org/apache/johnzon/core/BufferStrategyFactory.java
index 62556a57..dd092a53 100644
--- 
a/johnzon-core/src/main/java/org/apache/johnzon/core/BufferStrategyFactory.java
+++ 
b/johnzon-core/src/main/java/org/apache/johnzon/core/BufferStrategyFactory.java
@@ -51,6 +51,8 @@ public class BufferStrategyFactory {
  *
  * You can also pass in a fully qualified class name of a custom {@link 
BufferStrategy}.
  *
+ * @param strategyName one of the supported BufferStrategies as per above
+ * @return an instance of the chosen BufferStrategy
  * @throws IllegalArgumentException if the given strategyName does not 
resolve to a BufferStrategy.
  */
 public static BufferStrategy valueOf(String strategyName) {
diff --git a/johnzon-core/src/main/java/org/apache/johnzon/core/Buffered.java 
b/johnzon-core/src/main/java/org/apache/johnzon/core/Buffered.java
index 40cabfb7..17f29f39 100644
--- a/johnzon-core/src/main/java/org/apache/johnzon/core/Buffered.java
+++ b/johnzon-core/src/main/java/org/apache/johnzon/core/Buffered.java
@@ -17,7 +17,7 @@
 package org.apache.johnzon.core;
 
 /**
- * A Buffered is a source or destination of data that is buffered
+ * A Buffered is a source or destination of data that is buffered
  * before writing or reading.  The bufferSize method allows all participants
  * in the underlying stream to align on this buffer size for optimization.
  *
@@ -31,6 +31,7 @@ public interface Buffered { // 
https://github.com/apache/johnzon/pull/84#discuss
 /**
  * The buffer size used by this stream while reading input or before 
writing
  * output to the underlying stream.
+ * @return the size of the buffer
  */
 int bufferSize();
 }
diff --git 
a/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java 
b/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
index c511e0d4..c854069d 100644
--- 
a/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
+++ 
b/johnzon-core/src/main/java/org/apache/johnzon/core/JsonStreamParserImpl.java
@@ -208,6 +208,7 @@ public class JsonStreamParserImpl extends 
JohnzonJsonParserImpl implements JsonC
 }
 
 /**
+ * @param currentLength length of the buffer
  * @return the amount of bytes the current buffer should get extended with
  */
 protected int getBufferExtends(int currentLength) {
diff --git 
a/johnzon-core/src/main/java/org/apache/johnzon/core/util/ArrayUtil.java 
b/johnzon-core/src/main/java/org/apache/johnzon/core/util/ArrayUtil.java
index 22904d31..b1942387 100644
--- a/johnzon-core/src/main/java/org/apache/johnzon/core/util/ArrayUtil.java
+++ b/johnzon-core/src/main/java/org/apache/johnzon/core/util/ArrayUtil.java
@@ -146,6 +146,8 @@ public final class ArrayUtil {
 
 /**
  * Take the given array object and fill a fresh Collection with it.
+ * @param array an array that is to be duplicated
+ * @return a new collection of the original array elements
  * @throws IllegalArgumentException if the given value this is not an 
array.
  */
 public static Collection newCollection(Object array) {
diff --git 
a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java 
b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
index fd635492..abbd25c7 100644
--- a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
+++ b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/Adapter.java
@@ -22,13 +22,14 @@ package org.apache.johnzon.mapper;
  * An Adapter is similar to a {@link Converter}.
  * The main difference is that a Converter always converts from/to a String.
  * An adapter might e.g. convert to a Date or any other Object which will
- * then be json-ified.
+ * then be json-ified.