Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313760

Summary: PackageInWarScannerTests finds lots more packages in simple-war than before
Product: [RT] Gemini.Web Reporter: Steve Powell <zteve.powell>
Component: unknownAssignee: Chris Frost <eclipse>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: unspecified   
Target Milestone: 1.1.0.RC1-incubation   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Steve Powell CLA 2010-05-20 12:27:03 EDT
Scanning for packages in war files doesn't look inside some jars
(e.g. com.springsource.ch.qos.logback.classic-0.9.9)
but does look inside others:
(e.g. com.springsource.ch.qos.logback.classic-0.9.18)

Detected when upgrading versions of above jars for CQ of test wars.

Test has been adjusted, but it looks like a bug in the older version of the scanner.

It appears that doScanNestedJar() in WebBundleScanner doesn't get the correct entries in the former case

while ((entry = jis.getNextJarEntry()) != null) {...

fails on the first try after getManifest() in the old case but succeeds in the new case.

Junit test case adjusted to new result.  This bug to check if behaviour is correct, and to diagnose why it didn't work before. (Looks like it may be a bug in JarInputStream?)
Comment 1 Chris Frost CLA 2010-09-21 11:47:41 EDT
The current behaviour is correct and according to the history it has never contained the logback.classic jar
Comment 2 Chris Frost CLA 2010-09-22 06:30:48 EDT
The test is working as intended and also works on the previously included jars mentioned previously. I have added them back in to improve the quality of the test.
Comment 3 Glyn Normington CLA 2010-09-27 08:40:25 EDT
RC1 is planned instead of milestone 5.