public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/google-gson] epel10: Update google-gson to 2.9.1 (#2112775)
@ 2026-08-17 12:39 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-17 12:39 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/google-gson
            Branch : epel10
            Commit : f89197ce1d5845d0f8e21c615b2a763bc93ff432
            Author : Sérgio M. Basto <sergio@serjux.com>
            Date   : 2022-08-28T16:04:29+01:00
            Stats  : +40/-217 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/google-gson/c/f89197ce1d5845d0f8e21c615b2a763bc93ff432?branch=epel10

            Log:
            Update google-gson to 2.9.1 (#2112775)

Refactor patch 0004 , to not use patch to delete files and add a new hunk
Reenable javadoc sub-package

---
diff --git a/.gitignore b/.gitignore
index 8698f21..af3c3f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ google-gson-2.2.1.tar.xz
 /gson-parent-2.8.6.tar.gz
 /gson-parent-2.8.8.tar.gz
 /gson-parent-2.9.0.tar.gz
+/gson-parent-2.9.1.tar.gz

diff --git a/0004-This-commit-added-a-dependency-on-templating-maven-p.patch b/0004-This-commit-added-a-dependency-on-templating-maven-p.patch
index 8653e28..1309170 100644
--- a/0004-This-commit-added-a-dependency-on-templating-maven-p.patch
+++ b/0004-This-commit-added-a-dependency-on-templating-maven-p.patch
@@ -16,72 +16,6 @@ Subject: [PATCH 4/4] This commit added a dependency on
  delete mode 100644 gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
  delete mode 100644 gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
 
-diff --git a/gson/pom.xml b/gson/pom.xml
-index 909a91a..b8984cc 100644
---- a/gson/pom.xml
-+++ b/gson/pom.xml
-@@ -59,23 +59,6 @@
-         </configuration>
-       </plugin>
-       <plugin>
--        <groupId>org.codehaus.mojo</groupId>
--        <artifactId>templating-maven-plugin</artifactId>
--        <version>1.0.0</version>
--        <executions>
--          <execution>
--            <id>filtering-java-templates</id>
--            <goals>
--              <goal>filter-sources</goal>
--            </goals>
--            <configuration>
--              <sourceDirectory>${basedir}/src/main/java-templates</sourceDirectory>
--              <outputDirectory>${project.build.directory}/generated-sources/java-templates</outputDirectory>
--            </configuration>
--          </execution>
--        </executions>
--      </plugin>
--      <plugin>
-         <groupId>com.coderplus.maven.plugins</groupId>
-         <artifactId>copy-rename-maven-plugin</artifactId>
-         <version>1.0.1</version>
-diff --git a/gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java b/gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java
-deleted file mode 100644
-index a94c96b..0000000
---- a/gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java
-+++ /dev/null
-@@ -1,32 +0,0 @@
--/*
-- * Copyright (C) 2018 The Gson authors
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- * http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package com.google.gson.internal;
--
--/**
-- * Build configuration for Gson. This file is automatically populated by
-- * templating-maven-plugin and .java/.class files are generated for use in Gson.
-- *
-- * @author Inderjeet Singh
-- */
--public final class GsonBuildConfig {
--  // Based on https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven
--
--  /** This field is automatically populated by Maven when a build is triggered */
--  public static final String VERSION = "${project.version}";
--
--  private GsonBuildConfig() { }
--}
 diff --git a/gson/src/main/java/com/google/gson/Gson.java b/gson/src/main/java/com/google/gson/Gson.java
 index 27f3ee9..d584ece 100644
 --- a/gson/src/main/java/com/google/gson/Gson.java
@@ -136,146 +70,22 @@ index 27f3ee9..d584ece 100644
      } finally {
        reader.setLenient(oldLenient);
      }
-diff --git a/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java b/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
-deleted file mode 100644
-index 36eff8e..0000000
---- a/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
-+++ /dev/null
-@@ -1,96 +0,0 @@
--/*
-- * Copyright (C) 2018 Gson Authors
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- * http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--package com.google.gson.functional;
--
--import java.io.IOException;
--import java.util.regex.Pattern;
--
--import org.junit.Before;
--import org.junit.Test;
--
--import com.google.gson.Gson;
--import com.google.gson.GsonBuilder;
--import com.google.gson.TypeAdapter;
--import com.google.gson.stream.JsonReader;
--import com.google.gson.stream.JsonWriter;
--
--import junit.framework.TestCase;
--
--/**
-- * Functional tests to validate printing of Gson version on AssertionErrors
-- *
-- * @author Inderjeet Singh
-- */
--public class GsonVersionDiagnosticsTest extends TestCase {
--  private static final Pattern GSON_VERSION_PATTERN = Pattern.compile("(\\(GSON \\d\\.\\d\\.\\d)(?:[-.][A-Z]+)?\\)$");
--
--  private Gson gson;
--
--  @Before
--  public void setUp() {
--    gson = new GsonBuilder().registerTypeAdapter(TestType.class, new TypeAdapter<TestType>() {
--      @Override public void write(JsonWriter out, TestType value) {
--        throw new AssertionError("Expected during serialization");
--      }
--      @Override public TestType read(JsonReader in) throws IOException {
--        throw new AssertionError("Expected during deserialization");
--      }
--    }).create();
--  }
--
--  @Test
--  public void testVersionPattern() {
--    assertTrue(GSON_VERSION_PATTERN.matcher("(GSON 2.8.5)").matches());
--    assertTrue(GSON_VERSION_PATTERN.matcher("(GSON 2.8.5-SNAPSHOT)").matches());
--  }
--
--  @Test
--  public void testAssertionErrorInSerializationPrintsVersion() {
--    try {
--      gson.toJson(new TestType());
--      fail();
--    } catch (AssertionError expected) {
--      ensureAssertionErrorPrintsGsonVersion(expected);
--    }
--  }
--
--  @Test
--  public void testAssertionErrorInDeserializationPrintsVersion() {
--    try {
--      gson.fromJson("{'a':'abc'}", TestType.class);
--      fail();
--    } catch (AssertionError expected) {
--      ensureAssertionErrorPrintsGsonVersion(expected);
--    }
--  }
--
--  private void ensureAssertionErrorPrintsGsonVersion(AssertionError expected) {
--    String msg = expected.getMessage();
--    // System.err.println(msg);
--    int start = msg.indexOf("(GSON");
--    assertTrue(start > 0);
--    int end = msg.indexOf("):") + 1;
--    assertTrue(end > 0 && end > start + 6);
--    String version = msg.substring(start, end);
--    // System.err.println(version);
--    assertTrue(GSON_VERSION_PATTERN.matcher(version).matches());
--  }
--
--  private static final class TestType {
--    @SuppressWarnings("unused")
--    String a;
--  }
--}
-diff --git a/gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java b/gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
-deleted file mode 100644
-index dc39bc0..0000000
---- a/gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
-+++ /dev/null
-@@ -1,33 +0,0 @@
--/*
-- * Copyright (C) 2018 The Gson authors
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- * http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--package com.google.gson.internal;
--
--import static org.junit.Assert.assertFalse;
--
--import org.junit.Test;
--
--/**
-- * Unit tests for {@code GsonBuildConfig}
-- *
-- * @author Inderjeet Singh
-- */
--public class GsonBuildConfigTest {
--
--  @Test
--  public void testEnsureGsonBuildConfigGetsUpdatedToMavenVersion() {
--    assertFalse("${project.version}".equals(GsonBuildConfig.VERSION));
--  }
--}
--- 
-2.26.2
+--- ./gson/src/main/java/com/google/gson/internal/reflect/ReflectionHelper.java.orig	2022-08-28 15:09:57.027580397 +0100
++++ ./gson/src/main/java/com/google/gson/internal/reflect/ReflectionHelper.java	2022-08-28 15:11:57.198151672 +0100
+@@ -1,7 +1,6 @@
+ package com.google.gson.internal.reflect;
+ 
+ import com.google.gson.JsonIOException;
+-import com.google.gson.internal.GsonBuildConfig;
+ import java.lang.reflect.Constructor;
+ import java.lang.reflect.Field;
+ 
+@@ -66,7 +65,7 @@ public class ReflectionHelper {
+   }
+ 
+   public static RuntimeException createExceptionForUnexpectedIllegalAccess(IllegalAccessException exception) {
+-    throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson " + GsonBuildConfig.VERSION + "). "
++    throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson). "
+         + "Certain ReflectionAccessFilter features require Java >= 9 to work correctly. If you are not using "
+         + "ReflectionAccessFilter, report this to the Gson maintainers.",
+         exception);

