1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

Fix for PR 46303: Exception when selecting Debug... menu.

Check if the string passed to the 'getCommonSourceLocationsFromMemento' method is not empty.
This commit is contained in:
Mikhail Khodjaiants 2003-11-07 21:40:39 +00:00
parent df634f2e75
commit 90285517de
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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 );
}
}