> + }
> +
> + @Override
> + public boolean equals(Object obj) {
> + if (this == obj) return true;
> + if (obj == null || getClass() != obj.getClass()) return false;
> + Router that = Router.class.cast(obj);
> + return super.equals(obj)
> + && Objects.equal(this.adminStateUp, that.adminStateUp)
> + && Objects.equal(this.state, that.state)
> + && Objects.equal(this.externalGatewayInfo,
> that.externalGatewayInfo);
> + }
> +
> + protected Objects.ToStringHelper string() {
> + return super.string()
> + .add("adminStateUp", adminStateUp).add("state",
> state).add("externalGatewayInfo", externalGatewayInfo != null ?
> externalGatewayInfo.toString() : "");
You should be able to use
[`omitNullValues`](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Objects.ToStringHelper.html#omitNullValues\(\))
to handle the null case. And I take it adminStateUp and state _can_ be null?
Or not?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/47/files#r9439787