mike-jumper commented on issue #348: GUACAMOLE-422: Forward Timezone to RDP and SSH Connections URL: https://github.com/apache/guacamole-client/pull/348#issuecomment-495396814 Is there a need to do that kind of search? I was thinking it would be sufficient to parse the value as a new instance of the class, compare to the highest supported version, and choose whichever is less. On Thu, May 23, 2019, 13:18 Virtually Nick <[email protected]> wrote: > *@necouchman* commented on this pull request. > ------------------------------ > > In > guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleProtocolVersion.java > <https://github.com/apache/guacamole-client/pull/348#discussion_r287117504> > : > > > + * Parse the String format of the version provided and return the > + * the enum value matching that version. If no value is provided, return > + * null. > + * > + * @param version > + * The String format of the version to parse. > + * > + * @return > + * The enum value that matches the specified version. > + */ > + public static GuacamoleProtocolVersion getVersion(String version) { > + > + if (version == null || version.isEmpty()) > + return null; > + > + return valueOf(version); > > So, I've got this implemented to the point where I can parse the provided > string for a major, minor, and patch version component, but I'm having > trouble coming up with an algorithm that finds the nearest (equal to or > less than provided) version... > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/apache/guacamole-client/pull/348?email_source=notifications&email_token=ABDLCSOU6CW2Z65RR245JVDPW33ZLA5CNFSM4GMCXWB2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZR6UQQ#discussion_r287117504>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ABDLCSN3EMHVMNCNEIMKCGLPW33ZLANCNFSM4GMCXWBQ> > . >
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
