Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
xmvn.28307
0003-Revert-Use-new-Collection-methods-added-in...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-Revert-Use-new-Collection-methods-added-in-Java-9.patch of Package xmvn.28307
From 67ad1e7228166863edc81fe56b74abad443251df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch> Date: Sun, 8 May 2022 19:28:37 +0200 Subject: [PATCH 3/4] Revert "Use new Collection methods added in Java 9" This reverts commit 1acda1ff8bb2a58c458395d61c0aaeae3d425e53. --- .../fedoraproject/xmvn/deployer/DependencyDescriptor.java | 3 ++- .../org/fedoraproject/xmvn/deployer/DeploymentRequest.java | 5 +++-- .../xmvn/connector/maven/XMvnMojoExecutionListener.java | 3 ++- .../org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java index 9918affe..1af7d2fb 100644 --- a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java +++ b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DependencyDescriptor.java @@ -15,6 +15,7 @@ */ package org.fedoraproject.xmvn.deployer; +import java.util.Collections; import java.util.List; import org.fedoraproject.xmvn.artifact.Artifact; @@ -34,7 +35,7 @@ public class DependencyDescriptor { this.dependencyArtifact = dependencyArtifact; this.optional = optional; - this.exclusions = List.copyOf( exclusions ); + this.exclusions = Collections.unmodifiableList( exclusions ); } public Artifact getDependencyArtifact() diff --git a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java index 6c67d2c7..16e48471 100644 --- a/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java +++ b/xmvn-api/src/main/java/org/fedoraproject/xmvn/deployer/DeploymentRequest.java @@ -19,6 +19,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; @@ -53,7 +54,7 @@ public class DeploymentRequest public List<DependencyDescriptor> getDependencies() { - return List.copyOf( dependencies ); + return Collections.unmodifiableList( dependencies ); } public void addDependency( Artifact dependencyArtifact, Artifact... exclusions ) @@ -85,7 +86,7 @@ public class DeploymentRequest public Map<String, String> getProperties() { - return Map.copyOf( properties ); + return Collections.unmodifiableMap( properties ); } public String getProperty( String key ) diff --git a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java index dc312edf..812ecd83 100644 --- a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java +++ b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnMojoExecutionListener.java @@ -25,6 +25,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Properties; @@ -276,7 +277,7 @@ public class XMvnMojoExecutionListener } else if ( XMVN_BUILDDEP.equals( execution ) ) { - trySetBeanProperty( mojo, "resolutions", List.copyOf( resolutions ) ); + trySetBeanProperty( mojo, "resolutions", Collections.unmodifiableList( new ArrayList<>( resolutions ) ) ); } } diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java index e77ca530..75cc4922 100644 --- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java +++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/BuildDependencyVisitor.java @@ -16,6 +16,7 @@ package org.fedoraproject.xmvn.mojo; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -53,7 +54,7 @@ class BuildDependencyVisitor public Set<Artifact> getArtifacts() { - return Set.copyOf( artifacts ); + return Collections.unmodifiableSet( artifacts ); } private boolean isExternal( InputLocation location ) -- 2.36.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor