You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2012/10/11 16:29:03 UTC

[jira] [Commented] (TOMEE-459) exclusions.list not working properly

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

Romain Manni-Bucau commented on TOMEE-459:
------------------------------------------

Should have been fixed this morning, can you try the snapshot (will be deployed this night)
                
> exclusions.list not working properly
> ------------------------------------
>
>                 Key: TOMEE-459
>                 URL: https://issues.apache.org/jira/browse/TOMEE-459
>             Project: TomEE
>          Issue Type: Bug
>            Reporter: Andrei Militeev
>            Priority: Minor
>
> there is a bug in code below. 
> not sure how includeFilter supposed to work (should it override default exclusions or not), but as far as exclude filter is concerned, I guess it should be something like:
>  if (filter.accept(name) || (excludeFilter == null && excludeFilter.accept(name)))
> i.e. if either filter accepts the name, it should be excluded... 
> ====================================================== 
> public static UrlSet applyBuiltinExcludes(final UrlSet urlSet, final Filter includeFilter, final Filter excludeFilter) throws MalformedURLException {
>          final Filter filter = Filters.prefixes(getExclusions()); 
>         //filter = Filters.optimize(filter, new PatternFilter(".*/openejb-.*"));
>          final List<URL> urls = urlSet.getUrls(); 
>         final Iterator<URL> iterator = urls.iterator(); 
>         while (iterator.hasNext()) { 
>             final URL url = iterator.next(); 
>             final File file = URLs.toFile(url); 
>             final String name = filter(file).getName(); 
>             if (filter.accept(name) 
>                     && (includeFilter == null || !includeFilter.accept(name)) 
>                     && (excludeFilter == null || excludeFilter.accept(name))) { 
>                 iterator.remove(); 
>             }
>         } 
>         return new UrlSet(urls); 
>     } 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira