How can I use the following code in grails -
TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() { return null; } public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { return; } public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { return; } } };
The above code works fine when I run the same code in a JAVA project, but Grails does not compile the code and does not give an error - There is no expression to call the array constructor on the first line.
source share