Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
DerutDan committed Oct 5, 2017
1 parent 23acd7d commit 6712c70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private Double simpleCalculation(String s) throws ParsingException {
s = s.replaceAll("--", ""); // Костыль, но тест не д
Stack<Double> operands = new Stack<>();
Stack<Character> operators = new Stack<>();
for (int i = 0; i < s.length(); ) {
for (int i = 0; i < s.length();) {
if (s.charAt(i) >= 48 && s.charAt(i) <= 57 || (s.charAt(i) == '-' && !isLastOperand)) {
if (isLastOperand) {
throw new ParsingException("Invalid expression");
Expand All @@ -64,7 +64,7 @@ private Double simpleCalculation(String s) throws ParsingException {
++i;
}
for (;
i < s.length() && (s.charAt(i) >= 48 && s.charAt(i) <= 57 || s.charAt(i) == '.'); ) {
i < s.length() && (s.charAt(i) >= 48 && s.charAt(i) <= 57 || s.charAt(i) == '.');) {
++i;
}
Double operand;
Expand Down

0 comments on commit 6712c70

Please sign in to comment.