Repository: drill
Updated Branches:
  refs/heads/0.7.0 c7b6cc575 -> e3ab2c176


DRILL-1881 - Test o.a.d.TestBugFixes#testVersionTable fails while building from 
source tarball


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e3ab2c17
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e3ab2c17
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e3ab2c17

Branch: refs/heads/0.7.0
Commit: e3ab2c1760ad34bda80141e2c3108f7eda7c9104
Parents: 9360e25
Author: Aditya Kishore <a...@apache.org>
Authored: Tue Dec 16 19:32:53 2014 -0800
Committer: Aditya Kishore <a...@apache.org>
Committed: Wed Dec 17 16:47:45 2014 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/store/sys/VersionIterator.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/e3ab2c17/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
index ffc740a..7deb14b 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
@@ -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

Reply via email to