Use String#isEmpty()
This commit is contained in:
parent
d961ff2f4d
commit
1b47b24a55
|
@ -250,7 +250,7 @@ public final class TestUtils {
|
|||
*/
|
||||
public static void assertEquals(final String message,
|
||||
final double[] expected, final RealVector actual, final double delta) {
|
||||
final String msgAndSep = message.equals("") ? "" : message + ", ";
|
||||
final String msgAndSep = message.isEmpty() ? "" : message + ", ";
|
||||
Assert.assertEquals(msgAndSep + "dimension", expected.length,
|
||||
actual.getDimension());
|
||||
for (int i = 0; i < expected.length; i++) {
|
||||
|
@ -272,7 +272,7 @@ public final class TestUtils {
|
|||
*/
|
||||
public static void assertEquals(final String message,
|
||||
final RealVector expected, final RealVector actual, final double delta) {
|
||||
final String msgAndSep = message.equals("") ? "" : message + ", ";
|
||||
final String msgAndSep = message.isEmpty() ? "" : message + ", ";
|
||||
Assert.assertEquals(msgAndSep + "dimension", expected.getDimension(),
|
||||
actual.getDimension());
|
||||
final int dim = expected.getDimension();
|
||||
|
|
|
@ -509,7 +509,7 @@ public class SimplexOptimizerTest {
|
|||
final List<Integer> list = new ArrayList<>();
|
||||
|
||||
if (str == null ||
|
||||
str.equals("")) {
|
||||
str.isEmpty()) {
|
||||
for (int i = 0; i <= dim; i++) {
|
||||
list.add(i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue