Skip to content

Commit

Permalink
Update plexus-container-default to 2.1.1, commons-io 2.11.0
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Solórzano <jorsol@gmail.com>
  • Loading branch information
jorsol authored and slachiewicz committed Apr 28, 2022
1 parent ae29b75 commit 40b1b12
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
28 changes: 18 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
</contributors>

<dependencies>
<!-- Plexus dependencies -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-30</version>
<version>2.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -65,37 +66,44 @@
<artifactId>plexus-io</artifactId>
<version>3.2.0</version>
</dependency>
<!-- Apache Commons dependencies -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.21</version>
</dependency>
<!-- Other dependencies -->
<dependency>
<groupId>org.iq80.snappy</groupId>
<artifactId>snappy</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.9</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.9</version>
<scope>runtime</scope>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;

import org.codehaus.plexus.archiver.util.ArchiveEntryUtils;
import org.codehaus.plexus.components.io.attributes.SymlinkUtils;
Expand Down Expand Up @@ -412,7 +413,7 @@ protected boolean shouldExtractEntry( File targetDirectory, File targetFileName,
boolean fileOnDiskIsNewerThanEntry = targetFileName.lastModified() >= entryDate.getTime();
boolean differentCasing = !entryName.equals( relativeCanonicalDestPath );

String casingMessage = String.format( "Archive entry '%s' and existing file '%s' names differ only by case."
String casingMessage = String.format( Locale.ENGLISH, "Archive entry '%s' and existing file '%s' names differ only by case."
+ " This may lead to an unexpected outcome on case-insensitive filesystems.", entryName, canonicalDestPath );

// (1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import java.util.zip.ZipOutputStream;

import org.apache.commons.compress.parallel.InputStreamSupplier;
import org.apache.commons.io.output.NullOutputStream;
import org.apache.commons.io.output.NullPrintStream;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.zip.ConcurrentJarCreator;
import org.codehaus.plexus.util.IOUtil;
Expand Down Expand Up @@ -294,7 +294,7 @@ private boolean isJarDateOptionSupported( Method runMethod )
// Test the output code validating the --date option.
String[] args = { "--date", "2099-12-31T23:59:59Z", "--version" };

PrintStream nullPrintStream = new PrintStream( NullOutputStream.NULL_OUTPUT_STREAM );
PrintStream nullPrintStream = NullPrintStream.NULL_PRINT_STREAM;
Integer result = (Integer) runMethod.invoke( jarTool, nullPrintStream, nullPrintStream, args );

return result != null && result.intValue() == 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public Iterator<String> iterator()
*/
public Attribute getAttribute( String attributeName )
{
return attributes.get( attributeName.toLowerCase() );
return attributes.get( attributeName.toLowerCase( Locale.ENGLISH ) );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.Enumeration;

import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.archiver.tar.TarArchiver;
import org.codehaus.plexus.archiver.tar.TarLongFileMode;
Expand All @@ -34,7 +33,8 @@ public void setUp()
throws Exception
{
super.setUp();
getContainer().getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
DefaultPlexusContainer container = (DefaultPlexusContainer) getContainer();
container.getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
}

public void testZipArchiver()
Expand Down

0 comments on commit 40b1b12

Please sign in to comment.