Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
nmarulo authored Oct 25, 2024
1 parent 884920a commit 4664ca9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
25 changes: 12 additions & 13 deletions src/main/java/dev/nmarulo/depensaapp/ServletInitializer.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package dev.nmarulo.depensaapp;

import java.util.HashMap;
import java.util.Map;
import java.net.URL;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {
import java.net.URL;
import java.util.HashMap;

public class ServletInitializer extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
Integer.valueOf(3).compareTo(2);
Integer.valueOf(3)
.compareTo(2);
new Integer(3).compareTo(2);
HashMap<URL, Integer> hits = new HashMap<>();
for (HashMap.Entry<URL, Integer> e : hits) {
for (HashMap.Entry<URL, Integer> e : hits.entrySet()) {
// ... This can become very slow for larger hashmaps of URLS.
}
String x = "foo";
Expand All @@ -24,15 +23,15 @@ protected SpringApplicationBuilder configure(SpringApplicationBuilder applicatio
}
Integer value = 1;
try {
// ...
// ...
} catch (Exception e) {
// ...
// ...
value = null; // Value set to null within a catch block
// ...
// ...
}
//value.member += 1;

return application.sources(DespensaRestApiApplication.class);
}

}
16 changes: 8 additions & 8 deletions src/main/java/dev/nmarulo/depensaapp/commons/gson/GsonUtil.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package dev.nmarulo.depensaapp.commons.gson;

import java.util.HashMap;
import java.util.Map;
import java.net.URL;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.RequiredArgsConstructor;
import org.springframework.core.ResolvableType;
import org.springframework.stereotype.Component;

import java.net.URL;
import java.util.HashMap;
import java.util.List;

@Component
@RequiredArgsConstructor
public class GsonUtil {
// --
// --

private final Gson gson;

Expand All @@ -27,11 +26,12 @@ public <R> R convertTo(Object object, Class<?> clazz) {
if (isList) {
return fromJsonTo(json, TypeToken.getParameterized(List.class, clazz));
}

Integer.valueOf(3).compareTo(2);

Integer.valueOf(3)
.compareTo(2);
new Integer(3).compareTo(2);
HashMap<URL, Integer> hits = new HashMap<>();
for (HashMap.Entry<URL, Integer> e : hits) {
for (HashMap.Entry<URL, Integer> e : hits.entrySet()) {
// ... This can become very slow for larger hashmaps of URLS.
}
String x = "foo";
Expand Down

0 comments on commit 4664ca9

Please sign in to comment.