spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

Upgrading from consul 1.9 to 1.10 cause NullPointer in service discovery #759

Closed tomas-forsman closed 1 year ago

tomas-forsman commented 2 years ago

Describe the bug Service registered to consul without port has port '0' when using consul 1.9 but with consul 1.10 it comes at 'null'. This cause a NullPointerException in ConsulServiceInstance due to integer autoboxing. spring-cloud-consul-discovery 3.0.4

tomas-forsman commented 2 years ago

PR https://github.com/spring-cloud/spring-cloud-consul/pull/760

tomas-forsman commented 2 years ago

No comment? :-)

WiktorS commented 2 years ago

I also met this problem and can confirm it exist. The fix in the PR is similar to the one I made. LGTM