Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion T2dMath.UtilsTest/ParseLasTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
var reader = in_stream;
{
string line;
while ((line = reader.ReadLine()) != null) {

Check warning on line 38 in T2dMath.UtilsTest/ParseLasTime.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Converting null literal or possible null value to non-nullable type.
line = line.Trim();

if (line.StartsWith("~")) {
Expand Down Expand Up @@ -138,7 +138,7 @@
for (int i = 0; i < curveNames.Count; i++) {
curves[curveNames[i]] = dataColumns[i].ToArray();
}
PostProcessing(wellInfo["DATE"].ToString(), wellInfo["NULL"].ToString(), curves);

Check warning on line 141 in T2dMath.UtilsTest/ParseLasTime.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Possible null reference argument for parameter 'null_value' in 'void ParseLasTime.PostProcessing(string date_value, string null_value, Dictionary<string, double[]> curves)'.

Check warning on line 141 in T2dMath.UtilsTest/ParseLasTime.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Possible null reference argument for parameter 'date_value' in 'void ParseLasTime.PostProcessing(string date_value, string null_value, Dictionary<string, double[]> curves)'.
}

private static void PostProcessing(
Expand All @@ -147,7 +147,7 @@
Dictionary<string, double[]> curves
) {
const double tolerance = 1e-12;
double dnull = double.Parse(null_value, CultureInfo.InvariantCulture);
double dnull = double.Parse(null_value.Replace(',', '.'), CultureInfo.InvariantCulture);
string[] formats = { "dd-MMM-yyyy", "dd/MM/yyyy", "dd.MM.yyyy" }; //01-JAN-2000, 14/06/2012
DateTime date = DateTime.ParseExact(date_value, formats, CultureInfo.InvariantCulture);

Expand Down
Loading