NUMBERS_74: minor: added a trim method to parsing single integer
@@ -646,7 +646,7 @@ public class Fraction
final int slashLoc = s.indexOf("/");
// if no slash, parse as single number
if (slashLoc == -1) {
- return Fraction.of(Integer.parseInt(s));
+ return Fraction.of(Integer.parseInt(s.trim()));
} else {
final int num = Integer.parseInt(s.substring(0, slashLoc).trim());
final int denom = Integer.parseInt(s.substring(slashLoc + 1).trim());
