DRILL-1881 - Test o.a.d.TestBugFixes#testVersionTable fails while building from sourc... 0.7.0 drill-0.7.0
authorAditya Kishore <adi@apache.org>
Wed, 17 Dec 2014 03:32:53 +0000 (19:32 -0800)
committerAditya Kishore <adi@apache.org>
Thu, 18 Dec 2014 00:47:45 +0000 (16:47 -0800)
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java

index ffc740a9337427e4f88bd95c94adbaccd6ffcf72..7deb14bf57eadb00f54e0e9a82b33b93870d3f5b 100644 (file)
@@ -37,9 +37,9 @@ public class VersionIterator implements Iterator<Object>{
     public String build_time = "";
 
     public VersionInfo(){
-      URL u = Resources.getResource("git.properties");
-      if(u != null){
-        try {
+      try {
+        URL u = Resources.getResource("git.properties");
+        if(u != null){
           Properties p = new Properties();
           p.load(Resources.newInputStreamSupplier(u).getInput());
           commit_id = p.getProperty("git.commit.id");
@@ -48,11 +48,10 @@ public class VersionIterator implements Iterator<Object>{
           build_time = p.getProperty("git.build.time");
           commit_message = p.getProperty("git.commit.message.short");
 
-        } catch (IOException e) {
-          logger.warn("Failure while trying to load \"git.properties\" file.", e);
         }
+      } catch (IOException | IllegalArgumentException e) {
+        logger.warn("Failure while trying to load \"git.properties\" file.", e);
       }
-
     }
   }
   @Override