This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new e24de3c47 AVRO-4023: Move `IdlUtils` into `org.apache.avro.idl` (#3039)
e24de3c47 is described below

commit e24de3c47dde433e4312f4c6b867e7f60c04c1b6
Author: Fokko Driesprong <[email protected]>
AuthorDate: Wed Jul 24 13:44:57 2024 +0200

    AVRO-4023: Move `IdlUtils` into `org.apache.avro.idl` (#3039)
    
    Noticed this when building the distributions.
    
    I think it makes sense to move it just into the `idl` namspace.
    
    This package hasn't been released before, so we don't break any
    existing APIs.
    
    ```
    [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.8.0:jar (module-javadocs) on 
project avro-idl: MavenReportException: Error while generating Javadoc:
    [ERROR] Exit code: 2
    [ERROR] error: No source files for package org.apache.avro.util
    [ERROR] 1 error
    [ERROR] Command line was: /usr/lib/jvm/java-21-openjdk-arm64/bin/javadoc 
-J-Duser.language= -J-Duser.country= -Xdoclint:none @options @packages
    [ERROR]
    [ERROR] Refer to the generated Javadoc files in 
'/home/fokko.driesprong/avro/lang/java/idl/target/apidocs' dir.
    [ERROR]
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, 
please read the following articles:
    [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the 
command
    [ERROR]   mvn <args> -rf :avro-idl
    ```
---
 .../idl/src/main/java/org/apache/avro/idl/IdlSchemaFormatter.java    | 1 -
 .../idl/src/main/java/org/apache/avro/{util => idl}/IdlUtils.java    | 5 ++++-
 .../src/test/java/org/apache/avro/{util => idl}/IdlUtilsTest.java    | 4 +---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/lang/java/idl/src/main/java/org/apache/avro/idl/IdlSchemaFormatter.java 
b/lang/java/idl/src/main/java/org/apache/avro/idl/IdlSchemaFormatter.java
index c9115cf3c..3baecbb8f 100644
--- a/lang/java/idl/src/main/java/org/apache/avro/idl/IdlSchemaFormatter.java
+++ b/lang/java/idl/src/main/java/org/apache/avro/idl/IdlSchemaFormatter.java
@@ -21,7 +21,6 @@ import java.io.StringWriter;
 
 import org.apache.avro.Schema;
 import org.apache.avro.SchemaFormatter;
-import org.apache.avro.util.IdlUtils;
 
 public class IdlSchemaFormatter implements SchemaFormatter {
   @Override
diff --git a/lang/java/idl/src/main/java/org/apache/avro/util/IdlUtils.java 
b/lang/java/idl/src/main/java/org/apache/avro/idl/IdlUtils.java
similarity index 99%
rename from lang/java/idl/src/main/java/org/apache/avro/util/IdlUtils.java
rename to lang/java/idl/src/main/java/org/apache/avro/idl/IdlUtils.java
index 480f3a03c..29c787c9e 100644
--- a/lang/java/idl/src/main/java/org/apache/avro/util/IdlUtils.java
+++ b/lang/java/idl/src/main/java/org/apache/avro/idl/IdlUtils.java
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.avro.util;
+package org.apache.avro.idl;
 
 import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
@@ -57,6 +57,9 @@ import static java.util.Collections.singletonList;
 import static java.util.Collections.unmodifiableSet;
 import static java.util.Objects.requireNonNull;
 
+/**
+ * Utils for IDL
+ */
 public final class IdlUtils {
   static final ObjectMapper MAPPER;
   private static final Function<Schema.Field, JsonNode> DEFAULT_VALUE;
diff --git a/lang/java/idl/src/test/java/org/apache/avro/util/IdlUtilsTest.java 
b/lang/java/idl/src/test/java/org/apache/avro/idl/IdlUtilsTest.java
similarity index 98%
rename from lang/java/idl/src/test/java/org/apache/avro/util/IdlUtilsTest.java
rename to lang/java/idl/src/test/java/org/apache/avro/idl/IdlUtilsTest.java
index 0cb5a5702..ef2a81d3f 100644
--- a/lang/java/idl/src/test/java/org/apache/avro/util/IdlUtilsTest.java
+++ b/lang/java/idl/src/test/java/org/apache/avro/idl/IdlUtilsTest.java
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.avro.util;
+package org.apache.avro.idl;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -31,8 +31,6 @@ import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.JsonProperties;
 import org.apache.avro.Protocol;
 import org.apache.avro.Schema;
-import org.apache.avro.idl.IdlFile;
-import org.apache.avro.idl.IdlReader;
 import org.junit.jupiter.api.Test;
 
 import static java.util.Collections.emptyList;

Reply via email to