Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 14101 Details for
Bug 70997
Debugger doesn't stop in finally block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
bug70997.patch (text/plain), 4.54 KB, created by
Darin Wright
on 2004-08-20 16:20:16 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2004-08-20 16:20:16 EDT
Size:
4.54 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java,v >retrieving revision 1.66 >diff -u -r1.66 JavaLineBreakpoint.java >--- model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java 29 Jun 2004 18:40:22 -0000 1.66 >+++ model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java 20 Aug 2004 20:16:55 -0000 >@@ -235,16 +235,25 @@ > * @see org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint#newRequest(org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget, com.sun.jdi.ReferenceType) > */ > protected EventRequest newRequest(JDIDebugTarget target, ReferenceType type) throws CoreException { >- Location location= null; >- int lineNumber= getLineNumber(); >- location= determineLocation(lineNumber, type); >- if (location == null) { >+ int lineNumber = getLineNumber(); >+ List locations = determineLocations(lineNumber, type); >+ EventRequest lastRequest = null; >+ if (locations == null || locations.isEmpty()) { > // could be an inner type not yet loaded, or line information not available > return null; >+ } else { >+ Iterator iterator = locations.iterator(); >+ while (iterator.hasNext()) { >+ Location location = (Location) iterator.next(); >+ EventRequest request = createLineBreakpointRequest(location, target); >+ if (iterator.hasNext()) { >+ registerRequest(request, target); >+ } else { >+ lastRequest = request; >+ } >+ } > } >- >- EventRequest request = createLineBreakpointRequest(location, target); >- return request; >+ return lastRequest; > } > > /** >@@ -280,10 +289,10 @@ > } > > /** >- * Returns a location for the line number in the given type. >- * Returns <code>null</code> if a location cannot be determined. >+ * Returns a list of locations of the given line number in the given type. >+ * Returns <code>null</code> if locations cannot be determined. > */ >- protected Location determineLocation(int lineNumber, ReferenceType type) { >+ protected List determineLocations(int lineNumber, ReferenceType type) { > List locations= null; > try { > locations= type.locationsOfLine(lineNumber); >@@ -312,12 +321,7 @@ > JDIDebugPlugin.log(e); > return null; > } >- >- if (locations != null && locations.size() > 0) { >- return (Location) locations.get(0); >- } >- >- return null; >+ return locations; > } > > /** >Index: model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java,v >retrieving revision 1.12 >diff -u -r1.12 JavaStratumLineBreakpoint.java >--- model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java 29 Jun 2004 18:40:22 -0000 1.12 >+++ model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaStratumLineBreakpoint.java 20 Aug 2004 20:16:55 -0000 >@@ -12,6 +12,7 @@ > > import java.util.Iterator; > import java.util.List; >+import java.util.ListIterator; > import java.util.Map; > > import org.eclipse.core.resources.IResource; >@@ -259,10 +260,10 @@ > } > > /** >- * Returns a location for the line number in the given type. >+ * Returns a list of locations for the given line number in the given type. > * Returns <code>null</code> if a location cannot be determined. > */ >- protected Location determineLocation(int lineNumber, ReferenceType type) { >+ protected List determineLocations(int lineNumber, ReferenceType type) { > List locations; > String sourcePath; > try { >@@ -300,18 +301,21 @@ > > if (sourcePath == null) { > if (locations.size() > 0) { >- return (Location)locations.get(0); >+ return locations; > } > } else { >- for (Iterator iter = locations.iterator(); iter.hasNext();) { >+ for (ListIterator iter = locations.listIterator(); iter.hasNext();) { > Location location = (Location) iter.next(); > try { >- if (sourcePath.equals(location.sourcePath())) { >- return location; >+ if (!sourcePath.equals(location.sourcePath())) { >+ iter.remove(); > } > } catch (AbsentInformationException e1) { > // nothing to do; > } >+ } >+ if (locations.size() > 0) { >+ return locations; > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 70997
:
13680
|
13681
| 14101