Merge remote-tracking branch 'eclipse/master' into harmonize-test-documentation
This commit is contained in:
@@ -48,7 +48,9 @@ public class MultiTenantJpaTransactionManager extends JpaTransactionManager {
|
||||
&& !definition.getName().startsWith(SystemManagement.class.getCanonicalName() + ".deleteTenant")
|
||||
&& !definition.getName()
|
||||
.startsWith(SystemManagement.class.getCanonicalName() + ".currentTenantKeyGenerator")
|
||||
&& !definition.getName().startsWith(RolloutManagement.class.getCanonicalName() + ".rolloutScheduler")) {
|
||||
&& !definition.getName().startsWith(RolloutManagement.class.getCanonicalName() + ".rolloutScheduler")
|
||||
&& !definition.getName()
|
||||
.startsWith(SystemManagement.class.getCanonicalName() + ".getOrCreateTenantMetadata")) {
|
||||
|
||||
final String currentTenant = tenantAware.getCurrentTenant();
|
||||
if (currentTenant == null) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
public class ListReportSeries extends AbstractReportSeries {
|
||||
|
||||
private final List<Number> data = new ArrayList<Number>();
|
||||
private final List<Number> data = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @param name
|
||||
|
||||
@@ -330,7 +330,7 @@ public class DeploymentManagement {
|
||||
// one we have been switched to canceling state because for targets
|
||||
// which we have changed to
|
||||
// canceling we don't want to publish the new action update event.
|
||||
final Set<Long> targetIdsCancellList = new HashSet<Long>();
|
||||
final Set<Long> targetIdsCancellList = new HashSet<>();
|
||||
targetIds.forEach(ids -> targetIdsCancellList.addAll(overrideObsoleteUpdateActions(ids)));
|
||||
|
||||
// cancel all scheduled actions which are in-active, these actions were
|
||||
@@ -435,7 +435,7 @@ public class DeploymentManagement {
|
||||
*/
|
||||
private Set<Long> overrideObsoleteUpdateActions(final List<Long> targetsIds) {
|
||||
|
||||
final Set<Long> cancelledTargetIds = new HashSet<Long>();
|
||||
final Set<Long> cancelledTargetIds = new HashSet<>();
|
||||
|
||||
// Figure out if there are potential target/action combinations that
|
||||
// need to be considered
|
||||
@@ -779,8 +779,7 @@ public class DeploymentManagement {
|
||||
multiselect.where(cb.equal(actionRoot.get(Action_.target), target));
|
||||
multiselect.orderBy(cb.desc(actionRoot.get(Action_.id)));
|
||||
multiselect.groupBy(actionRoot.get(Action_.id));
|
||||
final List<ActionWithStatusCount> resultList = entityManager.createQuery(multiselect).getResultList();
|
||||
return resultList;
|
||||
return entityManager.createQuery(multiselect).getResultList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ public class NoCountPagingRepository {
|
||||
*/
|
||||
public <T, I extends Serializable> Slice<T> findAll(final Specification<T> spec, final Pageable pageable,
|
||||
final Class<T> domainClass) {
|
||||
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<T, I>(domainClass, em);
|
||||
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<>(domainClass, em);
|
||||
return noCountDao.findAll(spec, pageable);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class NoCountPagingRepository {
|
||||
* org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
public <T, I extends Serializable> Slice<T> findAll(final Pageable pageable, final Class<T> domainClass) {
|
||||
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<T, I>(domainClass, em);
|
||||
final SimpleJpaNoCountRepository<T, I> noCountDao = new SimpleJpaNoCountRepository<>(domainClass, em);
|
||||
return noCountDao.findAll(pageable);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class NoCountPagingRepository {
|
||||
|
||||
final List<T> content = query.getResultList();
|
||||
|
||||
return new PageImpl<T>(content, pageable, content.size());
|
||||
return new PageImpl<>(content, pageable, content.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public class TagManagement {
|
||||
public void deleteTargetTag(@NotEmpty final String targetTagName) {
|
||||
final TargetTag tag = targetTagRepository.findByNameEquals(targetTagName);
|
||||
|
||||
final List<Target> changed = new LinkedList<Target>();
|
||||
final List<Target> changed = new LinkedList<>();
|
||||
for (final Target target : targetRepository.findByTag(tag)) {
|
||||
target.getTags().remove(tag);
|
||||
changed.add(target);
|
||||
@@ -311,7 +311,7 @@ public class TagManagement {
|
||||
public void deleteDistributionSetTag(@NotEmpty final String tagName) {
|
||||
final DistributionSetTag tag = distributionSetTagRepository.findByNameEquals(tagName);
|
||||
|
||||
final List<DistributionSet> changed = new LinkedList<DistributionSet>();
|
||||
final List<DistributionSet> changed = new LinkedList<>();
|
||||
for (final DistributionSet set : distributionSetRepository.findByTag(tag)) {
|
||||
set.getTags().remove(tag);
|
||||
changed.add(set);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ActionStatus extends BaseEntity {
|
||||
@CollectionTable(name = "sp_action_status_messages", joinColumns = @JoinColumn(name = "action_status_id", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_stat_msg_act_stat") ) , indexes = {
|
||||
@Index(name = "sp_idx_action_status_msgs_01", columnList = "action_status_id") })
|
||||
@Column(name = "detail_message", length = 512)
|
||||
private final List<String> messages = new ArrayList<String>();
|
||||
private final List<String> messages = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Creates a new {@link ActionStatus} object.
|
||||
|
||||
@@ -87,7 +87,7 @@ public class Target extends NamedEntity implements Persistable<Long> {
|
||||
@JoinTable(name = "sp_target_target_tag", joinColumns = {
|
||||
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target") ) }, inverseJoinColumns = {
|
||||
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag") ) })
|
||||
private Set<TargetTag> tags = new HashSet<TargetTag>();
|
||||
private Set<TargetTag> tags = new HashSet<>();
|
||||
|
||||
@CascadeOnDelete
|
||||
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true, cascade = { CascadeType.REMOVE })
|
||||
|
||||
Reference in New Issue
Block a user