Skip to content

Commit

Permalink
Remove unused constructor and redundant method
Browse files Browse the repository at this point in the history
  • Loading branch information
k1w1dev committed Apr 28, 2024
1 parent f38be7f commit a8ef9dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@
* has all product details.
*/
public record ProductResource(List<Product> products) {
/**
* Initialise resource with existing products.
*
* @param products initialize resource with existing products. Act as database.
*/
public ProductResource {
}

/**
* Get all products.
*
Expand Down Expand Up @@ -80,14 +72,4 @@ public void save(ProductDto.Request.Create createProductDto) {
.cost(createProductDto.getCost())
.build());
}

/**
* List of all products in an entity representation.
*
* @return : all the products entity that stored in the products list
*/
@Override
public List<Product> products() {
return products;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*/
package com.iluwatar.embedded.value;

import static java.sql.PreparedStatement.RETURN_GENERATED_KEYS;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
Expand All @@ -33,7 +35,7 @@
import java.util.stream.Stream;
import lombok.extern.slf4j.Slf4j;

import static java.sql.PreparedStatement.RETURN_GENERATED_KEYS;


/**
* Communicates with H2 database with the help of JDBC API.
Expand Down

0 comments on commit a8ef9dd

Please sign in to comment.