private static InputStream getStream(String path) { try { return new FileInputStream(path); } catch (Exception e) { fail("File not found: " + path); return null; } }
private static InputStream getStream(String path) { try { return new FileInputStream(path); } catch (Exception e) { fail("File not found: " + path); return null; } }
private static void fail(Exception e) { e.printStackTrace(); fail(e.getClass().getName() + ": See above for detail"); } /**
private static void fail(Exception e) { e.printStackTrace(); fail(e.getClass().getName() + ": See above for detail"); } /**
fail("One argument required: /path/to/xacml-policy-to-validate.xml"); fail("System property " + schemaPathProperty + " (path to XACML " + "schema) must be set. (e.g. -D" + schemaPathProperty + "=/path/to/schema)"); } catch (ValidationException e) { if (e.getCause() != null && e.getCause() instanceof SAXParseException) { fail(e.getCause().getMessage()); } else { fail(e); fail(e);
fail("One argument required: /path/to/xacml-policy-to-validate.xml"); fail("System property " + schemaPathProperty + " (path to XACML " + "schema) must be set. (e.g. -D" + schemaPathProperty + "=/path/to/schema)"); } catch (ValidationException e) { if (e.getCause() != null && e.getCause() instanceof SAXParseException) { fail(e.getCause().getMessage()); } else { fail(e); fail(e);