Bug 1257021

Summary: (6.4.z) JarIndexer mishandles paths with the extension in multiple elements
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: baranowb <bbaranow>
Component: OtherAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.4.2CC: bmaxwell, jason.greene, jtruhlar, pmackay
Target Milestone: CR1   
Target Release: EAP 6.4.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 12:57:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1244860, 1339868    

Description baranowb 2015-08-26 06:04:39 UTC
No customer case, created as offspring of upgrade BZ.




FileNotFoundException for some JAR file paths when the index file path is constructed.
The problem appears to be in org.jboss.jandex.JarIndexer#getIndexFile(File, boolean), wherein every occurrence of the extension is replaced in the entire JAR file path, such that path elements that include the extension (e.g., ".jar") are incorrectly modified.
An example from Jandex used in an Arquillian context:
/private/var/folders/41/qy6ftgc53mn4v01s3xnytzgc0000gq/T/arquillian8152228539718351683MyTestApp.jar/MyTestApp.jar
where arquillian8152228539718351683MyTestApp.jar is a directory, and the resulting index file path is
/private/var/folders/41/qy6ftgc53mn4v01s3xnytzgc0000gq/T/arquillian8152228539718351683MyTestApp-jar/MyTestApp-jar.idx
and there is no valid directory named arquillian8152228539718351683MyTestApp-jar

Comment 2 Peter Mackay 2016-08-29 15:37:40 UTC
Verified with EAP 6.4.10.CP.CR2

Comment 3 Petr Penicka 2017-01-17 12:57:21 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.