Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334150 - Breakpoints in JSP fragment (.jspf) files are not hit
Summary: Breakpoints in JSP fragment (.jspf) files are not hit
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 13:41 EST by Natasha D'Silva CLA
Modified: 2011-01-27 13:05 EST (History)
2 users (show)

See Also:
nsand.dev: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
nsand.dev: pmc_approved? (naci.dai)
nsand.dev: pmc_approved? (deboer)
nsand.dev: pmc_approved? (neil.hauge)
nsand.dev: pmc_approved? (kaloyan)
thatnitind: review+


Attachments
patch (10.36 KB, patch)
2011-01-25 17:34 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natasha D'Silva CLA 2011-01-12 13:41:40 EST
Build Identifier: 

There's no pattern specified to support JSP fragment files, as a result, these breakpoints can be set in the UI but they are never installed on the  target.


Reproducible: Always
Comment 1 Nick Sandonato CLA 2011-01-25 17:34:43 EST
Created attachment 187588 [details]
patch

Problem stems from there being duplicate class patterns defined when a file has multiple content types associated with it. The duplicates need to be eliminated.
Comment 2 Nitin Dahyabhai CLA 2011-01-25 17:54:14 EST
While the patch looks fine, you did consider using org.eclipse.wst.sse.core.utils.StringUtils#unpack(String), right?
Comment 3 Nick Sandonato CLA 2011-01-26 10:56:04 EST
(In reply to comment #2)
> While the patch looks fine, you did consider using
> org.eclipse.wst.sse.core.utils.StringUtils#unpack(String), right?

I had considered it, but I figured that would involving looping twice: once to unpack into a String[] and then again to add those strings to the set. To me, using the tokenizer seemed more efficient.
Comment 4 Nick Sandonato CLA 2011-01-26 16:49:06 EST
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.

Requested by an adopter, as the implementation of classpattern providers caused repeated patterns which prevented breakpoints in  JSP fragments from being hit.
 
* Is there a work-around? If so, why do you believe the work-around is insufficient?

No

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Existing unit tests have been run. Adhoc testing conducted by myself and Natasha.

* Give a brief technical overview. Who has reviewed this fix?

This patch eliminates the possibility of breakpoint classpattern providers providing duplicate patterns for files that may have multiple content types.

Nitin and Natasha have both reviewed my patch.

* What is the risk associated with this fix?

Low. The bulk of the changes were made to change concatenation of tokens into storing them in a Set.
Comment 5 Nick Sandonato CLA 2011-01-26 17:29:04 EST
Thank you for the reviews. Code has been checked in.