Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334843 - UseReportConverter prints out reference plus value(s) for "API patterns"
Summary: UseReportConverter prints out reference plus value(s) for "API patterns"
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 20:42 EST by Peter Parapounsky CLA
Modified: 2011-01-20 14:24 EST (History)
1 user (show)

See Also:


Attachments
Proposed fix (922 bytes, patch)
2011-01-19 21:18 EST, Olivier Thomann CLA
no flags Details | Diff
Proposed fix (1.31 KB, patch)
2011-01-19 21:47 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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