Update Spring Boot to 2.3.2

-Update Spring Cloud to Hoxton.SR7
-Replace ResourceSupport by RepresentationModel (Spring Hateoas 1.0)
-Replace ControllerLinkBuilder by WebMvcLinkBuilder (Spring Hateoas 1.0)
-Move getId() from Identifiable to BaseEntity (Spring Hateoas 1.0)
-Remove hamcrest.Factory
-Use static Sort.by reference
-Place http security anyRequest().authenticated()
-Replace MockMvcRequestBuilders.fileUpload by MockMvcRequestBuilders.multipart
-Deprecate MEDIA_TYPE_CBOR_UTF8
-Replace MEDIA_TYPE_CBOR_UTF8 by MEDIA_TYPE_CBOR in tests
-Replace HAL_JSON_UTF8 by HAL_JSON in tests
-Replace APPLICATION_JSON_UTF8 by APPLICATION_JSON in tests
-Use org.mockito.junit.MockitoJUnitRunner
-Remove overridden dependency versions
-Removing not needed comments in pom.xml
-Downgrade flyway-core to be MySQL 5.6 compatible
-Add maven-site-plugin since it was removed with spring-boot 2.3
-Set servlet encoding properties
-Introducing Test that verifies the charset inside the content-type of a response
-Add @DirtiesContext to CorsTest and ContentTypeTest
-Add content-type mockmvc test with adapted mockmvc config
-Move encoding.force property to test class
-Switch expected and actual parameter values in content-type test
-Delete deprecated content-type test with TestRestTemplate
-Exclude JUnit5 from spring-boot-starter-test
-Upgrade allure-junit4 to 2.13.5
-Add aspectjweaver 1.9.6 to surefire test execution
-Add flyway-core version to property
-Use getRequiredLink() within MgmtBaseEntity.getId()

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
Ammar Bikic
2020-01-30 13:44:25 +01:00
parent e6b5f480da
commit 28b65a290d
106 changed files with 664 additions and 419 deletions

View File

@@ -21,7 +21,6 @@ import org.eclipse.hawkbit.ui.common.layout.MasterEntityAwareComponent;
import org.eclipse.hawkbit.ui.common.tagdetails.TagPanelLayout.TagAssignmentListener;
import org.eclipse.hawkbit.ui.utils.UINotification;
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
import org.springframework.hateoas.Identifiable;
import org.springframework.util.CollectionUtils;
import org.vaadin.spring.events.EventBus.UIEventBus;
@@ -98,10 +97,10 @@ public abstract class AbstractTagToken<T extends ProxyNamedEntity>
tagPanelLayout.tagDeleted(tagId);
}
protected boolean checkAssignmentResult(final List<? extends Identifiable<Long>> assignedEntities,
protected boolean checkAssignmentResult(final List<? extends BaseEntity> assignedEntities,
final Long expectedAssignedEntityId) {
if (!CollectionUtils.isEmpty(assignedEntities) && expectedAssignedEntityId != null) {
final List<Long> assignedDsIds = assignedEntities.stream().map(Identifiable::getId)
final List<Long> assignedDsIds = assignedEntities.stream().map(BaseEntity::getId)
.collect(Collectors.toList());
if (assignedDsIds.contains(expectedAssignedEntityId)) {
return true;
@@ -110,7 +109,7 @@ public abstract class AbstractTagToken<T extends ProxyNamedEntity>
return false;
}
protected boolean checkUnassignmentResult(final Identifiable<Long> unAssignedEntity,
protected boolean checkUnassignmentResult(final BaseEntity unAssignedEntity,
final Long expectedUnAssignedEntityId) {
return unAssignedEntity != null && expectedUnAssignedEntityId != null
&& unAssignedEntity.getId().equals(expectedUnAssignedEntityId);