diff --git a/google-gson.spec b/google-gson.spec
index d6bb5ed..92778f8 100644
--- a/google-gson.spec
+++ b/google-gson.spec
@@ -1,6 +1,6 @@
 Name:           google-gson
-Version:        2.9.0
-Release:        3%{?dist}
+Version:        2.9.1
+Release:        1%{?dist}
 Summary:        Java lib for conversion of Java objects into JSON representation
 License:        ASL 2.0
 URL:            https://github.com/google/gson
@@ -55,16 +55,23 @@ rm ./gson/src/test/java/com/google/gson/internal/bind/DefaultDateTypeAdapterTest
 
 %pom_remove_plugin  :moditect-maven-plugin gson
 
+# Remove dependency on unavailable templating-maven-plugin
+%pom_remove_plugin  org.codehaus.mojo:templating-maven-plugin gson
+rm gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
+rm gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
+
+# to fix error: package javax.annotation is not visible import javax.annotation.PostConstruct;
+rm extras/src/main/java/com/google/gson/typeadapters/PostConstructAdapterFactory.java
+rm extras/src/test/java/com/google/gson/typeadapters/PostConstructAdapterFactoryTest.java
+
 #depends on com.google.caliper
 %pom_disable_module metrics
 
-#%%pom_xpath_remove pom:build/pom:extensions proto
-#%%pom_remove_plugin org.xolstice.maven.plugins:protobuf-maven-plugin proto
 #depends on com.google.protobuf:protobuf-java:jar:4.0.0-rc-2 and com.google.truth:truth:jar:1.1.3
 %pom_disable_module proto
 
 %build
