opentracing-contrib / java-spring-web

OpenTracing Spring Web instrumentation
Apache License 2.0
108 stars 59 forks source link

Fix to correctly use a List<> with Spring @Properties #64

Closed ledor473 closed 6 years ago

ledor473 commented 6 years ago

@pavolloffay I was wondering why you had to change the application-test.yml in https://github.com/opentracing-contrib/java-spring-web/pull/63 to make it work.

I guess it's because it was throwing a java.lang.UnsupportedOperationException when starting the context?

The problem was that when an List is already initialized in the Properties object, Spring add the items to it instead of replacing it by a new List. But the issue was that I used Arrays.asList() which returns a fixed-size list

pavolloffay commented 6 years ago

@ledor473 thanks