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

Catch the case the path is null.

This commit is contained in:
Alain Magloire 2003-04-29 17:28:12 +00:00
parent b1afbfd7c7
commit 1ae15870b3

View file

@ -12,6 +12,7 @@ import org.eclipse.cdt.core.IBinaryParser;
import org.eclipse.cdt.utils.elf.AR;
import org.eclipse.cdt.utils.elf.Elf;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
/**
*/
@ -21,6 +22,9 @@ public class ElfParser extends AbstractCExtension implements IBinaryParser {
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IPath)
*/
public IBinaryFile getBinary(IPath path) throws IOException {
if (path == null ) {
path = new Path("");
}
try {
Elf e = new Elf(path.toOSString());
e.dispose();