String fieldName = JavaUtils.isJavaKeyword(name) ? JavaUtils.makeNonJavaKeyword(name) : name;
instance = new CXFAuthenticator(); Authenticator wrapped = null; if (JavaUtils.isJava9Compatible()) { try { Method m = ReflectionUtil.getMethod(Authenticator.class, "getDefault"); .getResourceAsStream("ReferencingAuthenticator.class"); byte[] b = IOUtils.readBytesFromStream(ins); if (JavaUtils.isJava9Compatible()) { Class<?> methodHandles = Class.forName("java.lang.invoke.MethodHandles"); Method m = ReflectionUtil.getMethod(methodHandles, "lookup");
public String getParaName() { if (JavaUtils.isJavaKeyword(name)) { return "_" + name; } return name; }
public void execute() throws MojoExecutionException { boolean requiresModules = JavaUtils.isJava9Compatible(); if (requiresModules) { boolean skipXmlWsModule = JavaUtils.isJava11Compatible(); // additionalJvmArgs = "--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED " + "--add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED "
@org.junit.Test public void testAESIncludedTLSv13() throws Exception { // Doesn't work with IBM JDK if ("IBM Corporation".equals(System.getProperty("java.vendor"))) { return; } Assume.assumeTrue(JavaUtils.isJava11Compatible()); SpringBusFactory bf = new SpringBusFactory(); URL busFile = CipherSuitesTest.class.getResource("ciphersuites-client-tlsv13.xml"); Bus bus = bf.createBus(busFile.toString()); BusFactory.setDefaultBus(bus); BusFactory.setThreadDefaultBus(bus); URL url = SOAPService.WSDL_LOCATION; SOAPService service = new SOAPService(url, SOAPService.SERVICE); assertNotNull("Service is null", service); final Greeter port = service.getHttpsPort(); assertNotNull("Port is null", port); updateAddressPort(port, PORT); assertEquals(port.greetMe("Kitty"), "Hello Kitty"); ((java.io.Closeable)port).close(); bus.shutdown(true); }
} else { if (blockSize == -1) { if (JavaUtils.isJava8Before161()) { blockSize = secretKey instanceof PublicKey ? 117 : 128; } else {
/** * Checks if the specified word is a Java keyword (as defined in JavaUtils). * * @param word the word to check. * @return true if the word is a keyword. * @see org.apache.cxf.helpers.JavaUtils */ protected static boolean isJavaKeyword(String word) { return JavaUtils.isJavaKeyword(word); }
public void execute() throws MojoExecutionException { boolean requiresModules = JavaUtils.isJava9Compatible(); if (requiresModules) { boolean skipXmlWsModule = JavaUtils.isJava11Compatible(); // additionalJvmArgs = "--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED " + "--add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED "
@org.junit.Test public void testBouncyCastleProvider() throws Exception { Assume.assumeFalse(JavaUtils.isJava11Compatible()); try { Security.addProvider(new BouncyCastleProvider());
} else { if (blockSize == -1) { if (JavaUtils.isJava8Before161()) { blockSize = secretKey instanceof PublicKey ? 117 : 128; } else {
if (JavaUtils.isJavaKeyword(word)) { word = JavaUtils.makeNonJavaKeyword(word);
/** * Checks if the specified word is a Java keyword (as defined in JavaUtils). * * @param word the word to check. * @return true if the word is a keyword. * @see org.apache.cxf.helpers.JavaUtils */ protected static boolean isJavaKeyword(String word) { return JavaUtils.isJavaKeyword(word); }
@Before public void setUp() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } }
return; Assume.assumeTrue(JavaUtils.isJava11Compatible());
if (JavaUtils.isJavaKeyword(word)) { word = JavaUtils.makeNonJavaKeyword(word);
public String getParaName() { if (JavaUtils.isJavaKeyword(name)) { return "_" + name; } return name; }
@Before public void setUp() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } }
if (JavaUtils.isJavaKeyword(word)) { word = JavaUtils.makeNonJavaKeyword(word);
/** * Checks if the specified word is a Java keyword (as defined in JavaUtils). * * @param word the word to check. * @return true if the word is a keyword. * @see org.apache.cxf.helpers.JavaUtils */ protected static boolean isJavaKeyword(String word) { return JavaUtils.isJavaKeyword(word); }
protected boolean compileJavaSrc(String classPath, List<File> srcList, String dest) { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } org.apache.cxf.common.util.Compiler javaCompiler = new org.apache.cxf.common.util.Compiler(); javaCompiler.setClassPath(classPath); javaCompiler.setOutputDir(dest); if (JavaUtils.isJava9Compatible()) { javaCompiler.setTarget("9"); } else { javaCompiler.setTarget("1.8"); } return javaCompiler.compileFiles(srcList); }