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

Bug 334843

Summary: UseReportConverter prints out reference plus value(s) for "API patterns"
Product: [Eclipse Project] PDE Reporter: Peter Parapounsky <pjparapo>
Component: API ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 4.0   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Proposed fix none

Description Peter Parapounsky CLA 2011-01-19 20:42:48 EST
Build Identifier: 3.7M4

To reproduce:
1. Run the API Use Ant Task with attribute:

 apipatterns=".*"

2. Convert the XML report to HTML using the API Use Report Conversion Ant Task. The resulting HTML will report the used API patterns as :

API Patterns: 	[Ljava.lang.String;@b524aa.*

I looked at the code and the problem appears to be in class UseReportConverter, where the API patterns string array is appended directly:

String[] patterns = this.metadata.getApiPatterns();
if(patterns != null) {
	buffer.append(this.metadata.getApiPatterns());
	for (int i = 0; i < patterns.length; i++) {
		buffer.append(patterns[i]).append(BR);
	}
}

Reproducible: Always
Comment 1 Olivier Thomann CLA 2011-01-19 21:18:58 EST
Created attachment 187163 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2011-01-19 21:19:27 EST
Michael, please verify.
Comment 3 Olivier Thomann CLA 2011-01-19 21:47:54 EST
Created attachment 187164 [details]
Proposed fix

Same as before but with copyrights update.
Comment 4 Michael Rennie CLA 2011-01-20 14:23:59 EST
+1 applied patch to HEAD