Skip to content

Commit

Permalink
Fix sonar errors
Browse files Browse the repository at this point in the history
  • Loading branch information
superpollo2 committed Jun 3, 2024
1 parent 778ae79 commit 9ccda39
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/main/java/com/consola/lis/service/LoanService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
import com.consola.lis.model.enums.ItemState;
import com.consola.lis.model.repository.InventoryItemRepository;
import com.consola.lis.model.repository.LoanRepository;
import com.consola.lis.util.deserializer.LoanStateDeserializer;
import com.consola.lis.util.exception.AlreadyExistsException;
import com.consola.lis.util.exception.IllegalParameterInRequest;
import com.consola.lis.util.exception.NotExistingException;
import com.consola.lis.util.mapper.LoanMapper;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.RequiredArgsConstructor;

import org.springframework.data.domain.Page;
Expand Down Expand Up @@ -74,6 +72,7 @@ private Loan buildLoanFromRequest(LoanDTO loanRequest) {
}
Optional<InventoryItem> item = inventoryItemRepository.findById(loanRequest.getItemId());


return Loan.builder()
.itemId(loanRequest.getItemId())
.loanType(LoanType.valueOf(loanRequest.getLoanType().name()))
Expand Down Expand Up @@ -106,7 +105,6 @@ public boolean existLoan(int loanId){
}

public List<Loan> getAllLoans() {
System.out.printf("d"+loanRepository.findAll());
return loanRepository.findAll();
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/consola/lis/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.consola.lis.dto.UserLisDTO;
import com.consola.lis.model.entity.UserLis;
import com.consola.lis.model.repository.UserLisRepository;
import com.consola.lis.util.constans.EndpointConstant;
import com.consola.lis.util.exception.NotExistingException;
import com.consola.lis.jwt.JwtService;
import com.consola.lis.model.enums.UserRole;
Expand Down

0 comments on commit 9ccda39

Please sign in to comment.