swent-group10 / polyfit

0 stars 1 forks source link

Issue handling weird weight units from Spoonacular #326

Closed RandomUsername1315 closed 5 months ago

RandomUsername1315 commented 5 months ago

Bugfix

There was an issue with how the MeasurementUnits.kt class handled non-predefined measurement units and conversion between them. Specifically, there was a problem when trying to convert CUPS into GRAMS. This was fixed by ensuring that an error is not thrown in this situation and by adding try-catch blocks around the units conversion to prevent the app from crashing. If any issues occur when converting units, a default value of 1.0 is used or an empty list.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud