private String primaryStateToString() { return primaryStateToString(this.primaryState); }
private String primaryStateToString() { return primaryStateToString(this.primaryState); }
@Override public String toString() { //String identity = super.toString(); //String identity = "BucketAdvisor " + getAdvisee().getFullPath() + // ":" + getAdvisee().getSerialNumber(); //identity = identity.substring(identity.lastIndexOf(".")+1); //final StringBuffer sb = new StringBuffer("[" + identity + ": "); final StringBuilder sb = new StringBuilder("[BucketAdvisor ") .append(getAdvisee().getFullPath()).append(':') .append(getAdvisee().getSerialNumber()).append(": "); sb.append("state=").append(primaryStateToString()); sb.append("]"); return sb.toString(); }
@Override public String toString() { //String identity = super.toString(); //String identity = "BucketAdvisor " + getAdvisee().getFullPath() + // ":" + getAdvisee().getSerialNumber(); //identity = identity.substring(identity.lastIndexOf(".")+1); //final StringBuffer sb = new StringBuffer("[" + identity + ": "); final StringBuilder sb = new StringBuilder("[BucketAdvisor ") .append(getAdvisee().getFullPath()).append(':') .append(getAdvisee().getSerialNumber()).append(": "); sb.append("state=").append(primaryStateToString()); sb.append("]"); return sb.toString(); }
break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); default: throw new IllegalStateException( "Cannot change from " + this.primaryStateToString() + " to " + this.primaryStateToString(requestedState)); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1_FOR_BUCKET_2.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState), getAdvisee().getName()}));
break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); break; default: throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState)})); default: throw new IllegalStateException( "Cannot change from " + this.primaryStateToString() + " to " + this.primaryStateToString(requestedState)); throw new IllegalStateException(LocalizedStrings.BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1_FOR_BUCKET_2.toLocalizedString(new Object[] {this.primaryStateToString(), this.primaryStateToString(requestedState), getAdvisee().getName()}));