[Git][java-team/bnd][master] 4 commits: Tightened the dependency on libosgi-core-java (>= 7.0.0)

Emmanuel Bourg gitlab at salsa.debian.org
Thu Jan 21 14:01:28 GMT 2021



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / bnd


Commits:
cc1ae61e by Emmanuel Bourg at 2021-01-21T14:30:30+01:00
Tightened the dependency on libosgi-core-java (>= 7.0.0)

- - - - -
4448ba4f by Emmanuel Bourg at 2021-01-21T14:30:39+01:00
Standards-Version updated to 4.5.1

- - - - -
6087f488 by Emmanuel Bourg at 2021-01-21T14:58:16+01:00
Backported the fix for the ConcurrentModificationException occurring with Java 15 and later

- - - - -
8d570c9d by Emmanuel Bourg at 2021-01-21T14:58:28+01:00
Upload to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/fix-java15-concurrent-modification-exception.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+bnd (5.0.1-3) unstable; urgency=medium
+
+  * Backported the fix for the ConcurrentModificationException occurring
+    with Java 15 and later
+  * Tightened the dependency on libosgi-core-java (>= 7.0.0)
+  * Standards-Version updated to 4.5.1
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Thu, 21 Jan 2021 14:58:24 +0100
+
 bnd (5.0.1-2) unstable; urgency=medium
 
   * Fixed the Gradle plugin


=====================================
debian/control
=====================================
@@ -23,12 +23,12 @@ Build-Depends:
  libjline2-java,
  libosgi-annotation-java,
  libosgi-compendium-java (>= 7),
- libosgi-core-java (>= 6.0.0),
+ libosgi-core-java (>= 7.0.0),
  libslf4j-java,
  libxz-java,
  libyaml-snake-java,
  maven-repo-helper
-Standards-Version: 4.5.0
+Standards-Version: 4.5.1
 Vcs-Git: https://salsa.debian.org/java-team/bnd.git
 Vcs-Browser: https://salsa.debian.org/java-team/bnd
 Homepage: http://bnd.bndtools.org/
@@ -45,7 +45,7 @@ Depends:
  libjline2-java,
  libosgi-annotation-java,
  libosgi-compendium-java (>= 7),
- libosgi-core-java (>= 6.0.0),
+ libosgi-core-java (>= 7.0.0),
  libslf4j-java,
  libxz-java,
  libyaml-snake-java,


=====================================
debian/patches/fix-java15-concurrent-modification-exception.patch
=====================================
@@ -0,0 +1,63 @@
+From 97eb299a8b4b3d1b199b30d98769136494e2469d Mon Sep 17 00:00:00 2001
+From: BJ Hargrave <bj at bjhargrave.com>
+Date: Fri, 10 Apr 2020 13:51:59 -0400
+Subject: [PATCH] jar: Replace incorrect use of computeIfAbsent in putResource
+
+We may need to make multiple modifications to the directories map when
+adding a resource. computeIfAbsent does not allow the mapping function
+to modify the map.
+
+Fixes https://github.com/bndtools/bnd/issues/3903
+
+Signed-off-by: BJ Hargrave <bj at bjhargrave.com>
+---
+ biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+
+From b5092a473176327e745307afc573ae7a58d27bf8 Mon Sep 17 00:00:00 2001
+From: BJ Hargrave <bj at bjhargrave.com>
+Date: Fri, 10 Apr 2020 13:48:54 -0400
+Subject: [PATCH] jar: Fix getPackages to handle non-null empty directory
+
+Signed-off-by: BJ Hargrave <bj at bjhargrave.com>
+---
+ biz.aQute.bndlib.tests/test/test/JarTest.java | 77 +++++++++++++++----
+ biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java  |  3 +-
+ 2 files changed, 64 insertions(+), 16 deletions(-)
+
+--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java
++++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java
+@@ -334,7 +334,11 @@
+ 		} else if (path.equals(Constants.MODULE_INFO_CLASS)) {
+ 			moduleAttribute = null;
+ 		}
+-		Map<String, Resource> s = directories.computeIfAbsent(getParent(path), dir -> {
++		String dir = getParent(path);
++		Map<String, Resource> s = directories.get(dir);
++		if (s == null) {
++			s = new TreeMap<>();
++			directories.put(dir, s);
+ 			// make ancestor directories
+ 			for (int n; (n = dir.lastIndexOf('/')) > 0;) {
+ 				dir = dir.substring(0, n);
+@@ -342,8 +346,7 @@
+ 					break;
+ 				directories.put(dir, null);
+ 			}
+-			return new TreeMap<>();
+-		});
++		}
+ 		boolean duplicate = s.containsKey(path);
+ 		if (!duplicate || overwrite) {
+ 			resources.put(path, resource);
+@@ -995,7 +998,8 @@
+ 	public List<String> getPackages() {
+ 		check();
+ 		return MapStream.of(directories)
+-			.filterValue(Objects::nonNull)
++			.filterValue(mdir -> Objects.nonNull(mdir) && !mdir
++				.isEmpty())
+ 			.keys()
+ 			.map(k -> k.replace('/', '.'))
+ 			.collect(toList());


=====================================
debian/patches/series
=====================================
@@ -10,3 +10,4 @@ build-scripts.patch
 backward-jdk-compatibility.patch
 gradle-compatibility.patch
 disable-bnd-reporter.patch
+fix-java15-concurrent-modification-exception.patch



View it on GitLab: https://salsa.debian.org/java-team/bnd/-/compare/500d1d5f9d10d738754d85a3c9f40617064aeb14...8d570c9d195a73a266805d8ca95a0f7540da5060

-- 
View it on GitLab: https://salsa.debian.org/java-team/bnd/-/compare/500d1d5f9d10d738754d85a3c9f40617064aeb14...8d570c9d195a73a266805d8ca95a0f7540da5060
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/20210121/7ea0ad11/attachment.html>


More information about the pkg-java-commits mailing list