1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

NPE in resource lookup, bug 261483.

This commit is contained in:
Markus Schorn 2009-01-27 17:13:30 +00:00
parent f0f568f2d5
commit 3feca4f34f

View file

@ -33,7 +33,10 @@ abstract class LocationAdapter<T> {
public static final LocationAdapter<IPath> PATH = new LocationAdapter<IPath>() { public static final LocationAdapter<IPath> PATH = new LocationAdapter<IPath>() {
@Override @Override
public String extractName(IPath location) { public String extractName(IPath location) {
return location.lastSegment(); String name = location.lastSegment();
if (name != null)
return name;
return location.toString();
} }
@Override @Override