Fix formatting
This commit is contained in:
parent
ce26d0532e
commit
658544fb38
|
@ -49,8 +49,8 @@ public final class ControllerFactory {
|
||||||
| InstantiationException
|
| InstantiationException
|
||||||
| IllegalAccessException
|
| IllegalAccessException
|
||||||
| InvocationTargetException e) {
|
| InvocationTargetException e) {
|
||||||
String exMsg = "The JFR controller could not find a supported JFR API"
|
String exMsg =
|
||||||
+ getFixProposalMessage();
|
"The JFR controller could not find a supported JFR API" + getFixProposalMessage();
|
||||||
throw new UnsupportedEnvironmentException(exMsg, e);
|
throw new UnsupportedEnvironmentException(exMsg, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,17 +20,17 @@ public class ControllerFactoryTest {
|
||||||
@Test
|
@Test
|
||||||
@EnabledOnJre({JAVA_8})
|
@EnabledOnJre({JAVA_8})
|
||||||
public void testCreateControllerJava8() {
|
public void testCreateControllerJava8() {
|
||||||
System.out.println("Java Version: " + System.getProperty("java.version") + " " + System.getProperty("java.vendor"));
|
UnsupportedEnvironmentException unsupportedEnvironmentException =
|
||||||
UnsupportedEnvironmentException unsupportedEnvironmentException = assertThrows(
|
assertThrows(
|
||||||
UnsupportedEnvironmentException.class,
|
UnsupportedEnvironmentException.class,
|
||||||
() -> {
|
() -> {
|
||||||
ControllerFactory.createController(config);
|
ControllerFactory.createController(config);
|
||||||
});
|
});
|
||||||
System.out.println(unsupportedEnvironmentException.getMessage());
|
String expected =
|
||||||
System.out.println(System.getProperty("java.vendor"));
|
"The JFR controller could not find a supported JFR API, use OpenJDK 11+ or Azul zulu version 1.8.0_212+";
|
||||||
String expected = "The JFR controller could not find a supported JFR API, use OpenJDK 11+ or Azul zulu version 1.8.0_212+";
|
|
||||||
if ("Azul Systems, Inc.".equals(System.getProperty("java.vendor"))) {
|
if ("Azul Systems, Inc.".equals(System.getProperty("java.vendor"))) {
|
||||||
expected = "The JFR controller could not find a supported JFR API, use Azul zulu version 1.8.0_212+";
|
expected =
|
||||||
|
"The JFR controller could not find a supported JFR API, use Azul zulu version 1.8.0_212+";
|
||||||
}
|
}
|
||||||
assertEquals(expected, unsupportedEnvironmentException.getMessage());
|
assertEquals(expected, unsupportedEnvironmentException.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue