greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 15775

Show
Ignore:
Timestamp:
2008-05-29 11:27:24 (6 months ago)
Author:
oranfry
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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            }