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

Bug 334150

Summary: Breakpoints in JSP fragment (.jspf) files are not hit
Product: [WebTools] WTP Source Editing Reporter: Natasha D'Silva <ndsilva>
Component: jst.jspAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: raghunathan.srinivasan, thatnitind
Version: 3.2.3Flags: 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+
Target Milestone: 3.2.3   
Hardware: All   
OS: All   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch none

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.