diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index da9105e6bec..9360bc9af2c 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-11-07 Mikhail Khodjaiants + Fix for PR 46303: Exception when selecting Debug... menu. + Check if the string passed to the 'getCommonSourceLocationsFromMemento' method is not empty. + * SourceUtils.java + 2003-11-05 Mikhail Khodjaiants 'getCDIBreakpointFile' returns wrong file for address breakpoints. * CBreakpointManager.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java index 3a6ead4d6a1..2906204a3ca 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java @@ -82,7 +82,7 @@ public class SourceUtils public static ICSourceLocation[] getCommonSourceLocationsFromMemento( String memento ) { ICSourceLocation[] result = new ICSourceLocation[0]; - if ( memento != null ) + if ( !isEmpty( memento ) ) { try { @@ -173,4 +173,9 @@ public class SourceUtils } return (ICSourceLocation[])sourceLocations.toArray( new ICSourceLocation[sourceLocations.size()] ); } + + private static boolean isEmpty( String string ) + { + return ( string == null || string.trim().length() == 0 ); + } }