Skip to content

Commit 4a20e44

Browse files
committed
remove unused toVersionArray function and associated tests
Signed-off-by: kelaompachai <141376761+kelaompachai@users.noreply.github.com>
1 parent f560570 commit 4a20e44

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

server/src/com/mirth/connect/client/core/ConnectServiceUtil.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,6 @@ protected static Charset getCharset(HttpEntity responseEntity) {
207207
return charset;
208208
}
209209

210-
/**
211-
* Split a given version string into an int[].
212-
*
213-
* @param version
214-
* @return
215-
*/
216-
protected static int[] toVersionArray(String version) {
217-
return Arrays.stream(version.split("[\\.]")).mapToInt(Integer::parseInt).toArray();
218-
}
219-
220210
/**
221211
* Compare the current version with another. If current is less than other, return true. All others,
222212
* including a malformed other, returns false.

server/test/com/mirth/connect/client/core/ConnectServiceUtilTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.mirth.connect.client.core;
22

3-
import static org.junit.Assert.assertArrayEquals;
43
import static org.junit.Assert.assertEquals;
54
import static org.junit.Assert.assertFalse;
65
import static org.junit.Assert.assertNotNull;
@@ -86,20 +85,6 @@ public void test_getCharsetWhenSet() throws Exception {
8685
assertEquals(expectedCharset, charset.name());
8786
}
8887

89-
@Test
90-
public void test_toVersionThreeDigits() throws Exception {
91-
int[] expected = { 4, 1, 5};
92-
int[] parsedVersion = ConnectServiceUtil.toVersionArray("4.1.5");
93-
assertArrayEquals(expected, parsedVersion);
94-
}
95-
96-
@Test
97-
public void test_toVersionFourDigits() throws Exception {
98-
int[] expected = { 3, 12, 0, 4};
99-
int[] parsedVersion = ConnectServiceUtil.toVersionArray("3.12.0.4");
100-
assertArrayEquals(expected, parsedVersion);
101-
}
102-
10388
@Test
10489
public void test_currentIsOlderMajorVersion() throws Exception {
10590
Version current = Version.parse("3.12.0");

0 commit comments

Comments
 (0)