Kaynağa Gözat

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
tags/archiva-0.9-alpha-1
Henri Yandell 17 yıl önce
ebeveyn
işleme
5484a75333

+ 4
- 0
archiva-configuration/pom.xml Dosyayı Görüntüle

@@ -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>

+ 3
- 3
archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java Dosyayı Görüntüle

@@ -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 );
}
}


+ 4
- 0
archiva-converter/pom.xml Dosyayı Görüntüle

@@ -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>

+ 4
- 4
archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java Dosyayı Görüntüle

@@ -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 );
}
}
}

+ 4
- 0
archiva-proxy/pom.xml Dosyayı Görüntüle

@@ -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>

+ 4
- 4
archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyRequestHandler.java Dosyayı Görüntüle

@@ -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 );
}
}
}

+ 4
- 0
archiva-reports-standard/pom.xml Dosyayı Görüntüle

@@ -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>

+ 2
- 2
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/InvalidPomArtifactReportProcessor.java Dosyayı Görüntüle

@@ -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 );
}
}
}

+ 2
- 2
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/LocationArtifactReportProcessor.java Dosyayı Görüntüle

@@ -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;
}

+ 3
- 3
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/store/DefaultReportingStore.java Dosyayı Görüntüle

@@ -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 );
}
}
}

+ 2
- 2
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/reporter/AbstractChecksumArtifactReporterTestCase.java Dosyayı Görüntüle

@@ -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();


+ 4
- 0
archiva-sandbox/archiva-repository-assembler/pom.xml Dosyayı Görüntüle

@@ -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>

+ 2
- 2
archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java Dosyayı Görüntüle

@@ -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

+ 5
- 0
pom.xml Dosyayı Görüntüle

@@ -346,6 +346,11 @@
<artifactId>commons-lang</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</dependencyManagement>
<reporting>

Loading…
İptal
Kaydet