Fix issue with parsing JRE version string

See: https://github.com/spring-projects/sts4/issues/127
This commit is contained in:
Kris De Volder
2018-10-31 13:07:26 -07:00
parent 0c60c83b62
commit 74a85aca03
2 changed files with 51 additions and 14 deletions

View File

@@ -0,0 +1,27 @@
/*******************************************************************************
* Copyright (c) 2018 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.tooling.ls.eclipse.commons.test;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.springframework.tooling.ls.eclipse.commons.JRE;
public class JRETest {
@Test public void parseVersion() throws Exception {
assertEquals(1, JRE.parseVersion("1.8.123"));
assertEquals(9, JRE.parseVersion("9.0.123"));
assertEquals(10, JRE.parseVersion("10.0.123"));
assertEquals(11, JRE.parseVersion("11-ea"));
}
}