tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gallimore (Jira)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-2756) Typo in the DeploymentsResolver causes excluding all URLs
Date Wed, 18 Dec 2019 11:23:00 GMT

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

Jonathan Gallimore commented on TOMEE-2756:
-------------------------------------------

Could you debug through this method: [https://github.com/apache/tomee/blob/tomee-7.0.x/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentsResolver.java#L430]

and let us know what's in original, urlSet, prefiltered, and what's in your include and
exclude filters? I have a test here, but getting the assertions right is proving tricky -
I'm basically always getting an empty list back.

> Typo in the DeploymentsResolver causes excluding all URLs
> ---------------------------------------------------------
>
>                 Key: TOMEE-2756
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2756
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 7.0.5
>         Environment: Ubuntu 18.04, Embedded TomEE 7.0.5
>            Reporter: RomanKa
>            Priority: Major
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the project: openejb-core
>  Is in the package: org.apache.openejb.config
>  Class: DeploymentsResolver
>  Method: loadFromClasspath
>  Line: 264
> There is typo there from refactoring done 5 years ago, which prevent us from upgrading.
> Current code:
> {code:java}
> UrlSet unchecked = new UrlSet();            if (!searchResult.filterDescriptors) {
>                 unchecked = NewLoaderLogic.applyBuiltinExcludes(searchResult.prefiltered.exclude(searchResult.prefiltered));
>                 if (searchResult.filterSystemApps) {
>                     unchecked = unchecked.exclude(".*/openejb-[^/]+(.(jar|ear|war)(./)?|/target/classes/?)");
>                 }
>                 processUrls("DeploymentsResolver2", unchecked.getUrls(), classLoader,
EnumSet.allOf(RequireDescriptors.class), jarList);
>             } {code}
> In the exclude should be urlSet instead of prefiltered, otherwice all URL are excluded:
> {code:java}
> unchecked = NewLoaderLogic.applyBuiltinExcludes(searchResult.prefiltered.exclude(searchResult.urlSet));
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message