-%mvn_build -j
+%mvn_build
 
 %install
 %mvn_install
@@ -73,10 +80,15 @@ rm ./gson/src/test/java/com/google/gson/internal/bind/DefaultDateTypeAdapterTest
 %license LICENSE
 %doc README.md CHANGELOG.md UserGuide.md
 
-#%%files javadoc  -f .mfiles-javadoc
-#%%license LICENSE
+%files javadoc  -f .mfiles-javadoc
+%license LICENSE
 
 %changelog
+* Sat Aug 27 2022 Sérgio Basto <sergio@serjux.com> - 2.9.1-1
+- Update google-gson to 2.9.1 (#2112775)
+- Refactor patch 0004 , to not use patch to delete files and add a new hunk
+- Reenable javadoc sub-package
+
 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

diff --git a/sources b/sources
index b360e60..a4a56bb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gson-parent-2.9.0.tar.gz) = 25e57f0e3cbff7e4d33070d250ba4ecf1c659380bce07863c52a3b30edd0ba88c923e55b0f38098b5ce3827a74a21c4d41f9de02f6a84da771ae39fd823667d3
+SHA512 (gson-parent-2.9.1.tar.gz) = 928a17491efc9866271f08d4ec0fc22b96b4b6f4827d86679cd4a9085e91fbf6b1b4d6618d380ff63e7a9922d9cf0ec7ba9cd073862e7e212eb31c0140c6b6ad

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-17 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 12:39 [rpms/google-gson] epel10: Update google-gson to 2.9.1 (#2112775) 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox