소스 검색

HADOOP-3259. Makes failure to read system properties due to a
security manager non-fatal. Contributed by Edward Yoon.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@659154 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 17 년 전
부모
커밋
200f8f3064
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      CHANGES.txt
  2. 6 1
      src/java/org/apache/hadoop/conf/Configuration.java

+ 3 - 0
CHANGES.txt

@@ -327,6 +327,9 @@ Trunk (unreleased changes)
     checking results to make the test more reliable. (Lohit Vijaya
     Renu via omalley)
 
+    HADOOP-3259. Makes failure to read system properties due to a
+    security manager non-fatal. (Edward Yoon via omalley)
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

+ 6 - 1
src/java/org/apache/hadoop/conf/Configuration.java

@@ -244,7 +244,12 @@ public class Configuration implements Iterable<Map.Entry<String,String>> {
       }
       String var = match.group();
       var = var.substring(2, var.length()-1); // remove ${ .. }
-      String val = System.getProperty(var);
+      String val = null;
+      try {
+        val = System.getProperty(var);
+      } catch(SecurityException se) {
+        LOG.warn("Unexpected SecurityException in Configuration", se);
+      }
       if (val == null) {
         val = getRaw(var);
       }