Changeset 15775 for gli


Ignore:
Timestamp:
2008-05-29T11:27:24+12:00 (16 years ago)
Author:
oranfry
Message:

the String.contains() method does not exist in java 1.4, using indexOf()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java

    r15164 r15775  
    152152    {
    153153    String result = performAction(new RemoteGreenstoneServerExistsAction(collection_name, collection_file));
    154     if(result.contains("exists")) {
     154    if(result.indexOf("exists") != -1) {
    155155        return true;
    156156    }
    157     else if(result.contains("does not exist")) {
     157    else if(result.indexOf("does not exist") != -1) {
    158158        return false;
    159159    }
     
    10621062        else if (command_output.startsWith("ERROR: ")) {
    10631063        throw new Exception(command_output.substring("ERROR: ".length()));
    1064         } else if (command_output.contains("ERROR: ")) { // check if ERROR occurs anywhere else in the output
     1064        } else if (command_output.indexOf("ERROR: ") != -1) { // check if ERROR occurs anywhere else in the output
    10651065        throw new Exception(command_output);
    10661066        }
Note: See TracChangeset for help on using the changeset viewer.