esa / CCSDS_MO_TRANS

REPOSITORY ARCHIVED - for the latest version please go to https://github.com/esa/mo-services-java
Other
3 stars 7 forks source link

getLocalName() shall return positive numbers only #3

Closed qa41yjus closed 8 years ago

qa41yjus commented 8 years ago

I would suggest to change the following line:

https://github.com/esa/CCSDS_MO_TRANS/blob/master/CCSDS_MAL_TRANSPORT_GEN/src/main/java/esa/mo/mal/transport/gen/GENTransport.java#L841

to this statement (in order to ensure a positive integer as random endpoint name, because otherwise you get problems with the URI schemes where the consumer's source or destination id starts with a minus):

localName = String.valueOf(RANDOM_NAME.nextInt(Integer.MAX_VALUE));

SamCooper commented 8 years ago

If it is an issue for a derived transport they should override and change the method.

qa41yjus commented 8 years ago

@SamCooper: According to the email exchange with CesarCoelho from 4th January, this issue shall be re-opened and limit the random endpoint generation to positive numbers only on the generic transport.