Skip to content

Commit

Permalink
Generate's operation message_protocols fails for older semantics libs (
Browse files Browse the repository at this point in the history
…#216)

* Generate's operation message_protocols fails for older semantics libs

---------

Co-authored-by: Vishnu Alapati <[email protected]>
  • Loading branch information
vishnu-alapati and Vishnu Alapati authored Oct 18, 2023
1 parent 5dd9650 commit f298869
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.1.11
- Made changes to /message_protocols end-point to work for old REMRem-Semantics library.

## 2.1.10
- Mockito framework upgraded to 5.3.1

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<properties>
<eiffel-remrem-generate.version>2.1.10</eiffel-remrem-generate.version>
<eiffel-remrem-generate.version>2.1.11</eiffel-remrem-generate.version>
<eiffel-remrem-semantics.version>2.2.6</eiffel-remrem-semantics.version>
</properties>
<artifactId>eiffel-remrem-generate</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ public JsonElement getMessageProtocols() {
for (MsgService service : msgServices) {
JsonObject protocolObject = new JsonObject();
protocolObject.addProperty("name", service.getServiceName());
protocolObject.addProperty("edition", service.getProtocolEdition());
try {
protocolObject.addProperty("edition", service.getProtocolEdition());
} catch (NoSuchMethodError | AbstractMethodError e) {
// Ignored intentionally in order to ensure compatibility with
// eiffel-remrem-semantics:2.2.0 and older.
log.error("An old library, without implementation of MsgService.getProtocolEdition() is used. Please, upgrade to a newer library implementing eiffel-remrem-protocol-interface:2.1.2 or higher.");
}
array.add(protocolObject);
}
return array;
Expand Down

0 comments on commit f298869

Please sign in to comment.