1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

update error parser junits to read a set of files with output to feed parser

current and only file contains build output which causes to error parser to hang
This commit is contained in:
David Inglis 2006-03-31 20:14:02 +00:00
parent 67a47ed1f9
commit 2ff46eeeab
6 changed files with 662 additions and 161 deletions

View file

@ -10,14 +10,12 @@
############################################################################### ###############################################################################
bin.includes = plugin.xml,\ bin.includes = plugin.xml,\
about.html,\ about.html,\
plugin.properties,\
cdtcoretests.jar,\ cdtcoretests.jar,\
test.xml,\ test.xml,\
resources/,\ resources/,\
META-INF/ META-INF/
src.includes = plugin.properties
output.cdtcoretests.jar = bin/ output.cdtcoretests.jar = bin/
about.html =
source.cdtcoretests.jar = failures/,\ source.cdtcoretests.jar = failures/,\
model/,\ model/,\
parser/,\ parser/,\

View file

@ -0,0 +1,19 @@
package org.eclipse.cdt.core.internal.errorparsers.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
public class ErrorParserTests {
public static Test suite() {
TestSuite suite = new TestSuite(ErrorParserTests.class.getName());
// Just add more test cases here as you create them for
// each class being tested
suite.addTest(GCCErrorParserTests.suite());
suite.addTest(FileBasedErrorParserTests.suite());
return suite;
}
}

View file

@ -0,0 +1,43 @@
package org.eclipse.cdt.core.internal.errorparsers.tests;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.testplugin.CTestPlugin;
import org.eclipse.core.runtime.Path;
public class FileBasedErrorParserTests extends GenericErrorParserTests {
File errorFile;
public FileBasedErrorParserTests(File file) {
super("testErrorsInFiles");
errorFile = file;
}
public String getName() {
return super.getName() + " " + errorFile.getName();
}
public void testErrorsInFiles() throws IOException {
InputStream stream = new FileInputStream(errorFile);
runParserTest(stream, -1, -1, null, null, new String[]{GCC_ERROR_PARSER_ID});
stream.close();
}
public static Test suite() {
TestSuite suite = new TestSuite(FileBasedErrorParserTests.class.getName());
File dir = CTestPlugin.getDefault().getFileInPlugin(new Path("resources/errortests/"));
File[] testsfiles = dir.listFiles();
for (int i = 0; i < testsfiles.length; i++) {
suite.addTest(new FileBasedErrorParserTests(testsfiles[i]));
}
return suite;
}
}

View file

