Browse Source

Use effectively final local variable in lambda expression

pull/1681/head
Sam Brannen 7 years ago
parent
commit
02fb5a4121
  1. 7
      spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java

7
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java

@ -579,9 +579,10 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi @@ -579,9 +579,10 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi
XMLReader xmlReader = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
for (int i = 0; i < resources.length; i++) {
Assert.notNull(resources[i], "Resource is null");
Assert.isTrue(resources[i].exists(), () -> "Resource " + resources[i] + " does not exist");
InputSource inputSource = SaxResourceUtils.createInputSource(resources[i]);
Resource currentResource = resources[i];
Assert.notNull(currentResource, "Resource is null");
Assert.isTrue(currentResource.exists(), () -> "Resource " + currentResource + " does not exist");
InputSource inputSource = SaxResourceUtils.createInputSource(currentResource);
schemaSources[i] = new SAXSource(xmlReader, inputSource);
}
SchemaFactory schemaFactory = SchemaFactory.newInstance(schemaLanguage);

Loading…
Cancel
Save