From 85aec417e584cdfc761357f6e15af4f80ade62ff Mon Sep 17 00:00:00 2001 From: prabathabey Date: Wed, 8 Jul 2015 23:23:45 +0530 Subject: [PATCH] Setting target version of maven compiler plugin to 1.7 --- .../extension/FaultMessageBodyWriter.java | 8 +------- pom.xml | 20 +++++++++---------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/components/oauth-extensions/dynamic-client-manager/src/main/java/org/wso2/carbon/identity/oauth/extension/FaultMessageBodyWriter.java b/components/oauth-extensions/dynamic-client-manager/src/main/java/org/wso2/carbon/identity/oauth/extension/FaultMessageBodyWriter.java index 6311b4c80d6..ff43d4aad9f 100644 --- a/components/oauth-extensions/dynamic-client-manager/src/main/java/org/wso2/carbon/identity/oauth/extension/FaultMessageBodyWriter.java +++ b/components/oauth-extensions/dynamic-client-manager/src/main/java/org/wso2/carbon/identity/oauth/extension/FaultMessageBodyWriter.java @@ -55,17 +55,11 @@ public class FaultMessageBodyWriter implements MessageBodyWriter public void writeTo(FaultResponse faultResponse, Class aClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap stringObjectMultivaluedMap, OutputStream outputStream) throws IOException, WebApplicationException { - OutputStreamWriter writer = null; - try { - writer = new OutputStreamWriter(outputStream, UTF_8); + try (OutputStreamWriter writer = new OutputStreamWriter(outputStream, UTF_8)) { JsonObject response = new JsonObject(); response.addProperty("error", faultResponse.getCode().getValue()); response.addProperty("error_description", faultResponse.getDescription()); getGson().toJson(response, type, writer); - } finally { - if (writer != null) { - writer.close(); - } } } diff --git a/pom.xml b/pom.xml index b4fc802f877..f31068a4572 100644 --- a/pom.xml +++ b/pom.xml @@ -945,16 +945,16 @@ - - - - - - - - - - + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.1 + + UTF-8 + 1.7 + 1.7 + + org.apache.maven.plugins maven-release-plugin