Changeset 2192 for trunk/java-client/org


Ignore:
Timestamp:
2001-03-18T20:25:21+12:00 (23 years ago)
Author:
say1
Message:

fixed a buf when no IORs were found ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/util/NzdlServiceFactory.java

    r2189 r2192  
    247247    if (client == null) {
    248248      String[] IORs = NzdlServiceFactory.getIORsfromFile(_filename);
    249       for (int i=0;( i<IORs.length && client == null );i++) {
     249      for (int i=0;(IORs != null && i<IORs.length && client == null );i++) {
    250250    client = attemptToInitialise(_args, _props,IORs[i]);
    251251      }
     
    253253   
    254254    // try the compiled-in URLs
    255     if (client == null) {
     255    if (client == null && urlsCompiledIn != null) {
    256256      for (int i=0;( i<urlsCompiledIn.length && client == null );i++) {
    257257    String[] IORs = NzdlServiceFactory.getIORsfromURL(urlsCompiledIn[i]);
    258     for (int j=0;( j<IORs.length && client == null );j++) {
     258    for (int j=0;(IORs != null && j<IORs.length && client == null );j++) {
    259259      client = attemptToInitialise(_args, _props,IORs[j]);
    260260    }
     
    412412      System.err.println("NzdlHosts::getIOR() unable to construct or read URL \"" +
    413413             str + "\", \"" + ior + "\": " + throwable);
    414       return null;
     414      return new String[0];
    415415    }
    416416  }
     
    457457      System.err.println("Error reading IOR file:\n" + e);
    458458    }
    459     return null;
    460   }   // end of getIorKey
     459    return new String[0];
     460  } 
    461461
    462462  /**
Note: See TracChangeset for help on using the changeset viewer.