Showing 3 of 5 total issues
Method create
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void create(Context ctx) throws SQLException {
String input = ctx.formParamAsClass("url", String.class)
.get()
.trim()
.toLowerCase();
Method createCheck
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void createCheck(Context ctx) throws SQLException {
Long urlId = ctx.pathParamAsClass("id", Long.class).get();
Url url = UrlsRepository.find(urlId)
.orElseThrow(() -> new NotFoundResponse("Entity with id = " + urlId + " not found"));
try {
Method getEntities
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static Optional<List<UrlCheck>> getEntities(Long searchId) throws SQLException {
var sql = "SELECT * FROM url_checks where url_id = ?";
try (var conn = dataSource.getConnection();
var stmt = conn.prepareStatement(sql)) {
stmt.setLong(1, searchId);