hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
191 stars 98 forks source link

Fixed ClassCastException when loading configuration. #84

Closed kolkoo closed 9 years ago

kolkoo commented 9 years ago

Found a problem where Publish Delay is attempted to be parsed from a String but it is declared as a Long in the metatype/publisher.xml and we get an exception:

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String at com.eclipsesource.jaxrs.publisher.internal.Configuration.getPublishDelay(Configuration.java:78) at com.eclipsesource.jaxrs.publisher.internal.Configuration.updated(Configuration.java:46)

Signed-off-by: IVAN GEORGIEV ILIEV ivan.iliev@musala.com

hstaudacher commented 9 years ago

Thanks for the fix Ivan!

kolkoo commented 9 years ago

Anytime :)

kolkoo commented 9 years ago

One question- will you be able to update the 4.2 release with this fix included if it's not too much trouble?

hstaudacher commented 9 years ago

Actually it's a little trouble :). All maven artifacts need to be updated too and a new sync to maven central is required. Updating the existing 4.2 is not an option. The only option is to publish a 4.2.1.

But to be honest I'm not sure if one fix is worth a service release. What do you think? Is this a blocker for you?

kolkoo commented 9 years ago

Well this bug prevents us from changing any configuration properties as it happens before connector.updateConfiguration is called and our current implementation relies on being able to change root path from /services to /rest. So yes it is a blocker for me :) If we can't have a new release we'd have to go back to 4.1.1

hstaudacher commented 9 years ago

I see. Will try to create the service release this afternoon.

kolkoo commented 9 years ago

Thanks a lot!

hstaudacher commented 9 years ago

4.2.1 is released. In will take a few hours before it's visible in maven central. I only updated the publisher.

kolkoo commented 9 years ago

Thanks again for this.

hstaudacher commented 9 years ago

No problem. Just keep the pull requests coming ;)