Skip to content

Commit

Permalink
Fix BeansXmlValidator#loadXsds to operate on StreamSource types
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Aug 21, 2024
1 parent 4791fec commit 8a0be5b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions impl/src/main/java/org/jboss/weld/xml/BeansXmlValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.List;

import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
Expand Down Expand Up @@ -131,9 +130,9 @@ public void fatalError(SAXParseException e) throws SAXException {
}

private static StreamSource[] loadXsds(XmlSchema[] schemas) {
List<Source> xsds = new ArrayList<>();
List<StreamSource> xsds = new ArrayList<>();
for (XmlSchema schema : schemas) {
Source source = loadXsd(schema.getFileName(), schema.getClassLoader());
StreamSource source = loadXsd(schema.getFileName(), schema.getClassLoader());
if (source != null) {
xsds.add(source);
}
Expand Down

0 comments on commit 8a0be5b

Please sign in to comment.