Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
evoal-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
evoal
source
evoal-core
Commits
8d69d611
Commit
8d69d611
authored
1 year ago
by
Bernhard Johannes Berger
Browse files
Options
Downloads
Patches
Plain Diff
Added an explicit conversion to double in the CSV import to force numbers to be of correct type.
parent
c7e1b4e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/evoal/core/de.evoal.core.main/src/main/java/de/evoal/core/main/properties/CSVPropertiesReader.java
+2
-2
2 additions, 2 deletions
...va/de/evoal/core/main/properties/CSVPropertiesReader.java
with
2 additions
and
2 deletions
src/evoal/core/de.evoal.core.main/src/main/java/de/evoal/core/main/properties/CSVPropertiesReader.java
+
2
−
2
View file @
8d69d611
...
...
@@ -36,7 +36,7 @@ public class CSVPropertiesReader implements PropertiesReader {
@Override
public
PropertiesReader
init
(
final
File
inputFile
,
final
PropertiesSpecification
specification
)
throws
EvoalIOException
{
log
.
info
(
"Creating
JSON
properties reader for {}."
,
specification
);
log
.
info
(
"Creating
CSV
properties reader for {}."
,
specification
);
this
.
specification
=
specification
;
try
{
...
...
@@ -76,7 +76,7 @@ public class CSVPropertiesReader implements PropertiesReader {
final
Object
value
=
switch
(((
BaseDataDescription
)
s
.
type
()).
getRepresentation
())
{
case
BOOLEAN
->
Boolean
.
parseBoolean
(
strValue
);
case
INTEGER
->
"Infinity"
.
equals
(
strValue
)
?
Integer
.
MAX_VALUE
:
nf
.
parse
(
strValue
);
case
REAL
->
"Infinity"
.
equals
(
strValue
)
?
Double
.
POSITIVE_INFINITY
:
nf
.
parse
(
strValue
);
case
REAL
->
"Infinity"
.
equals
(
strValue
)
?
Double
.
POSITIVE_INFINITY
:
nf
.
parse
(
strValue
)
.
doubleValue
()
;
case
STRING
->
strValue
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment