mirror of https://github.com/apache/archiva.git
Moving from Plexus Utils IOUtil to Commons IO IOUtils. close(..) becomes closeQuietly(..). copy(..) stays the same. In 1.3 (we're on 1.2 currently) copy(..) will throw an exception if more than MAXINT bytes are copied, but this is just a test case so I think we're safe.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@481460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08b6a8f7b6
commit
5484a75333
|
@ -44,6 +44,10 @@
|
|||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.maven.archiva.configuration;
|
|||
import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Reader;
|
||||
import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Writer;
|
||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class DefaultConfigurationStore
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileReader );
|
||||
IOUtils.closeQuietly( fileReader );
|
||||
}
|
||||
}
|
||||
return configuration;
|
||||
|
@ -166,7 +166,7 @@ public class DefaultConfigurationStore
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileWriter );
|
||||
IOUtils.closeQuietly( fileWriter );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,5 +47,9 @@
|
|||
<artifactId>plexus-i18n</artifactId>
|
||||
<version>1.0-beta-6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.codehaus.plexus.digest.Digester;
|
|||
import org.codehaus.plexus.digest.DigesterException;
|
||||
import org.codehaus.plexus.i18n.I18N;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -213,7 +213,7 @@ public class DefaultRepositoryConverter
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( writer );
|
||||
IOUtils.closeQuietly( writer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ public class DefaultRepositoryConverter
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileReader );
|
||||
IOUtils.closeQuietly( fileReader );
|
||||
}
|
||||
return metadata;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ public class DefaultRepositoryConverter
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( writer );
|
||||
IOUtils.closeQuietly( writer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,5 +53,9 @@
|
|||
<version>1.2_Java1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.codehaus.plexus.digest.DigestUtils;
|
|||
import org.codehaus.plexus.digest.DigesterException;
|
||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -407,7 +407,7 @@ public class DefaultProxyRequestHandler
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileReader );
|
||||
IOUtils.closeQuietly( fileReader );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -440,7 +440,7 @@ public class DefaultProxyRequestHandler
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileReader );
|
||||
IOUtils.closeQuietly( fileReader );
|
||||
}
|
||||
|
||||
if ( changed )
|
||||
|
@ -457,7 +457,7 @@ public class DefaultProxyRequestHandler
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileWriter );
|
||||
IOUtils.closeQuietly( fileWriter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,6 +70,10 @@
|
|||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.maven.model.Model;
|
|||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
|
||||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -87,7 +87,7 @@ public class InvalidPomArtifactReportProcessor
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( reader );
|
||||
IOUtils.closeQuietly( reader );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
|||
import org.apache.maven.project.MavenProjectBuilder;
|
||||
import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
|
||||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -238,7 +238,7 @@ public class LocationArtifactReportProcessor
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( isReader );
|
||||
IOUtils.closeQuietly( isReader );
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.maven.archiva.reporting.store.ReportingStoreException;
|
|||
import org.apache.maven.archiva.reporting.database.ReportingDatabase;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -94,7 +94,7 @@ public class DefaultReportingStore
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileReader );
|
||||
IOUtils.closeQuietly( fileReader );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public class DefaultReportingStore
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( fileWriter );
|
||||
IOUtils.closeQuietly( fileWriter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.maven.archiva.reporting.reporter;
|
|||
import org.codehaus.plexus.digest.Digester;
|
||||
import org.codehaus.plexus.digest.DigesterException;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
|
@ -136,7 +136,7 @@ public abstract class AbstractChecksumArtifactReporterTestCase
|
|||
|
||||
BufferedReader in = new BufferedReader( new FileReader( filename1 ) );
|
||||
out.putNextEntry( new JarEntry( filename1 ) );
|
||||
IOUtil.copy( in, out );
|
||||
IOUtils.copy( in, out );
|
||||
in.close();
|
||||
out.close();
|
||||
|
||||
|
|
|
@ -59,5 +59,9 @@
|
|||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
|||
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
|
||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
@ -268,7 +268,7 @@ public class DefaultRepositoryAssembler
|
|||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( writer );
|
||||
IOUtils.closeQuietly( writer );
|
||||
}
|
||||
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue