First sonar issues review
[dmaap/messagerouter/dmaapclient.git] / src / main / java / org / onap / dmaap / mr / client / impl / MRClientVersionInfo.java
index ed23918..6a13910 100644 (file)
@@ -38,21 +38,15 @@ public class MRClientVersionInfo
 
        private static final Properties props = new Properties();
        private static final String version;
-       static
-       {
+       static {
                String use = null;
-               try
-               {
-                       final InputStream is = MRClientVersionInfo.class.getResourceAsStream ( "/MRClientVersion.properties" );
-                       if ( is != null )
-                       {
-                               props.load ( is );
+               try (InputStream is = MRClientVersionInfo.class.getResourceAsStream("/MRClientVersion.properties" )) {
+                       if (is != null) {
+                               props.load(is);
                                use = props.getProperty ( "MRClientVersion", null );
                        }
-               }
-               catch ( IOException e )
-               {
-                    logger.error("exception: ", e);
+               } catch ( IOException e ) {
+                       logger.error("exception: ", e);
                }
                version = use;
        }