Skip to content

Commit

Permalink
#109 | Use Double.valueOf for conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Dec 15, 2023
1 parent f457689 commit d61e4ee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ private ActivityDTO createActivityRequest(Subject subject) {
/* Measurement fields */
activityDTO.setMeasurementType((String) subject.getObservation(MEASUREMENTS_TYPE));
activityDTO.setNos((Integer) subject.getObservation(NOS));
activityDTO.setBreadth((subject.getObservation(BREADTH) == null) ? 0D : (Double) subject.getObservation(BREADTH));
activityDTO.setDiameter((subject.getObservation(DIAMETER) == null) ? 0D : (Double) subject.getObservation(DIAMETER));
activityDTO.setLength((subject.getObservation(LENGTH) == null) ? 0D : (Double) subject.getObservation(LENGTH));
activityDTO.setDepthHeight((subject.getObservation(HEIGHT_DEPTH) == null) ? 0D : (Double) subject.getObservation(HEIGHT_DEPTH));
activityDTO.setBreadth((subject.getObservation(BREADTH) == null) ? 0D : Double.valueOf(subject.getObservation(BREADTH).toString()));
activityDTO.setDiameter((subject.getObservation(DIAMETER) == null) ? 0D : Double.valueOf(subject.getObservation(DIAMETER).toString()));
activityDTO.setLength((subject.getObservation(LENGTH) == null) ? 0D : Double.valueOf(subject.getObservation(LENGTH).toString()));
activityDTO.setDepthHeight((subject.getObservation(HEIGHT_DEPTH) == null) ? 0D : Double.valueOf(subject.getObservation(HEIGHT_DEPTH).toString()));
/* Photograph fields */
activityDTO.setBeforeImplementationPhotograph(getPhotographStrings(BEFORE_IMPLEMENTATION_PHOTOGRAPH, subject));
activityDTO.setDuringImplementationPhotograph(getPhotographStrings(DURING_IMPLEMENTATION_PHOTOGRAPH, subject));
Expand Down

0 comments on commit d61e4ee

Please sign in to comment.