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

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

Andrei Militeev created TOMEE-459:
-------------------------------------

             Summary: 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

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

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TOMEE-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau closed TOMEE-459.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.1
    
> 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
>             Fix For: 1.5.1
>
>
> 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

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

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ 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

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

Posted by "Andrei Militeev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477438#comment-13477438 ] 

Andrei Militeev commented on TOMEE-459:
---------------------------------------

Looks good now. thank you!
                
> 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