You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Hao Zhong (JIRA)" <ji...@apache.org> on 2017/03/23 01:52:41 UTC

[jira] [Commented] (ARIES-1705) OBRAriesResolver should identify the application being transformed

    [ https://issues.apache.org/jira/browse/ARIES-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937548#comment-15937548 ] 

Hao Zhong commented on ARIES-1705:
----------------------------------

A patch is submitted.

> OBRAriesResolver should identify the application being transformed
> ------------------------------------------------------------------
>
>                 Key: ARIES-1705
>                 URL: https://issues.apache.org/jira/browse/ARIES-1705
>             Project: Aries
>          Issue Type: Bug
>          Components: Application
>            Reporter: Hao Zhong
>         Attachments: aries.patch
>
>
> The OBRAriesResolver.toImportedBundle method  can import duplicated bundles. The buggy code is as follow:
> {code:title=OBRAriesResolver.java|borderStyle=solid}
> private Collection<ImportedBundle> toImportedBundle(Collection<Content> content) throws ResolverException
>    {
>      log.debug(LOG_ENTRY, "toImportedBundle", content);
>      List<ImportedBundle> result = new ArrayList<ImportedBundle>();
> {code}
> The arraylist shall be replaced with Hashset to remove duplicates. Indeed, ARIES-464 fixed a similar bug in PostResolveTransformer. Its fixed code is:
> {code:title=PostResolveTransformer.java|borderStyle=solid}
>  private Set<ImportedBundle> toImportedBundle(Collection<Content> content) throws ResolverException
>   {
>     _logger.debug(LOG_ENTRY, "toImportedBundle", new Object[]{content});
>     Set<ImportedBundle> result = new HashSet<ImportedBundle>();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)