Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed last review issues
  • Loading branch information
Damtev committed Sep 28, 2022
commit e3381ef52a856fb031b1b2f793514fe6a32dbe0a
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public UtDoubleStream(Double[] data, int startInclusive, int endExclusive) {
* <li> elementData is marked as parameter </li>
* <li> elementData.storage and it's elements are marked as parameters </li>
*/
@SuppressWarnings({"DuplicatedCode"})
@SuppressWarnings("DuplicatedCode")
void preconditionCheck() {
if (alreadyVisited(this)) {
return;
Expand Down Expand Up @@ -146,6 +146,8 @@ public DoubleStream map(DoubleUnaryOperator mapper) {
@SuppressWarnings("unchecked")
@Override
public <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper) {
// Here we assume that this mapping does not produce infinite streams
// - otherwise it should always be executed concretely.
preconditionCheckWithClosingStream();

int size = elementData.end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public IntStream map(IntUnaryOperator mapper) {
@SuppressWarnings("unchecked")
@Override
public <U> Stream<U> mapToObj(IntFunction<? extends U> mapper) {
// Here we assume that this mapping does not produce infinite streams
// - otherwise it should always be executed concretely.
preconditionCheckWithClosingStream();

int size = elementData.end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public LongStream map(LongUnaryOperator mapper) {
@SuppressWarnings("unchecked")
@Override
public <U> Stream<U> mapToObj(LongFunction<? extends U> mapper) {
// Here we assume that this mapping does not produce infinite streams
// - otherwise it should always be executed concretely.
preconditionCheckWithClosingStream();

int size = elementData.end;
Expand Down
6 changes: 5 additions & 1 deletion utbot-framework/src/main/kotlin/org/utbot/engine/Resolver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,11 @@ class Resolver(
// as const or store model.
if (defaultBaseType is PrimType) return null

if (actualType.numDimensions == 0) {
require(!defaultType.isJavaLangObject()) {
"Object type $defaultType is unexpected in fallback to default type"
}

if (defaultType.numDimensions == 0) {
return defaultType
}

Expand Down