Skip to content

Commit

Permalink
Cleanup in preparation of new release
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Jun 26, 2023
1 parent 7e2792e commit a14f1d8
Show file tree
Hide file tree
Showing 13 changed files with 297 additions and 256 deletions.
4 changes: 2 additions & 2 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.35</version>
<version>1.36</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.35</version>
<version>1.36</version>
</dependency>
</dependencies>
</project>
11 changes: 10 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.fourteendoggo.mathexpressionparser;

import me.fourteendoggo.mathexpressionparser.container.TokenList;
import me.fourteendoggo.mathexpressionparser.exceptions.SyntaxException;
import me.fourteendoggo.mathexpressionparser.function.FunctionCallSite;
import me.fourteendoggo.mathexpressionparser.function.FunctionContext;
import me.fourteendoggo.mathexpressionparser.utils.Assert;

import java.util.Objects;
import java.util.function.DoubleBinaryOperator;
import java.util.function.DoubleUnaryOperator;
import java.util.function.ToDoubleFunction;
Expand All @@ -22,11 +22,11 @@ private ExpressionParser() {}
* @throws SyntaxException if the given expression is invalid or empty
*/
public static double parse(String input) {
Assert.notNull(input, "input was null");
Objects.requireNonNull(input, "input was null");
Assert.isFalse(input.isEmpty(), "input was empty");

TokenList tokens = new Tokenizer(input.toCharArray()).readTokens();
return tokens.solve();
Tokenizer tokenizer = new Tokenizer(input.toCharArray());
return tokenizer.readTokens().solve();
}

/**
Expand Down
Loading

0 comments on commit a14f1d8

Please sign in to comment.