1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 13:35:22 +02:00

[ftp] Avoid NPE when remote doesnt send system type

This commit is contained in:
Martin Oberhuber 2009-03-19 21:58:36 +00:00
parent 76ff946105
commit 3db44ba3b2

View file

@ -91,6 +91,10 @@ public class FTPClientConfigFactory implements IFTPClientConfigFactory {
*/
public IFTPClientConfigProxy getFTPClientConfig(String parser, String systemName)
{
if (systemName == null) {
// avoid NPE if systemName could not be determined
systemName = ""; //$NON-NLS-1$
}
FTPClientConfigProxy foundFTPClientConfigProxy = null;
@ -220,7 +224,10 @@ public class FTPClientConfigFactory implements IFTPClientConfigFactory {
public FTPFileEntryParser createFileEntryParser(String key) throws ParserInitializationException {
FTPFileEntryParser entryParser = null;
if (key == null) {
// avoid NPE in containsKey when the SYST command returned null
key = ""; //$NON-NLS-1$
}
if(!ftpParsers.containsKey(key))
{
entryParser = defaultFTPEntryParser;