Commit 12575da1 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

no buffered Writer created when fileNameFluxes is empty

parent 02b29d96
......@@ -198,9 +198,9 @@
<parameterSetLine>0</parameterSetLine>
<yearOfTheUpdate>0</yearOfTheUpdate>
<basinsToUpdateFile>data/input/reality/basinsToUpdate.csv</basinsToUpdateFile>
<outputPath>data/output/</outputPath>
<outputPath>data/output/atlanticarea/</outputPath>
<minYearToWrite>1900</minYearToWrite>
<fileNameFluxes>nutrientFluxes</fileNameFluxes>
<fileNameFluxes></fileNameFluxes>
<lengthAtHatching>2.0</lengthAtHatching>
<linfVonBertForFemale>70.0</linfVonBertForFemale>
<linfVonBertForMale>70.0</linfVonBertForMale>
......@@ -318,7 +318,7 @@
<processesAtEnd>
<species.WriteNutrientImportFluxes>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<fileName>fluxes</fileName>
<fileName>nutrientImportFluxes</fileName>
</species.WriteNutrientImportFluxes>
<species.WriteNutrientExportFluxes>
......
......@@ -8,7 +8,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
......@@ -465,8 +464,8 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, BasinNet
tempMinRep = parameterSets.get(parameterSetLine - 1).getSecond();
}
// open an bufferad writer to export fluxes
if (fileNameFluxes != null) {
// open an buffered writer to export fluxes
if (!fileNameFluxes.isEmpty()) {
sep = ";";
new File(this.outputPath + fileNameFluxes).getParentFile().mkdirs();
try {
......@@ -502,7 +501,7 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, BasinNet
while (scanner.hasNextLine()) {
String[] fields = scanner.nextLine().split(",");
System.out.println(Arrays.toString(fields));
// System.out.println(Arrays.toString(fields));
if (fields.length > 2) {
if (!fields[2].isEmpty())
obs1900.put(fields[1], Integer.valueOf(fields[2]));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment