Title: Message Title
|
|
Is there a plan to have a fix in a future version?
I would like to weigh in on a fix of this issue.
The WebAppBeanArchiveScanner does not do appropriate equality checks on the paths it discovers in two different ways. When a server.xml (admittedly NOT deployed via a WAR) specifies a resource directory like this (replace ... with a custom path):
```xml <PreResources base="C:\...\target\classes" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes"/>
``` the DefaultBeanArchiveScanner returns `C:\...\target\classes\META-INF\beans.xml` as one of the beans paths. Afterwards, the WebAppBeanArchiveScanner does _substring matching_ to determine whether the path contains `WEB-INF\classes` (which the path does not). It then asks the servelet context for the beans.xml resource in the serverĀ“s `WEB-INF\classes\META-INF` directory, and resolves it to the _real_ file url which is again `C:\...\target\classes\META-INF\beans.xml`. Thus, the same resource is found twice.
The problem is that substring matching is used to determine whether two semantically different URLs are the same. One of the URLs is the _logical_ path to the file from the serverĀ“s view and one is the _real_ path to the file.
A simple fix to the issue would be to perform the path comparison _after_ the real file path of the beans.xml was resolved.
However, I am not sure whether it would match with the specification to , since I do not know the relevant part. |
|
|
|
|
|
_______________________________________________
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues