Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.6:Update
xmvn-mojo.28016
0001-Restore-possibility-to-build-with-Java-8.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Restore-possibility-to-build-with-Java-8.patch of Package xmvn-mojo.28016
From 25029d2fc4db56e9f9a451505c8c76aaf0e8be9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch> Date: Fri, 6 May 2022 18:40:49 +0200 Subject: [PATCH 1/4] Restore possibility to build with Java 8 --- .../xmvn/connector/maven/XMvnToolchainManager.java | 5 +++-- .../org/fedoraproject/xmvn/deployer/BasicDeployerTest.java | 3 ++- .../org/fedoraproject/xmvn/tools/install/JarUtilsTest.java | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java index 53f1020d..1fb59cb3 100644 --- a/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java +++ b/xmvn-connector/src/main/java/org/fedoraproject/xmvn/connector/maven/XMvnToolchainManager.java @@ -22,6 +22,7 @@ import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; import org.apache.maven.toolchain.DefaultToolchainManagerPrivate; import org.apache.maven.toolchain.MisconfiguredToolchainException; +import org.apache.maven.toolchain.ToolchainPrivate; import org.codehaus.plexus.component.annotations.Component; /** @@ -38,11 +39,11 @@ public class XMvnToolchainManager try { - for ( var toolchain : getToolchainsForType( "jdk", session ) ) + for ( ToolchainPrivate toolchain : getToolchainsForType( "jdk", session ) ) { if ( toolchain.matchesRequirements( Collections.singletonMap( "xmvn", "xmvn" ) ) ) { - for ( var project : session.getAllProjects() ) + for ( MavenProject project : session.getAllProjects() ) { session.setCurrentProject( project ); storeToolchainToBuildContext( toolchain, session ); diff --git a/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java b/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java index f79e5b64..0028f4f1 100644 --- a/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java +++ b/xmvn-core/src/test/java/org/fedoraproject/xmvn/deployer/BasicDeployerTest.java @@ -28,6 +28,7 @@ import java.nio.file.Paths; import java.nio.file.attribute.PosixFilePermission; import java.util.Arrays; import java.util.Collections; +import java.util.regex.Matcher; import java.util.regex.Pattern; import org.junit.jupiter.api.Test; @@ -149,7 +150,7 @@ public class BasicDeployerTest { return Files.lines( Paths.get( "/proc/self/status" ) ).map( s -> { - var matcher = PROCESS_UID_PATTERN.matcher( s ); + Matcher matcher = PROCESS_UID_PATTERN.matcher( s ); if ( matcher.matches() ) { diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java index 8866752d..d2ef084e 100644 --- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java +++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/JarUtilsTest.java @@ -411,8 +411,8 @@ public class JarUtilsTest byte[] content = Files.readAllBytes( testJar ); - var previousSecurity = System.getSecurityManager(); - var fobiddingSecurity = new ForbiddingSecurityManager( testJar.toString() ); + SecurityManager previousSecurity = System.getSecurityManager(); + SecurityManager fobiddingSecurity = new ForbiddingSecurityManager( testJar.toString() ); System.setSecurityManager( fobiddingSecurity ); @@ -430,7 +430,7 @@ public class JarUtilsTest "Content of the backup file is different from the content of the original file" ); System.setSecurityManager( previousSecurity ); - try ( var os = new FileOutputStream( testJar.toFile(), true ) ) + try ( FileOutputStream os = new FileOutputStream( testJar.toFile(), true ) ) { /// Append garbage to the original file to check if the content of the backup will be retained os.write( 0 ); -- 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