struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carol Saah (JIRA)" <>
Subject [jira] [Commented] (WW-4038) struts.convention.action.includeJars didn't work
Date Thu, 25 Apr 2013 08:22:16 GMT


Carol Saah commented on WW-4038:

Because this issue was fixed, I didn't add the rest of my findings.  But, I'm not sure that
the fix solves the issue that I found.  So, just in case, I am posting my findings. To get
this information, I put the 2.3.14 version of PackageBasedActionConfigBuilder in my solution
above.  And, I extracted new UrlSet(classLoaderInterface, this.fileProtocols)" into a local
variable.  Then, I added debug log statements after each statement so that when WebLogic started
and loaded the app, I could see what was being set.  

The source of the bug is in line 416 of PackageBasedActionConfigBuilder (as posted above):
urlSet.include(new UrlSet(classLoaderInterface, this.fileProtocols));

The URLs generated in new UrlSet(classLoaderInterface, this.fileProtocols) DO include _wl_cls_gen.jar,
but the jars from the UrlSet are not added to the overall urlSet. Line 104 in UrlSet does
not add the URLs from the urlSet parameter. This test will fail for the 2.3.14 implementation
of UrlSet. (I copied the source file for UrlSet into our apps test packages to write a test
against it.)

public void testInclude() {
try { 
    UrlSet thisUrlSet = new UrlSet(); 
    ArrayList<URL> urls = new ArrayList<URL>(); 
    URL url = new URL("file:/c:/dir"); urls.add(url); 
    UrlSet anotherUrlSet = new UrlSet(urls); 
    List<URL> expectedUrlsInUrlSet = thisUrlSet.getUrls(); 
    assertFalse("file:/c:/dir should be in the list of URLs", expectedUrlsInUrlSet.isEmpty());
    assertThat("file:/c:/dir should be in the list of URLs", url, Matchers.isIn(expectedUrlsInUrlSet));
} catch (MalformedURLException e) { 
    fail("should not throw: " + e.getMessage()); }

Sorry, if I am incorrect, but it doesn't seem like the fix is complete so I am adding this
> struts.convention.action.includeJars didn't work
> ------------------------------------------------
>                 Key: WW-4038
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.3.12
>         Environment: struts-2.3.12
>            Reporter: Xu Hui Sheng
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.15
> please change the 416 line of org.apache.struts2.convention.PackageBasedActionConfigBuilder
> urlSet.include(new UrlSet(classLoaderInterface, this.fileProtocols));
> to
> urlSet = urlSet.include(new UrlSet(classLoaderInterface, this.fileProtocols));

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:

View raw message