Skip to content

Commit

Permalink
cleanup: remove unused props/decorators #657
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jun 13, 2019
1 parent 14226ae commit 3f7ff46
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public ResponseEntity<ItemsByCategory> getTicketCategories(@PathVariable("eventN
//
var saleableAdditionalServices = additionalServiceRepository.loadAllForEvent(event.getId())
.stream()
.map(as -> new SaleableAdditionalService(event, as, null, null, promoCode.orElse(null), 0))
.map(as -> new SaleableAdditionalService(event, as, promoCode.orElse(null)))
.filter(SaleableAdditionalService::isNotExpired)
.collect(Collectors.toList());

Expand Down
61 changes: 0 additions & 61 deletions src/main/java/alfio/controller/decorator/EventDescriptor.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,12 @@ public class SaleableAdditionalService implements PriceContainer {
private final Event event;
@Delegate(excludes = {Exclusions.class, PriceContainer.class})
private final AdditionalService additionalService;
private final String title;
private final String description;
private final PromoCodeDiscount promoCodeDiscount;
private final int index;

public SaleableAdditionalService(Event event, AdditionalService additionalService, String title, String description, PromoCodeDiscount promoCodeDiscount, int index) {
public SaleableAdditionalService(Event event, AdditionalService additionalService, PromoCodeDiscount promoCodeDiscount) {
this.event = event;
this.additionalService = additionalService;
this.title = title;
this.description = description;
this.promoCodeDiscount = promoCodeDiscount;
this.index = index;
}

public SaleableAdditionalService withIndex(int index) {
return new SaleableAdditionalService(this.event, this.additionalService, this.title, this.description, this.promoCodeDiscount, index);
}

public boolean isExpired() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.math.BigDecimal;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Optional;

public class SaleableTicketCategory implements PriceContainer {
Expand Down

0 comments on commit 3f7ff46

Please sign in to comment.