@ -10,157 +10,86 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.internal.errorparsers.tests; package org.eclipse.cdt.core.internal.errorparsers.tests;
import java.io.StringBufferInputStream;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.eclipse.cdt.core.ErrorParserManager;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
/** /**
* This test is designed to exercise the error parser capabilities. * This test is designed to exercise the error parser capabilities.
*/ */
public class GCCErrorParserTests extends GenericErrorParserTests { public class GCCErrorParserTests extends GenericErrorParserTests {
public static final String GCC_ERROR_PARSER_ID = "org.eclipse.cdt.core.GCCErrorParser";
public static final String [] GCC_ERROR_STREAM1 = { public static final String[] GCC_ERROR_STREAM1 = {
"qcc -c -I/qnx630/target/qnx6/usr/include -I/qnx630/target/qnx6/usr/include/photon -V3.3.1,gcc_ntox86 -w5 -O2 -I. ../abmain.c abmain.o", "qcc -c -I/qnx630/target/qnx6/usr/include -I/qnx630/target/qnx6/usr/include/photon -V3.3.1,gcc_ntox86 -w5 -O2 -I. ../abmain.c abmain.o",
"In file included from ../globals.h:9,", "In file included from ../globals.h:9,", " from ../abmain.c:36:",
" from ../abmain.c:36:", "../_combolist.h:34:24: warning: no newline at end of file",};
"../_combolist.h:34:24: warning: no newline at end of file",
};
public static final int GCC_ERROR_STREAM1_WARNINGS = 1; public static final int GCC_ERROR_STREAM1_WARNINGS = 1;
public static final int GCC_ERROR_STREAM1_ERRORS = 0; public static final int GCC_ERROR_STREAM1_ERRORS = 0;
public static final String [] GCC_ERROR_STREAM1_FILENAMES = { "_combolist.h" }; public static final String[] GCC_ERROR_STREAM1_FILENAMES = {"_combolist.h"};
public static final String [] GCC_ERROR_STREAM2 = { public static final String[] GCC_ERROR_STREAM2 = {"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: `",
"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: `", " RPNEvaluator<NumericType>::OperandConstant' is implicitly a typename",
" RPNEvaluator<NumericType>::OperandConstant' is implicitly a typename", "C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: implicit typename",
"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: implicit typename", " is deprecated, please see the documentation for details"};
" is deprecated, please see the documentation for details"
};
public static final int GCC_ERROR_STREAM2_WARNINGS = 2; public static final int GCC_ERROR_STREAM2_WARNINGS = 2;
public static final int GCC_ERROR_STREAM2_ERRORS = 0; public static final int GCC_ERROR_STREAM2_ERRORS = 0;
public static final String [] GCC_ERROR_STREAM2_FILENAMES = { "RPNEvaluator.hpp" }; public static final String[] GCC_ERROR_STREAM2_FILENAMES = {"RPNEvaluator.hpp"};
public static final String [] GCC_ERROR_STREAM2_DESCRIPTIONS = { "please see the documentation" }; public static final String[] GCC_ERROR_STREAM2_DESCRIPTIONS = {"please see the documentation"};
public static final String [] GCC_ERROR_STREAM3 = { public static final String[] GCC_ERROR_STREAM3 = {
"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `", "C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `",
" char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ", " char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ",
" though the worst conversion for the former is better than the worst ", " though the worst conversion for the former is better than the worst ", " conversion for the latter"};
" conversion for the latter"
};
public static final int GCC_ERROR_STREAM3_WARNINGS = 0; public static final int GCC_ERROR_STREAM3_WARNINGS = 0;
public static final int GCC_ERROR_STREAM3_ERRORS = 1; public static final int GCC_ERROR_STREAM3_ERRORS = 1;
public static final String [] GCC_ERROR_STREAM3_FILENAMES = { "RPNEvaluator.hpp" }; public static final String[] GCC_ERROR_STREAM3_FILENAMES = {"RPNEvaluator.hpp"};
public static final String [] GCC_ERROR_STREAM3_DESCRIPTIONS = { "ISO C++", "are ambiguous", "worst conversion", "conversion for the latter" }; public static final String[] GCC_ERROR_STREAM3_DESCRIPTIONS = {"ISO C++", "are ambiguous", "worst conversion",
"conversion for the latter"};
public static final String [] GCC_ERROR_STREAM4 = { public static final String[] GCC_ERROR_STREAM4 = {"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp: In member function `",
"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp: In member function `", " NumericType RPNEvaluator<NumericType>::evaluate(const char*) [with ", " NumericType = int8]':",
" NumericType RPNEvaluator<NumericType>::evaluate(const char*) [with ", "C:/QNX630/workspace/System/src/CommonScriptClasses.cpp:609: instantiated from here",
" NumericType = int8]':", "C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `",
"C:/QNX630/workspace/System/src/CommonScriptClasses.cpp:609: instantiated from here", " char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ",
"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `", " though the worst conversion for the former is better than the worst ", " conversion for the latter"};
" char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ",
" though the worst conversion for the former is better than the worst ",
" conversion for the latter"
};
public static final int GCC_ERROR_STREAM4_WARNINGS = 0; public static final int GCC_ERROR_STREAM4_WARNINGS = 0;
public static final int GCC_ERROR_STREAM4_ERRORS = 1; public static final int GCC_ERROR_STREAM4_ERRORS = 1;
public static final String [] GCC_ERROR_STREAM4_FILENAMES = { "RPNEvaluator.hpp" }; public static final String[] GCC_ERROR_STREAM4_FILENAMES = {"RPNEvaluator.hpp"};
public static final String [] GCC_ERROR_STREAM4_DESCRIPTIONS = { "ISO C++", "are ambiguous", "worst conversion for", "conversion for the latter" }; public static final String[] GCC_ERROR_STREAM4_DESCRIPTIONS = {"ISO C++", "are ambiguous", "worst conversion for",
"conversion for the latter"};
/** /**
* Constructor for IndexManagerTest. * Constructor for IndexManagerTest.
*
* @param name * @param name
*/ */
public GCCErrorParserTests(String name) { public GCCErrorParserTests() {
super(name); super();
} }
public static Test suite() { public static Test suite() {
TestSuite suite = new TestSuite(GCCErrorParserTests.class); TestSuite suite = new TestSuite(GCCErrorParserTests.class);
return suite; return suite;
} }
public void testMultipleIncludesError() { public void testMultipleIncludesError() {
runParserTest(GCC_ERROR_STREAM1, runParserTest(GCC_ERROR_STREAM1, GCC_ERROR_STREAM1_ERRORS, GCC_ERROR_STREAM1_WARNINGS, GCC_ERROR_STREAM1_FILENAMES, null,
GCC_ERROR_STREAM1_ERRORS, new String[]{GCC_ERROR_PARSER_ID});
GCC_ERROR_STREAM1_WARNINGS,
GCC_ERROR_STREAM1_FILENAMES,
null);
} }
public void testMultiLineDescriptionError() { public void testMultiLineDescriptionError() {
runParserTest(GCC_ERROR_STREAM2, runParserTest(GCC_ERROR_STREAM2, GCC_ERROR_STREAM2_ERRORS, GCC_ERROR_STREAM2_WARNINGS, GCC_ERROR_STREAM2_FILENAMES,
GCC_ERROR_STREAM2_ERRORS, GCC_ERROR_STREAM2_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
GCC_ERROR_STREAM2_WARNINGS,
GCC_ERROR_STREAM2_FILENAMES,
GCC_ERROR_STREAM2_DESCRIPTIONS);
} }
public void testLongMultiLineDescriptionError() { public void testLongMultiLineDescriptionError() {
runParserTest(GCC_ERROR_STREAM3, runParserTest(GCC_ERROR_STREAM3, GCC_ERROR_STREAM3_ERRORS, GCC_ERROR_STREAM3_WARNINGS, GCC_ERROR_STREAM3_FILENAMES,
GCC_ERROR_STREAM3_ERRORS, GCC_ERROR_STREAM3_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
GCC_ERROR_STREAM3_WARNINGS,
GCC_ERROR_STREAM3_FILENAMES,
GCC_ERROR_STREAM3_DESCRIPTIONS);
} }
public void testMultiFileMultiLineSingleError() { public void testMultiFileMultiLineSingleError() {
runParserTest(GCC_ERROR_STREAM4, runParserTest(GCC_ERROR_STREAM4, GCC_ERROR_STREAM4_ERRORS, GCC_ERROR_STREAM4_WARNINGS, GCC_ERROR_STREAM4_FILENAMES,
GCC_ERROR_STREAM4_ERRORS, GCC_ERROR_STREAM4_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
GCC_ERROR_STREAM4_WARNINGS,
GCC_ERROR_STREAM4_FILENAMES,
GCC_ERROR_STREAM4_DESCRIPTIONS);
} }
}
private void runParserTest(String [] dataStream,
int expectedErrorCount,
int expectedWarningCount,
String [] expectedFileNames,
String [] expectedDescriptions ) {
String [] parserID = { GCC_ERROR_PARSER_ID };
CountingMarkerGenerator markerGenerator = new CountingMarkerGenerator();
IProject project = getTempProject();
assertNotNull(project);
ErrorParserManager manager;
manager = new ImaginaryFilesErrorParserManager(project, markerGenerator, parserID);
String errorStream = makeStringFromArray(dataStream, "\n");
StringBufferInputStream inputStream = new StringBufferInputStream(errorStream);
assertNotNull(inputStream);
try {
transferInputStreamToOutputStream(inputStream, manager.getOutputStream(), 1024);
} catch(Exception ex) {
assertTrue(false);
} finally {
try {
manager.close();
} catch(Exception ex) {
/* Ignore */
}
}
manager.reportProblems();
assertEquals(expectedErrorCount, markerGenerator.numErrors);
assertEquals(expectedWarningCount, markerGenerator.numWarnings);
assertEquals(expectedFileNames.length, markerGenerator.uniqFiles.size());
for(int i= 0; i < expectedFileNames.length; i++) {
IPath path = ((IFile)markerGenerator.uniqFiles.get(i)).getLocation();
assertEquals(expectedFileNames[i], path.lastSegment());
}
if(expectedDescriptions != null) {
assertNotNull(markerGenerator.lastDescription);
for(int i = 0; i < expectedDescriptions.length; i++) {
assertTrue(markerGenerator.lastDescription.matches(expectedDescriptions[i]));
}
}
}
}

View file

@ -10,10 +10,10 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.internal.errorparsers.tests; package org.eclipse.cdt.core.internal.errorparsers.tests;
import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.StringBufferInputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
@ -33,27 +33,34 @@ import org.eclipse.core.runtime.NullProgressMonitor;
* This test is designed to exercise the error parser capabilities. * This test is designed to exercise the error parser capabilities.
*/ */
public class GenericErrorParserTests extends TestCase { public class GenericErrorParserTests extends TestCase {
public static final String GCC_ERROR_PARSER_ID = "org.eclipse.cdt.core.GCCErrorParser";
protected IProject fTempProject; protected IProject fTempProject;
/** /**
* Constructor for IndexManagerTest. * Constructor for IndexManagerTest.
*
* @param name * @param name
*/ */
public GenericErrorParserTests(String name) { public GenericErrorParserTests(String name) {
super(name); super(name);
} }
public GenericErrorParserTests() {
super();
}
/* /*
* @see TestCase#setUp() * @see TestCase#setUp()
*/ */
protected void setUp() throws Exception { protected void setUp() throws Exception {
super.setUp(); super.setUp();
fTempProject = ResourcesPlugin.getWorkspace().getRoot().getProject("temp-" + System.currentTimeMillis()); fTempProject = ResourcesPlugin.getWorkspace().getRoot().getProject("temp-" + System.currentTimeMillis());
if(!fTempProject.exists()) { if (!fTempProject.exists()) {
fTempProject.create(new NullProgressMonitor()); fTempProject.create(new NullProgressMonitor());
} }
} }
/* /*
* @see TestCase#tearDown() * @see TestCase#tearDown()
*/ */
@ -67,15 +74,15 @@ public class GenericErrorParserTests extends TestCase {
} catch (Exception ex) { } catch (Exception ex) {
} }
} }
protected IProject getTempProject() { protected IProject getTempProject() {
return fTempProject; return fTempProject;
} }
protected String makeStringFromArray(String [] pieces, String sep) { protected String makeStringFromArray(String[] pieces, String sep) {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
for(int i = 0; i < pieces.length; i++) { for (int i = 0; i < pieces.length; i++) {
if(i != 0) { if (i != 0) {
buf.append(sep); buf.append(sep);
} }
buf.append(pieces[i]); buf.append(pieces[i]);
@ -84,18 +91,78 @@ public class GenericErrorParserTests extends TestCase {
} }
protected void transferInputStreamToOutputStream(InputStream input, OutputStream output, int byteBlockSize) throws IOException { protected void transferInputStreamToOutputStream(InputStream input, OutputStream output, int byteBlockSize) throws IOException {
byte [] buffer = new byte[byteBlockSize]; byte[] buffer = new byte[byteBlockSize];
int bytesRead; int bytesRead;
while((bytesRead = input.read(buffer)) >= 0) { while ( (bytesRead = input.read(buffer)) >= 0) {
output.write(buffer, 0, bytesRead); output.write(buffer, 0, bytesRead);
} }
buffer = null; buffer = null;
} }
protected void runParserTest(InputStream inputStream, int expectedErrorCount, int expectedWarningCount,
String[] expectedFileNames, String[] expectedDescriptions, String[] parserID) {
assertNotNull(inputStream);
CountingMarkerGenerator markerGenerator = new CountingMarkerGenerator();
IProject project = getTempProject();
assertNotNull(project);
ErrorParserManager manager;
manager = new ImaginaryFilesErrorParserManager(project, markerGenerator, parserID);
try {
transferInputStreamToOutputStream(inputStream, manager.getOutputStream(), 1024);
} catch (Exception ex) {
assertTrue(false);
} finally {
try {
manager.close();
} catch (Exception ex) {
/* Ignore */
}
}
manager.reportProblems();
if (expectedErrorCount >= 0) {
assertEquals(expectedErrorCount, markerGenerator.numErrors);
}
if (expectedWarningCount >= 0) {
assertEquals(expectedWarningCount, markerGenerator.numWarnings);
}
if (expectedFileNames != null) {
assertEquals(expectedFileNames.length, markerGenerator.uniqFiles.size());
for (int i = 0; i < expectedFileNames.length; i++) {
IPath path = ((IFile)markerGenerator.uniqFiles.get(i)).getLocation();
assertEquals(expectedFileNames[i], path.lastSegment());
}
}
if (expectedDescriptions != null) {
assertNotNull(markerGenerator.lastDescription);
for (int i = 0; i < expectedDescriptions.length; i++) {
assertTrue(markerGenerator.lastDescription.matches(expectedDescriptions[i]));
}
}
}
protected void runParserTest(String[] dataStream, int expectedErrorCount, int expectedWarningCount, String[] expectedFileNames,
String[] expectedDescriptions, String[] parserID) {
String errorStream = makeStringFromArray(dataStream, "\n");
ByteArrayInputStream inputStream = new ByteArrayInputStream(errorStream.getBytes());
runParserTest(inputStream, expectedErrorCount, expectedWarningCount, expectedFileNames, expectedDescriptions, parserID);
}
class FileNameComparator implements Comparator { class FileNameComparator implements Comparator {
/* (non-Javadoc)
/*
* (non-Javadoc)
*
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/ */
public int compare(Object arg0, Object arg1) { public int compare(Object arg0, Object arg1) {
@ -103,40 +170,41 @@ public class GenericErrorParserTests extends TestCase {
IFile f0 = (IFile)arg0; IFile f0 = (IFile)arg0;
IFile f1 = (IFile)arg1; IFile f1 = (IFile)arg1;
return f0.getName().compareToIgnoreCase(f1.getName()); return f0.getName().compareToIgnoreCase(f1.getName());
} catch(Exception ex) { } catch (Exception ex) {
/* Ignore */ /* Ignore */
} }
return 1; return 1;
} }
} }
/** /**
* Expand and grow this class to make it more usefull. * Expand and grow this class to make it more usefull.
*/ */
class CountingMarkerGenerator implements IMarkerGenerator { class CountingMarkerGenerator implements IMarkerGenerator {
public int numErrors; public int numErrors;
public int numWarnings; public int numWarnings;
public int numMarkers; public int numMarkers;
public ArrayList uniqFiles; public ArrayList uniqFiles;
public String lastDescription; public String lastDescription;
private Comparator fFileNameComparator; private Comparator fFileNameComparator;
public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) { public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
int index = Collections.binarySearch(uniqFiles, file, fFileNameComparator); int index = Collections.binarySearch(uniqFiles, file, fFileNameComparator);
if(index < 0) { if (index < 0) {
uniqFiles.add(-1*(index + 1), file); uniqFiles.add(-1 * (index + 1), file);
} }
if(severity == SEVERITY_WARNING) { if (severity == SEVERITY_WARNING) {
numWarnings++; numWarnings++;
} else if(severity == SEVERITY_ERROR_BUILD || severity == SEVERITY_ERROR_RESOURCE) { } else if (severity == SEVERITY_ERROR_BUILD || severity == SEVERITY_ERROR_RESOURCE) {
numErrors++; numErrors++;
} }
lastDescription = errorDesc; lastDescription = errorDesc;
numMarkers++; numMarkers++;
} }
public CountingMarkerGenerator() { public CountingMarkerGenerator() {
numErrors = 0; numErrors = 0;
numWarnings = 0; numWarnings = 0;
@ -146,46 +214,47 @@ public class GenericErrorParserTests extends TestCase {
} }
/** /**
* This class allows us to run error parsers for files which don't * This class allows us to run error parsers for files which don't really
* really exist by just using the strings that come out as error codes. * exist by just using the strings that come out as error codes.
*/ */
class ImaginaryFilesErrorParserManager extends ErrorParserManager { class ImaginaryFilesErrorParserManager extends ErrorParserManager {
IProject fProject; IProject fProject;
public ImaginaryFilesErrorParserManager(IProject project, IMarkerGenerator generator, String [] ids) { public ImaginaryFilesErrorParserManager(IProject project, IMarkerGenerator generator, String[] ids) {
super(project, generator, ids); super(project, generator, ids);
fProject = project; fProject = project;
} }
public IFile findFileName(String fileName) { public IFile findFileName(String fileName) {
if(fileName.lastIndexOf('/') != -1) { if (fileName.lastIndexOf('/') != -1) {
fileName = fileName.substring(fileName.lastIndexOf('/') + 1); fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
} }
IFile file = fProject.getFile(fileName); IFile file = fProject.getFile(fileName);
if(!file.exists()) { if (!file.exists()) {
try { try {
InputStream stream = new StringBufferInputStream("TestFile"); InputStream stream = new ByteArrayInputStream("TestFile".getBytes());
file.create(stream, true, new NullProgressMonitor()); file.create(stream, true, new NullProgressMonitor());
stream.close(); stream.close();
} catch(Exception ex) { } catch (Exception ex) {
/* Ignore */ /* Ignore */
} }
} }
return file; return file;
} }
protected IFile findFileInWorkspace(IPath path) { protected IFile findFileInWorkspace(IPath path) {
IFile file = fProject.getFile(path.lastSegment()); IFile file = fProject.getFile(path.lastSegment());
if(!file.exists()) { if (!file.exists()) {
try { try {
InputStream stream = new StringBufferInputStream("TestFile"); InputStream stream = new ByteArrayInputStream("TestFile".getBytes());
file.create(stream, true, new NullProgressMonitor()); file.create(stream, true, new NullProgressMonitor());
stream.close(); stream.close();
} catch(Exception ex) { } catch (Exception ex) {
/* Ignore */ /* Ignore */
} }
} }
return file; return file;
} }
} }
} }

File diff suppressed because one or more lines are too long