Skip to content

Commit

Permalink
[MSHARED-1002] Require Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Apr 24, 2022
1 parent 2c2264b commit f60db45
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 46 deletions.
47 changes: 18 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-components</artifactId>
<version>34</version>
<version>36</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -54,17 +54,30 @@
</distributionManagement>

<properties>
<javaVersion>7</javaVersion>
<javaVersion>8</javaVersion>
<project.build.outputTimestamp>2020-10-15T00:00:05Z</project.build.outputTimestamp>
<slf4j.version>1.7.36</slf4j.version>
<surefire.version>3.0.0-M6</surefire.version>
<checkstyle.violation.ignore>None</checkstyle.violation.ignore>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>2.11.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -93,35 +106,11 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<pluginManagement>
<plugins>
<!-- remove with next parent upgrade -->
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
*/

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.file.Files;

/**
* <p>FileLogger class.</p>
Expand Down Expand Up @@ -69,7 +69,7 @@ public FileLogger( File outputFile, FileLoggerMirrorHandler mirrorHandler ) thro
if ( outputFile != null )
{
outputFile.getParentFile().mkdirs();
outputStream = new FileOutputStream( outputFile );
outputStream = Files.newOutputStream( outputFile.toPath() );
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void setGlobalVariable( String name, Object value )
*/
public void setClassPath( List<String> classPath )
{
this.classPath = ( classPath != null ) ? new ArrayList<>( classPath ) : new ArrayList<String>();
this.classPath = ( classPath != null ) ? new ArrayList<>( classPath ) : new ArrayList<>();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
* under the License.
*/

import org.junit.Test;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Tests the BeanShell interpreter facade.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
* under the License.
*/

import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* FileLoggerTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* under the License.
*/

import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand All @@ -29,7 +29,7 @@
import java.util.List;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Tests the Groovy interpreter facade.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
* under the License.
*/

import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* @author Olivier Lamy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestMirrorHandler implements FileLoggerMirrorHandler

private StringBuilder loggedMessage;

public TestMirrorHandler() throws IOException
public TestMirrorHandler()
{
loggedMessage = new StringBuilder();
}
Expand Down

0 comments on commit f60db45

Please sign in to comment.