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

Random endpoint names are often generated from a negative integer #42

Open dmarszk opened 6 years ago

dmarszk commented 6 years ago

Minus sign in an URI is often confusing. For example: rmi://192.168.1.1:1025/1025-Ground_MO_Adapter-Action_-1950501845

A fix would narrow down a range of random values to positive integers, in this piece of code: https://github.com/esa/CCSDS_MO_TRANS/blob/master/CCSDS_MAL_TRANSPORT_GEN/src/main/java/esa/mo/mal/transport/gen/GENTransport.java#L97

CesarCoelho commented 4 years ago

I would actually remove that Random class and use the current time ( with System.currentTimeMillis() ) directly here: https://github.com/esa/CCSDS_MO_TRANS/blob/master/CCSDS_MAL_TRANSPORT_GEN/src/main/java/esa/mo/mal/transport/gen/GENTransport.java#L870

Would be a cleaner solution!

CesarCoelho commented 3 years ago

Copied to the new repo! https://github.com/esa/mo-services-java/issues/2