@Test(expected = SigningPolicyException.class) public void testFileFailure() throws Exception { SigningPolicyParser parser = new SigningPolicyParser(); parser.parse("Foo"); }
public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); FileReader fileReader = null; try { fileReader = new FileReader(fileName); return parse(fileReader); } catch (Exception e) { throw new SigningPolicyException(e); } finally { if (fileReader != null) { try { fileReader.close(); } catch (Exception exp) { logger.debug("Error closing file reader", exp); } } } }
SigningPolicyParser { public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); FileReader fileReader = null; try { fileReader = new FileReader(fileName); return parse(fileReader); } catch (Exception e) { throw new SigningPolicyException(e); } finally { if (fileReader != null) { try { fileReader.close(); } catch (Exception exp) { logger.debug("Error closing file reader", exp); } } } } }
SigningPolicyParser { public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); FileReader fileReader = null; try { fileReader = new FileReader(fileName); return parse(fileReader); } catch (Exception e) { throw new SigningPolicyException(e); } finally { if (fileReader != null) { try { fileReader.close(); } catch (Exception exp) { logger.debug("Error closing file reader", exp); } } } }  }
SigningPolicyParser { public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); FileReader fileReader = null; try { fileReader = new FileReader(fileName); return parse(fileReader); } catch (Exception e) { throw new SigningPolicyException(e); } finally { if (fileReader != null) { try { fileReader.close(); } catch (Exception exp) { logger.debug("Error closing file reader", exp); } } } }  Map<X500Principal, SigningPolicy> parse(String fileName); Map<X500Principal, SigningPolicy> parse(Reader reader); static Pattern getPattern(String patternStr); }
SigningPolicyParser { public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); FileReader fileReader = null; try { fileReader = new FileReader(fileName); return parse(fileReader); } catch (Exception e) { throw new SigningPolicyException(e); } finally { if (fileReader != null) { try { fileReader.close(); } catch (Exception exp) { logger.debug("Error closing file reader", exp); } } } }  Map<X500Principal, SigningPolicy> parse(String fileName); Map<X500Principal, SigningPolicy> parse(Reader reader); static Pattern getPattern(String patternStr); static final String ACCESS_ID_PREFIX; static final String ACCESS_ID_CA; static final String DEF_AUTH_X509; static final String DEF_AUTH_GLOBUS; static final String POS_RIGHTS; static final String NEG_RIGHTS; static final String CONDITION_PREFIX; static final String CONDITION_SUBJECT; static final String VALUE_CA_SIGN; static final String SINGLE_CHAR; static final String WILDCARD; static final String SINGLE_PATTERN; static final String WILDCARD_PATTERN; }