Bug 34130

Summary: Debug statements on console
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2003-03-07 14:38:10 EST
Build: 200303062359

Steps to reproduce:

1) Create a connection to dev.eclipse.org
2) Checkout the "platform-core" module
3) Switch to java perspective
4) Open a java editor on
org.eclipse.core.internal.resources.ProjectDescriptionReader.java

The following messages are printed to the console (repeated hundreds of times):

count = 0, total = 22
count = 0, total = 156
count = 0, total = 721
count = 0, total = 22
count = 0, total = 156
count = 0, total = 721
count = 0, total = 22
count = 0, total = 156
count = 0, total = 721
count = 0, total = 22
count = 0, total = 156
count = 0, total = 721
count = 0, total = 22
count = 0, total = 156
count = 0, total = 721

Note: This compilation unit depends on types in a corrupt zip file,
org.apache.xerces.XercesImpl.jar

I can reproduce with different VMs, so it's not coming from class library code.

I traced it as far as SourceTypeBinding.faultInTypesForFieldsAndMethods.  When I
step over the invocation of the "fields()" method, the console entries appear.
Comment 1 Olivier Thomann CLA 2003-03-07 15:44:09 EST
I am investigating.
Comment 2 Olivier Thomann CLA 2003-03-10 09:22:45 EST
This is still the case with RC2.
Comment 3 Olivier Thomann CLA 2003-03-10 11:12:28 EST
This is a debug trace in the library code. If you try with J9, you don't get it.
I wrote that small test case:
import java.io.IOException;
import java.util.zip.ZipFile;

import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;

public class Test {

	public static void main(String[] args) {
		try {
			ClassFileReader.read(new ZipFile("d:/temp/xercesImpl.jar"), "", false);
		} catch (ClassFormatException e) {
		} catch (IOException e) {
		}
	}
}

This is reading the corrupted jar. I get in the console:
count = 0, total = 721

but nothing is printed to the console while executing the read(...). If the read
method would print anything to the console, we would get it with J9 as well and
we don't.
Close as INVALID.
Comment 4 John Arthorne CLA 2003-03-10 11:22:28 EST
I did a google search on "count = 0, total = 22", and I found a few hits.  Some
people reported this using command line ant scripts, again when corrupt jars
were present.  So it's certainly not coming from within eclipse.