1 7 8 package com.sun.corba.se.impl.orbutil ; 9 10 32 33 public class GetPropertyAction implements java.security.PrivilegedAction { 34 private String theProp; 35 private String defaultVal; 36 37 43 public GetPropertyAction(String theProp) { 44 this.theProp = theProp; 45 } 46 47 54 public GetPropertyAction(String theProp, String defaultVal) { 55 this.theProp = theProp; 56 this.defaultVal = defaultVal; 57 } 58 59 66 public Object run() { 67 String value = System.getProperty(theProp); 68 return (value == null) ? defaultVal : value; 69 } 70 } 71 | Popular Tags |