You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/04/08 14:19:33 UTC

[Bug 56365] New: Simplify use of Mapper in StandardJarScanner

https://issues.apache.org/bugzilla/show_bug.cgi?id=56365

            Bug ID: 56365
           Summary: Simplify use of Mapper in StandardJarScanner
           Product: Tomcat 7
           Version: 7.0.53
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: knst.kolinko@gmail.com

Looking at the code that performs jar names filtering in StandardJarScanner in
8.0.5, 7.0.53.

This is in view of
a) backporting it to Tomcat 6 to get rid of ecj-xxx.jar names in the lists of
ignored files there,
b) documenting what filename patterns are supported here.

Essentially, the code calls "Matcher.matchPath(toSkip, jarName)" (see
StandardJarScanFilter#check() in 8.0.5) where jarName is just a file name.

This is an overkill. The matchPath() method is designed to work with Ant-style
patterns matching against file paths. This method handles file names hierarchy
(directory names and "**" directory name pattern).  The actual matching of the
names is performed by Matcher.match(String pattern, String str, boolean
caseSensitive), which is a rather more simple API.

Thus the proposal is to get rid of Matcher.matchPath() and call Matcher.match()
directly. This allows to remove a lot of unneeded code.

For documentation, the file name patterns supported by Matcher.match()
according to its javadoc are as follows:
 * The pattern may contain two special characters:<br>
 * '*' means zero or more characters<br>
 * '?' means one and only one character

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56365] Simplify use of Mapper in StandardJarScanner

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56365

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
Fixed in Tomcat 8, will be in 8.0.6.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56365] Simplify use of Mapper in StandardJarScanner

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56365

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> ---
Fixed in Tomcat 7, will be in 7.0.54.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org