Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 917075 Details for
Bug 1118341
"number of transferred bytes cannot be negative" by aether-connector-file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
BZ1118341.patch
BZ1118341.patch (text/plain), 2.09 KB, created by
Toshiya Kobayashi
on 2014-07-10 13:18:53 UTC
(
hide
)
Description:
BZ1118341.patch
Filename:
MIME Type:
Creator:
Toshiya Kobayashi
Created:
2014-07-10 13:18:53 UTC
Size:
2.09 KB
patch
obsolete
>diff --git a/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/FileRepositoryWorker.java b/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/FileRepositoryWorker.java >index 8a4fb57..94c00ce 100644 >--- a/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/FileRepositoryWorker.java >+++ b/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/FileRepositoryWorker.java >@@ -224,6 +224,7 @@ class FileRepositoryWorker > > if ( transfer.isExistenceCheck() ) > { >+ totalTransferred = 0; > if ( !src.exists() ) > { > throw new FileNotFoundException( src.getAbsolutePath() ); >diff --git a/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/ArtifactWorkerTest.java b/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/ArtifactWorkerTest.java >index 3de6f29..34ef2f9 100644 >--- a/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/ArtifactWorkerTest.java >+++ b/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/ArtifactWorkerTest.java >@@ -174,4 +174,28 @@ public class ArtifactWorkerTest > TestFileUtils.delete( dir ); > } > >+ @Test >+ public void testSetExistenceCheck() >+ throws IOException, ArtifactTransferException >+ { >+ >+ DefaultArtifact artifact = new DefaultArtifact( "test", "artId1", "jar", "1" ); >+ String expectedContent = "Dies ist ein Test."; >+ >+ uploadArtifact( artifact, expectedContent ); >+ >+ File file = TestFileUtils.createTempFile( "" ); >+ ArtifactDownload down = new ArtifactDownload( artifact, "", file, "" ); >+ down.setExistenceCheck(true); >+ FileRepositoryWorker worker = new FileRepositoryWorker( down, repository, session ); >+ worker.setFileProcessor( TestFileProcessor.INSTANCE ); >+ worker.run(); >+ if ( down.getException() != null ) >+ { >+ throw down.getException(); >+ } >+ >+ // no assert. just to confirm that there is no Exception >+ } >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1118341
:
917072
|
917073
| 917075