[Git][java-team/guava-mini][debian/sid] 8 commits: New upstream version 0.1.7
Mechtilde Stehmann (@mechtilde)
gitlab at salsa.debian.org
Sun Apr 6 14:18:02 BST 2025
Mechtilde Stehmann pushed to branch debian/sid at Debian Java Maintainers / guava-mini
Commits:
a52bc60c by Mechtilde at 2025-04-06T14:47:41+02:00
New upstream version 0.1.7
- - - - -
c08e9a59 by Mechtilde at 2025-04-06T14:47:48+02:00
Update upstream source from tag 'upstream/0.1.7'
Update to upstream version '0.1.7'
with Debian dir f0f855d288ff07eaf3a2fe7cbacfc9e8c8d51ad7
- - - - -
f3496ad1 by Mechtilde at 2025-04-06T14:55:44+02:00
Bumped standard version - no changes needed
- - - - -
ca9822c3 by Mechtilde at 2025-04-06T14:57:19+02:00
Bumped years in d/copyright
- - - - -
971d6986 by Mechtilde at 2025-04-06T14:58:56+02:00
Prepared for patching in PQ-Branch
- - - - -
37ca1cf5 by Mechtilde at 2025-04-06T15:02:06+02:00
To be able to work at PQ-Branch
- - - - -
dab05ad8 by Mechtilde at 2025-04-06T15:08:13+02:00
Rediff patches
Add 02-Disabled-plug-ins.patch: <REASON>
Add 01-Replace-bundle-by-jar.patch: <REASON>
- - - - -
fdb25d58 by Mechtilde at 2025-04-06T15:14:05+02:00
Prepared for uploading version 0.1.7-1
- - - - -
18 changed files:
- + .github/workflows/automerge.yml
- .github/workflows/ci.yml
- README.md
- debian/changelog
- debian/control
- debian/copyright
- debian/patches/02-Subject-Replace-bundle-by-jar.patch → debian/patches/01-Replace-bundle-by-jar.patch
- debian/patches/01-Subject-Disabled-plug-ins.patch → debian/patches/02-Disabled-plug-ins.patch
- debian/patches/series
- debian/watch
- pom.xml
- src/main/java/com/github/davidmoten/guavamini/Lists.java
- src/main/java/com/github/davidmoten/guavamini/Optional.java
- src/main/java/com/github/davidmoten/guavamini/Preconditions.java
- src/main/java/com/github/davidmoten/guavamini/Sets.java
- src/test/java/com/github/davidmoten/guavamini/ListsTest.java
- src/test/java/com/github/davidmoten/guavamini/PreconditionsTest.java
- src/test/java/com/github/davidmoten/guavamini/SetsTest.java
Changes:
=====================================
.github/workflows/automerge.yml
=====================================
@@ -0,0 +1,23 @@
+name: Dependabot auto-merge
+on: pull_request
+
+permissions:
+ pull-requests: write
+ contents: write
+
+jobs:
+ dependabot:
+ runs-on: ubuntu-latest
+ if: ${{ github.actor == 'dependabot[bot]' }}
+ steps:
+ - name: Dependabot metadata
+ id: metadata
+ uses: dependabot/fetch-metadata at v1.1.1
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+ - name: Enable auto-merge for Dependabot PRs
+ if: ${{!contains(steps.metadata.outputs.dependency-names, 'maven-plugin-api') && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')}}
+ run: gh pr merge --auto --rebase "$PR_URL"
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
=====================================
.github/workflows/ci.yml
=====================================
@@ -1,13 +1,23 @@
-name: Java CI
+name: ci
-on: [push]
+## Does continuous integration build with Java 8 and 11 and
+## if succeeds and due to a dependabot pull request (minor or
+## patch verson change) it will automatically merge the PR.
+
+## Unlike many sample automerge workflows this does not rely
+## on third-party libraries apart from the official dependabot
+## repository ones. This reduces the security risk significantly
+## (we don't want to unknowingly merge malicious code or expose
+## secrets to a malicious third party).
+
+on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
- java: ['8', '11']
+ java: ['8', '11', '17']
steps:
- uses: actions/checkout at v2
- name: Set up JDK ${{ matrix.java }}
@@ -21,3 +31,22 @@ jobs:
with:
file: ./**/target/site/jacoco/jacoco.xml
name: codecov
+ dependabot:
+ runs-on: ubuntu-latest
+ needs: build
+ permissions:
+ pull-requests: write
+ contents: write
+ if: ${{ github.actor == 'dependabot[bot]' }}
+ steps:
+ - name: Dependabot metadata
+ id: metadata
+ uses: dependabot/fetch-metadata at v1.1.1
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+ - name: Enable auto-merge for Dependabot PRs
+ if: ${{!contains(steps.metadata.outputs.dependency-names, 'maven-plugin-api') && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')}}
+ run: gh pr merge --auto --rebase "$PR_URL"
+ env:
+ PR_URL: ${{github.event.pull_request.html_url}}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
=====================================
README.md
=====================================
@@ -26,6 +26,9 @@ Non-guava:
* `Maps`: `hashMap`, `treeMap`, `linkedHashMap`
```java
Map<Integer, String> map = Maps.put(1, "hi").put(2, "there").build();
+Map<Integer, String> sorted = Maps.treeMap().put(1, "hi").put(2, "there").build();
+Map<Integer, String> linked = Maps.linkedHashMap().put(1, "hi").put(2, "there").build();
+Map<Integer, String> presized = Maps.hashMap().initialSize(1000).put(1, "hi").put(2, "there").build();
```
Getting started
=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+guava-mini (0.1.7-1) unstable; urgency=medium
+
+ [ Mechtilde ]
+ * [eaa9f78] Removed unknown URL entry
+ * [a52bc60] New upstream version 0.1.7
+ * [37ca1cf] To be able to work at PQ-Branch
+ * [dab05ad] Rediff patches
+
+ -- Mechtilde Stehmann <mechtilde at debian.org> Sun, 06 Apr 2025 15:13:54 +0200
+
guava-mini (0.1.4-1) unstable; urgency=medium
[ Mechtilde ]
=====================================
debian/control
=====================================
@@ -7,7 +7,7 @@ Build-Depends: debhelper-compat (= 13)
, default-jdk
, maven-debian-helper (>= 2.1)
, libmaven-bundle-plugin-java
-Standards-Version: 4.6.1
+Standards-Version: 4.7.2
Rules-Requires-Root: no
Vcs-Git: https://salsa.debian.org/java-team/guava-mini.git
Vcs-Browser: https://salsa.debian.org/java-team/guava-mini
=====================================
debian/copyright
=====================================
@@ -4,11 +4,11 @@ Upstream-Contact: https://travis-ci.org/davidmoten/guava-mini
Source: http://github.com/davidmoten/guava-mini
Files: *
-Copyright: 2013-2019, Dave Moten
+Copyright: 2013-2025, Dave Moten
License: Apache-2.0
Files: debian/*
-Copyright: 2019, Mechtilde Stehmann <mechtilde at debian.org>
+Copyright: 2019-2025, Mechtilde Stehmann <mechtilde at debian.org>
License: Apache-2.0
License: Apache-2.0
=====================================
debian/patches/02-Subject-Replace-bundle-by-jar.patch → debian/patches/01-Replace-bundle-by-jar.patch
=====================================
@@ -1,14 +1,16 @@
From: Mechtilde <mechtilde at debian.org>
-Date: Sun, 11 Dec 2022 20:25:38 +0100
-Subject: Subject: Replace-bundle-by-jar
+Date: Sun, 6 Apr 2025 15:03:49 +0200
+Subject: Replace-bundle-by-jar
+Gbp-Pq: 02_Replace-bundle-by-jar
Forwarded: No
+Last update: 2022-12-11
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
-index 9bde7da..98857d0 100644
+index ac4a1c7..719db47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
=====================================
debian/patches/01-Subject-Disabled-plug-ins.patch → debian/patches/02-Disabled-plug-ins.patch
=====================================
@@ -1,14 +1,17 @@
From: Mechtilde <mechtilde at debian.org>
-Date: Sun, 11 Dec 2022 17:53:11 +0100
-Subject: Subject: Disabled plug-ins
+Date: Sun, 6 Apr 2025 15:06:49 +0200
+Subject: Disabled plug-ins
+
+Gbp-Pq: 01_Disabled plug-ins
Forwarded: No
+Last update: 2022-12-11
---
- pom.xml | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ pom.xml | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
-index b3516f8..9bde7da 100644
+index 719db47..1ce42db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,7 @@
@@ -19,13 +22,14 @@ index b3516f8..9bde7da 100644
+<!-- <plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
-@@ -160,7 +160,7 @@
+ <version>3.11.0</version>
+@@ -160,7 +160,8 @@
</executions>
</plugin>
- </plugins>
+ </plugins> -->
++
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,2 @@
-01-Subject-Disabled-plug-ins.patch
-02-Subject-Replace-bundle-by-jar.patch
+01-Replace-bundle-by-jar.patch
+02-Disabled-plug-ins.patch
=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
-version=3
+version=4
opts="repack,compression=xz" \
https://github.com/davidmoten/guava-mini/tags .*/(?:.*?)([\d\.]+)\.tar\.gz
=====================================
pom.xml
=====================================
@@ -10,7 +10,7 @@
</parent>
<artifactId>guava-mini</artifactId>
- <version>0.1.4</version>
+ <version>0.1.7</version>
<name>${project.artifactId}</name>
<description>Classes taken from Guava</description>
@@ -24,15 +24,15 @@
<maven.compiler.target>1.8</maven.compiler.target>
<scm.url>scm:git:https://github.com/davidmoten/guava-mini.git</scm.url>
- <checkstyle.version>3.1.2</checkstyle.version>
- <javadoc.version>3.2.0</javadoc.version>
- <pmd.version>3.15.0</pmd.version>
- <project.info.version>3.1.1</project.info.version>
- <jxr.version>3.0.0</jxr.version>
- <taglist.version>2.4</taglist.version>
- <m3.site.version>3.9.1</m3.site.version>
+ <checkstyle.version>3.3.0</checkstyle.version>
+ <javadoc.version>3.6.0</javadoc.version>
+ <pmd.version>3.21.0</pmd.version>
+ <project.info.version>3.4.5</project.info.version>
+ <jxr.version>3.3.0</jxr.version>
+ <taglist.version>3.0.0</taglist.version>
+ <m3.site.version>3.12.1</m3.site.version>
<changelog.version>2.2</changelog.version>
- <bundle.plugin.version>5.1.1</bundle.plugin.version>
+ <bundle.plugin.version>5.1.9</bundle.plugin.version>
<coverage.reports.dir>${project.build.directory}/target/coverage-reports</coverage.reports.dir>
</properties>
@@ -74,7 +74,7 @@
<connection>${scm.url}</connection>
<developerConnection>${scm.url}</developerConnection>
<url>${scm.url}</url>
- <tag>0.1.4</tag>
+ <tag>0.1.7</tag>
</scm>
<dependencies>
@@ -90,7 +90,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>4.0.0</version>
+ <version>4.11.0</version>
<scope>test</scope>
</dependency>
@@ -108,7 +108,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
+ <version>3.11.0</version>
<configuration>
<source>${maven.compiler.target}</source>
<target>${maven.compiler.target}</target>
@@ -138,7 +138,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.7</version>
+ <version>0.8.10</version>
<executions>
<execution>
<goals>
=====================================
src/main/java/com/github/davidmoten/guavamini/Lists.java
=====================================
@@ -4,13 +4,14 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.List;
import com.github.davidmoten.guavamini.annotations.VisibleForTesting;
public final class Lists {
private Lists() {
- // cannot instantiate
+ // prevent instantiation
}
public static <E> ArrayList<E> newArrayList(@SuppressWarnings("unchecked") E... elements) {
@@ -21,6 +22,10 @@ public final class Lists {
Collections.addAll(list, elements);
return list;
}
+
+ public static <E> List<E> of(@SuppressWarnings("unchecked") E... elements) {
+ return newArrayList(elements);
+ }
@VisibleForTesting
static int computeArrayListCapacity(int arraySize) {
=====================================
src/main/java/com/github/davidmoten/guavamini/Optional.java
=====================================
@@ -47,7 +47,7 @@ public final class Optional<T> {
public static <T> Optional<T> absent() {
return new Optional<T>();
}
-
+
public static class NotPresentException extends RuntimeException {
private static final long serialVersionUID = -4444814681271790328L;
=====================================
src/main/java/com/github/davidmoten/guavamini/Preconditions.java
=====================================
@@ -15,6 +15,17 @@ public final class Preconditions {
throw new NullPointerException(message);
return t;
}
+
+ public static <T> T checkArgumentNotNull(T t) {
+ return checkArgumentNotNull(t, "argument");
+ }
+
+ public static <T> T checkArgumentNotNull(T t, String parameterName) {
+ if (t == null) {
+ throw new IllegalArgumentException(parameterName + " cannot be null");
+ }
+ return t;
+ }
public static void checkArgument(boolean b, String message) {
if (!b)
=====================================
src/main/java/com/github/davidmoten/guavamini/Sets.java
=====================================
@@ -4,6 +4,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
import com.github.davidmoten.guavamini.annotations.VisibleForTesting;
@@ -15,13 +16,17 @@ public final class Sets {
static final int MAX_POWER_OF_TWO = 1 << (Integer.SIZE - 2);
- public static <E> HashSet<E> newHashSet(E... elements) {
+ public static <E> HashSet<E> newHashSet(@SuppressWarnings("unchecked") E... elements) {
Preconditions.checkNotNull(elements);
HashSet<E> set = newHashSetWithExpectedSize(elements.length);
Collections.addAll(set, elements);
return set;
}
-
+
+ public static <E> Set<E> of(@SuppressWarnings("unchecked") E... elements) {
+ return newHashSet(elements);
+ }
+
public static <E> HashSet<E> newHashSetWithExpectedSize(int expectedSize) {
return new HashSet<E>(capacity(expectedSize));
}
=====================================
src/test/java/com/github/davidmoten/guavamini/ListsTest.java
=====================================
@@ -19,6 +19,11 @@ public class ListsTest {
list.add(2);
assertEquals(list, Lists.newArrayList(1, 2));
}
+
+ @Test
+ public void testOf() {
+ assertEquals(Lists.newArrayList(1, 2), Lists.of(1, 2));
+ }
@Test
public void createListFromIterable() {
=====================================
src/test/java/com/github/davidmoten/guavamini/PreconditionsTest.java
=====================================
@@ -2,6 +2,7 @@ package com.github.davidmoten.guavamini;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import org.junit.Assert;
import org.junit.Test;
@@ -19,7 +20,7 @@ public class PreconditionsTest {
public void testNotNullDoesNotThrowException() {
Preconditions.checkNotNull(new Object());
}
-
+
@Test
public void testNotNullReturnsTypedObject() {
Integer n = 1;
@@ -62,4 +63,20 @@ public class PreconditionsTest {
Asserts.assertIsUtilityClass(Preconditions.class);
}
+ @Test
+ public void testCheckArgumentNotNullThrowsIAE() {
+ try {
+ Preconditions.checkArgumentNotNull(null);
+ Assert.fail();
+ } catch (IllegalArgumentException e) {
+ assertEquals("argument cannot be null", e.getMessage());
+ }
+ }
+
+ @Test
+ public void testCheckArgumentNotNullReturnsWhenNotNull() {
+ Object o = new Object();
+ assertTrue(o == Preconditions.checkArgumentNotNull(o));
+ }
+
}
=====================================
src/test/java/com/github/davidmoten/guavamini/SetsTest.java
=====================================
@@ -15,6 +15,11 @@ public class SetsTest {
public void testCreate() {
assertTrue(Sets.newHashSet(1, 2, 3).contains(2));
}
+
+ @Test
+ public void testCreateUsingOf() {
+ assertTrue(Sets.of(1, 2, 3).contains(2));
+ }
@Test
public void testCreateFromIterator() {
View it on GitLab: https://salsa.debian.org/java-team/guava-mini/-/compare/eaa9f78aa3d69e1d72944452f85277719b1d5ba9...fdb25d58d499361a6073c65b41fd4bf84ddd0cf1
--
View it on GitLab: https://salsa.debian.org/java-team/guava-mini/-/compare/eaa9f78aa3d69e1d72944452f85277719b1d5ba9...fdb25d58d499361a6073c65b41fd4bf84ddd0cf1
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20250406/e12d4345/attachment.htm>
More information about the pkg-java-commits
mailing list