private List < JqassistantRules > readXmlSource ( RuleSource ruleSource ) { List < JqassistantRules > rules = new ArrayList <> ( ) ; try ( InputStream inputStream = ruleSource . getInputStream ( ) ) { JqassistantRules jqassistantRules = jaxbUnmarshaller . unmarshal ( inputStream ) ; rules . add ( jqassistantRules ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( "Cannot read rules from '" + ruleSource . getId ( ) + "'." , e ) ; } return rules ; }
Read rules from XML documents .