Noah
01/30/2025, 4:09 PMrepository
every { repository.save(any()) } returns fleetEntity
Returns the following after switching JDK from Eclipse Temurin to docker.io/ibm-semeru-runtimes:open-17.0.13_11-jdk
FleetServiceTest > should return created fleet given request() FAILED
io.mockk.MockKException at FleetServiceTest.kt:44
Caused by: java.lang.ClassCastException at FleetServiceTest.kt:44
repository interface:
package org.springframework.data.repository;
import java.util.Optional;
@NoRepositoryBean
public interface CrudRepository<T, ID> extends Repository<T, ID> {
<S extends T> S save(S entity);
<S extends T> Iterable<S> saveAll(Iterable<S> entities);
Optional<T> findById(ID id);
boolean existsById(ID id);
Iterable<T> findAll();
Iterable<T> findAllById(Iterable<ID> ids);
long count();
void deleteById(ID id);
void delete(T entity);
void deleteAllById(Iterable<? extends ID> ids);
void deleteAll(Iterable<? extends T> entities);
void deleteAll();
}
Any ideas as to why this CastException occurs all of a sudden after changing the JDK? This is important because the new JDK image has a significantly smaller memory footprint.Daniel Pitts
01/30/2025, 6:01 PMephemient
01/31/2025, 4:08 AMNoah
01/31/2025, 8:40 AMDaniel Pitts
01/31/2025, 7:13 PM