You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Brett Porter <br...@apache.org> on 2007/10/17 22:09:42 UTC
Re: svn commit: r585583 - in /maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact: DuplicateArtifactsConsumer.java LocationArtifactsConsumer.java
On 18/10/2007, at 3:23 AM, joakime@apache.org wrote:
> @@ -294,13 +294,14 @@
> {
> try
> {
> - BidirectionalRepositoryLayout layout =
> layoutFactory.getLayout( artifact );
> - return layout.toPath( artifact );
> + String repoId = artifact.getModel().getRepositoryId();
> + ManagedRepositoryContent repo =
> repositoryFactory.getManagedRepositoryContent( repoId );
> + return repo.toPath( artifact );
> }
> - catch ( LayoutException e )
> + catch ( RepositoryException e )
> {
> getLogger().warn( "Unable to calculate path for
> artifact: " + artifact );
> - return null;
> + return "";
> }
Is that really an appropriate response to a request for a path, or
will this expect the caller to do some error handling on the empty
string?
Also - the commit seems to be spread out across multiple revisions
again - what tooling are you using?
- Brett
--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/
Re: svn commit: r585583 - in /maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact:
DuplicateArtifactsConsumer.java LocationArtifactsConsumer.java
Posted by Joakim Erdfelt <jo...@erdfelt.com>.
Good catch.
That is minor problem, and contained entirely within the reporting
consumers with this change.
I'll fix that toot-sweet.
- Joakim
Brett Porter wrote:
>
> On 18/10/2007, at 3:23 AM, joakime@apache.org wrote:
>
>> @@ -294,13 +294,14 @@
>> {
>> try
>> {
>> - BidirectionalRepositoryLayout layout =
>> layoutFactory.getLayout( artifact );
>> - return layout.toPath( artifact );
>> + String repoId = artifact.getModel().getRepositoryId();
>> + ManagedRepositoryContent repo =
>> repositoryFactory.getManagedRepositoryContent( repoId );
>> + return repo.toPath( artifact );
>> }
>> - catch ( LayoutException e )
>> + catch ( RepositoryException e )
>> {
>> getLogger().warn( "Unable to calculate path for
>> artifact: " + artifact );
>> - return null;
>> + return "";
>> }
>
> Is that really an appropriate response to a request for a path, or
> will this expect the caller to do some error handling on the empty
> string?
>
> Also - the commit seems to be spread out across multiple revisions
> again - what tooling are you using?
>
> - Brett
>
> --
> Brett Porter - brett@apache.org
> Blog: http://www.devzuz.org/blogs/bporter/
>
--
- Joakim Erdfelt
joakim@erdfelt.com
Open Source Software (OSS) Developer