eclipse-uprotocol / up-java

uProtocol Language Specific Library for Java
Apache License 2.0
9 stars 14 forks source link

UriValidator isRpcMethod() and isRpcResponse(): should check for equality instead of .contains() #86

Closed AnotherDaniel closed 7 months ago

AnotherDaniel commented 8 months ago

According to the spec, UriValidator methods isRpcMethod() and isRpcResponse() should check for equality of resource name and instance (should be 'rpc' and 'response', respectively). The up-java implementation uses .contains() for this check, which is not quite up to spec.

stevenhartley commented 8 months ago

Folks, feel free to question the spec if you disagree with any of it...

AnotherDaniel commented 8 months ago

Wouldn't say this is about the spec, more about the java implementation? Like - do we want these methods to return true for method uris with name "warpcount" or instance names like "sensoresponset"?

In up-rust, we decided to do a strict equals-check, which is why I brought this up here to potentially get things consistent...

stevenhartley commented 8 months ago

Fair enough. It should be "rpc." in the name so if Java is not looking for this then it is a bug for me to fix :-).

stevenhartley commented 7 months ago

merged

PLeVasseur commented 7 months ago

@AnotherDaniel giving notice to other implementations. We love to see it. :rocket: :rocket: :rocket: :rocket: