Author: ross.gardler
Date: Sat Sep 6 13:05:47 2008
New Revision: 1270
Modified:
trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/rdf/jena/SimalRepository.java
Log:
Revert last commit - this will reintroduce a low priority findbugs warning,
but the solution caused tests to fail (and silly me never ran tests before
committing - slapped wrists)
Modified:
trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/rdf/jena/SimalRepository.java
==============================================================================
---
trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/rdf/jena/SimalRepository.java
(original)
+++
trunk/uk.ac.osswatch.simal.core/src/main/java/uk/ac/osswatch/simal/rdf/jena/SimalRepository.java
Sat Sep 6 13:05:47 2008
@@ -183,12 +183,12 @@
logger.debug("Adding RDF data string:\n\t" + data);
File file = new File("testingAddData.rdf");
- FileWriter fw = null;
- BufferedWriter bw = null;
try {
- fw = new FileWriter(file);
- bw = new BufferedWriter(fw);
+ FileWriter fw = new FileWriter(file);
+ BufferedWriter bw = new BufferedWriter(fw);
bw.write(data);
+ bw.close();
+
addProject(file.toURI().toURL(), "");
} catch (MalformedURLException mue) {
// should never happen as we created the file here
@@ -199,20 +199,6 @@
"Unable to write file from data string", e);
} finally {
file.delete();
- if (bw != null) {
- try {
- bw.close();
- } catch (IOException e) {
- throw new SimalRepositoryException("Unable to close the writer",
e);
- }
- }
- if (fw != null) {
- try {
- fw.close();
- } catch (IOException e) {
- throw new SimalRepositoryException("Unable to close the
filewriter", e);
- }
- }
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Simal Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/simal-commits?hl=en
-~----------~----~----~----~------~----~------~--~---