Skip to content

Commit

Permalink
try to fix issue in Diff
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/xmlbeans/trunk@1913147 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed Oct 20, 2023
1 parent 4e02e90 commit a62fd28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def testSchemas = [
[dir:'src/test/resources/xbean',path:'dom',name:'sDOM'],
[dir:'src/test/resources/xbean',path:'xmlcursor',name:'sXMLCURSOR'],
[dir:'src/test/resources/xbean',path:'scomp',name:'sSCOMP'],
[dir:'src/test/resources/xbean',path:'simple',name:'sSIMPLE'],
//[dir:'src/test/resources/xbean',path:'simple',name:'sSIMPLE'],
[dir:'src/test/resources/xbean',path:'ValidatingStream',name:'sVALIDATE'],
[dir:'src/test/resources/xbean',path:'usertype',name:'sUSERTYPE'],
[dir:'build/schemas/sTRANXML',path:'tranxml',name:'sTRANXML'],
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/org/apache/xmlbeans/impl/tool/Diff.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
Expand Down Expand Up @@ -252,8 +251,8 @@ private static boolean isDiffIndex() {
public static void filesAsXsb(File file1, File file2, List<XmlError> diffs) {
assert file1.exists() : "File \"" + file1.getAbsolutePath() + "\" does not exist.";
assert file2.exists() : "File \"" + file2.getAbsolutePath() + "\" does not exist.";
try (InputStream stream1 = Files.newInputStream(file1.toPath());
InputStream stream2 = Files.newInputStream(file2.toPath())) {
try (InputStream stream1 = new FileInputStream(file1);
InputStream stream2 = new FileInputStream(file2)) {
streamsAsXsb(stream1, file1.getName(), stream2, file2.getName(), diffs);
} catch (IOException ignored) {
}
Expand Down

0 comments on commit a62fd28

Please sign in to comment.