int colonPos = replica.indexOf( atPos,  ':' );
int colonPos = replica.indexOf( ':', atPos );
    public Replica( String replica )    {        if ( StringTools.isEmpty( replica ) )        {            log.error( "Null or empty replica are not allowed" );            throw new IllegalArgumentException( "Null or empty Replica " );        }                replica = replica.trim();                int atPos = replica.indexOf( '@' );                if ( atPos <= 0 )        {            log.error( "The ReplicaId '@' element is missing in {}", replica );            throw new IllegalArgumentException( "Replica ID not found: " + replica );        }                int colonPos = replica.indexOf( atPos,  ':' );                if ( colonPos < 0 )        {            log.error( "Replica port not found in {}", replica );            throw new IllegalArgumentException( "Port number not found in replica : " + replica );        }                id = new ReplicaId( replica.substring( 0, atPos ) );        String server = replica.substring( atPos + 1, colonPos );        int port = -1;                try        {            port = Integer.parseInt( replica.substring( colonPos + 1 ) ) ;        }        catch ( NumberFormatException nfe )        {            log.error( "The port value should be a value between 1 and 65535, port  : {}", new Integer( port ) );            throw new IllegalArgumentException( "Bad port number : " + port );        }                try        {            address = new InetSocketAddress( server, port );        }        catch ( IllegalArgumentException iae )        {            log.error(  "The server address/name is invalid ({}) in replica {}", server, replica );            throw new IllegalArgumentException( "The server address/name is invalid in replica " + replica                 + ", error : " + iae.getMessage() );        }                if ( IS_DEBUG )        {            log.debug( "Created a replica {} on server {}", id, server + ':' + port );        }    }