-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.14.1 and misc #612
2.14.1 and misc #612
Conversation
@@ -65,7 +65,7 @@ public static void main(String[] args) { | |||
* The conscrypt flag is provided for testing with the conscrypt jar. Using it through reflection is | |||
* deprecated but allows the library to ship without a dependency. Using conscrypt should only require the | |||
* jar plus the flag. For example, to run after building locally and using the test cert files: | |||
* java -cp ./build/libs/jnats-2.14.0-SNAPSHOT-examples.jar:./build/libs/jnats-2.14.0-SNAPSHOT-fat.jar:<path to conscrypt.jar> \ | |||
* java -cp ./build/libs/jnats-<version>-examples.jar:./build/libs/jnats-<version>-fat.jar:<path to conscrypt.jar> \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a placeholder here so we don't have to update this every version
@@ -142,7 +142,7 @@ private String getComparableVersion(String vString) { | |||
String[] v = vString.replaceAll("v", "").replaceAll("-", ".").split("\\Q.\\E"); | |||
int at = vString.indexOf("-"); | |||
return "" + (Integer.parseInt(v[0]) * 10000) + (Integer.parseInt(v[1]) * 100) + Integer.parseInt(v[2]) | |||
+ (at == -1 ? "" : vString.substring(at)); | |||
+ (at == -1 ? "~" : vString.substring(at)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tilde is the last ascii character so it this helps v0.0.0
sort "newer" than v.0.0.0-beta
return strEnumHash.get(value); | ||
if (File.policy.equalsIgnoreCase(value)) { return File; } | ||
if (Memory.policy.equalsIgnoreCase(value)) { return Memory; } | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Half the code, one less object. I would still use the other strategy on enums with more entries
@@ -64,7 +64,7 @@ public void testServerVersionComparisonsWork() { | |||
ServerInfo info235Beta2 = new ServerInfo(json.replace("1.2.3", "2.3.5-beta.2")); | |||
assertTrue(info.isOlderThanVersion("2.3.4")); | |||
assertTrue(info234.isOlderThanVersion("2.3.5")); | |||
assertTrue(info235.isOlderThanVersion("2.3.5-beta.2")); | |||
assertTrue(info235.isNewerVersionThan("2.3.5-beta.2")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just b/c the test passes, doesn't mean it's right :)
@@ -9,7 +9,7 @@ | |||
"max_bytes": 732, | |||
"max_age": 43000000000, | |||
"max_msg_size": 734, | |||
"storage": "memory", | |||
"storage": "MeMoRy", "storageComment": "funny case used to test getting StorageType enum", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json doesn't have comments, so just add a field that is ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
All other files are a version change