Feature/java11 build (#1280)
* hawkBit on Java 11 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Preparing java 11 build - Update eclipse-link maven plugin dependencies - Fixing warnings, adopt to java-11 style Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Preparing java 11 build - Fixing warnings, adapt to java-11 style - Added since to deprecated Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing sonar warnings - removed deprecated API Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing sonar warnings & failing test - Added suppressWarning - added WithSpringAuthorityRule to clean-up listener Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Compile warnings - Test if final causes issues in tests Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Removed deprecated code Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Reverted changes Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Removed final as this causes invalid reflective access exceptions - The eclipselink generated classes seem to modify the field directly - update plugin version Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Upgrade eclipselink from 2.7.9 to 2.7.10 * Remove @deprecated endpoints from MgmtTargetTagResource * Remove dependencies already defined in eclipselink-maven-plugin * Try eclipselink 2.7.11-RC1 * Set project encoding to UTF-8 * Upgrade surefire and failsafe plugins to 3.0.0-M7 * Try fixed string instead of a random generated one * Replace JsonBuilder by Jackson ObjectMapper usage * Use JsonBuilder again * Use APPLICATION_JSON_UTF8 instead of APPLICATION_JSON * Try to replace com.vaadin.external.google:android-json by org.json:json * Add debugging outputs * Improve debugging outputs * Improve debugging outputs * Use Jackson instead of JsonBuilder * Use Jackson instead of JsonBuilder 2nd part * Use Spring json dependency * Use eclipselink 2.7.11 * Fix RootControllerDocumentationTest * Improve helper methods of AbstractDDiApiIntegrationTest * Upgrade SpringBoot and SpringCloud versions * Improve deprecation notice for 0.3.0M8 * Fix BaseAmqpServiceTest * Fix SpecificationsBuilderTest * Removed deprecated code * Define maven-enforcer-plugin version * Remove com.google.code.findbugs.jsr305 Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Update circleci image to openjdk:openjdk:11.0.13-jdk-buster Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Fix javadoc generation and license check Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> * Fix review findings Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> Signed-off-by: Florian Ruschbaschan <florian.ruschbaschan@bosch.io> Co-authored-by: Dominic Schabel <dominic.schabel@bosch.io> Co-authored-by: Peter Vigier <Peter.Vigier@bosch.io> Co-authored-by: Markus Block <markus.block@bosch-si.com>
This commit is contained in:
committed by
GitHub
parent
537548defb
commit
32718676a4
@@ -743,7 +743,7 @@ public class JpaControllerManagement extends JpaActionManagement implements Cont
|
||||
throw new InvalidTargetAttributeException();
|
||||
}
|
||||
|
||||
final JpaTarget target = (JpaTarget) targetRepository.findOne(TargetSpecifications.hasControllerId(controllerId))
|
||||
final JpaTarget target = targetRepository.findOne(TargetSpecifications.hasControllerId(controllerId))
|
||||
.orElseThrow(() -> new EntityNotFoundException(Target.class, controllerId));
|
||||
|
||||
// get the modifiable attribute map
|
||||
|
||||
@@ -188,10 +188,10 @@ public class JpaTargetManagement implements TargetManagement {
|
||||
|
||||
final JpaTarget updatedTarget = JpaManagementHelper.touch(entityManager, targetRepository, target);
|
||||
|
||||
final List<TargetMetadata> createdMetadata = Collections.unmodifiableList(md.stream()
|
||||
final List<TargetMetadata> createdMetadata = md.stream()
|
||||
.map(meta -> targetMetadataRepository
|
||||
.save(new JpaTargetMetadata(meta.getKey(), meta.getValue(), updatedTarget)))
|
||||
.collect(Collectors.toList()));
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
// TargetUpdatedEvent is not sent within the touch() method due to the
|
||||
// "lastModifiedAt" field being ignored in JpaTarget
|
||||
@@ -228,12 +228,12 @@ public class JpaTargetManagement implements TargetManagement {
|
||||
// target indirectly
|
||||
final JpaTarget target = JpaManagementHelper.touch(entityManager, targetRepository,
|
||||
getByControllerIdAndThrowIfNotFound(controllerId));
|
||||
final JpaTargetMetadata matadata = targetMetadataRepository.save(updatedMetadata);
|
||||
final JpaTargetMetadata metadata = targetMetadataRepository.save(updatedMetadata);
|
||||
// target update event is set to ignore "lastModifiedAt" field so it is
|
||||
// not send automatically within the touch() method
|
||||
eventPublisherHolder.getEventPublisher()
|
||||
.publishEvent(new TargetUpdatedEvent(target, eventPublisherHolder.getApplicationId()));
|
||||
return matadata;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -247,7 +247,7 @@ public class JpaTargetManagement implements TargetManagement {
|
||||
final JpaTarget target = JpaManagementHelper.touch(entityManager, targetRepository,
|
||||
getByControllerIdAndThrowIfNotFound(controllerId));
|
||||
targetMetadataRepository.deleteById(metadata.getId());
|
||||
// target update event is set to ignore "lastModifiedAt" field so it is
|
||||
// target update event is set to ignore "lastModifiedAt" field, so it is
|
||||
// not send automatically within the touch() method
|
||||
eventPublisherHolder.getEventPublisher()
|
||||
.publishEvent(new TargetUpdatedEvent(target, eventPublisherHolder.getApplicationId()));
|
||||
@@ -419,14 +419,6 @@ public class JpaTargetManagement implements TargetManagement {
|
||||
return JpaManagementHelper.findAllWithoutCountBySpec(targetRepository, pageable, specList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countByFilters(final Collection<TargetUpdateStatus> status, final Boolean overdueState,
|
||||
final String searchText, final Long installedOrAssignedDistributionSetId,
|
||||
final Boolean selectTargetWithNoTag, final String... tagNames) {
|
||||
return countByFilters(new FilterParams(status, overdueState, searchText, installedOrAssignedDistributionSetId,
|
||||
selectTargetWithNoTag, tagNames));
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countByFilters(final FilterParams filterParams) {
|
||||
final List<Specification<JpaTarget>> specList = buildSpecificationList(filterParams);
|
||||
@@ -590,8 +582,8 @@ public class JpaTargetManagement implements TargetManagement {
|
||||
|
||||
allTargets.forEach(target -> target.addTag(tag));
|
||||
|
||||
final List<Target> result = Collections
|
||||
.unmodifiableList(allTargets.stream().map(targetRepository::save).collect(Collectors.toList()));
|
||||
final List<Target> result = allTargets.stream().map(targetRepository::save)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
// No reason to save the tag
|
||||
entityManager.detach(tag);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ParseExceptionWrapper {
|
||||
|
||||
/**
|
||||
* Get the current token
|
||||
*
|
||||
*
|
||||
* @return the current token or {@code null} if there is non.
|
||||
*/
|
||||
public TokenWrapper getCurrentToken() {
|
||||
|
||||
Reference in New Issue
Block a user