Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Apply spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini committed May 8, 2024
1 parent c16e12e commit 9dd5b87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public static EvaluationValue evaluate(LootContext context, Expression exp) {
public static DataResult<Expression> parseExpression(String expression) {
try {
Expression exp = new Expression(expression.replace(":", "__idcl__"), CONFIGURATION);
exp.validate();
((ExpressionAccessor) exp).commander$constants(new HashMap<>(CONFIGURATION.getDefaultConstants()));
exp.validate();
return DataResult.success(exp);
} catch (Throwable throwable) {
return DataResult.error(throwable::getLocalizedMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ public boolean isEmpty() {
return size() == 0;
}

@NotNull
@Override
@NotNull @Override
public ListIterator<Object> listIterator(int index) {
return new ArrayIterator(size(), index) {
@Override
Expand All @@ -226,20 +225,17 @@ public boolean contains(Object o) {
throw new IllegalStateException();
}

@NotNull
@Override
@NotNull @Override
public Iterator<Object> iterator() {
return listIterator();
}

@NotNull
@Override
@NotNull @Override
public Object[] toArray() {
throw new IllegalStateException();
}

@NotNull
@Override
@NotNull @Override
public <T> T[] toArray(@NotNull T[] a) {
throw new IllegalStateException();
}
Expand Down Expand Up @@ -309,14 +305,12 @@ public int lastIndexOf(Object o) {
throw new IllegalStateException();
}

@NotNull
@Override
@NotNull @Override
public ListIterator<Object> listIterator() {
return listIterator(0);
}

@NotNull
@Override
@NotNull @Override
public List<Object> subList(int fromIndex, int toIndex) {
throw new IllegalStateException();
}
Expand Down

0 comments on commit 9dd5b87

Please sign in to comment.