Changeset 2519


Ignore:
Timestamp:
Jun 25, 2014, 8:25:04 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #611: Create package for supporting external files via SFTP

Throw IOException with a descriptive message instead of NullPointerException when a sftp:// URL is not linked with a file server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.xfiles/trunk/src/net/sf/basedb/xfiles/sftp/SftpConnectionManager.java

    r2518 r2519  
    141141    {
    142142      ssh = new SSHClient();
    143       if (parameters.getSshFingerprint() == null)
     143      if (parameters == null)
     144      {
     145        throw new IOException("No file server specified for " + uri);
     146      }
     147      else if (parameters.getSshFingerprint() == null)
    144148      {
    145149        throw new IOException("No SSH fingerprint in connection parameters for "+ uri);
Note: See TracChangeset for help on using the changeset viewer.