Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Warning raw types. #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class SessionManager {
private static CCache<Integer, String> sessionOpenIDCCache = new CCache<Integer, String>(I_AD_Session.Table_Name, 30, 0); // no time-out

/** Session Context */
private static final Map<String, Properties> sessionsContext = Collections.synchronizedMap(new Hashtable<>());
private static final Map<String, Properties> sessionsContext = Collections.synchronizedMap(new Hashtable<String, Properties>());

public static void revokeSession(String token) {
sessionsContext.remove(token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class FilterManager {
@SuppressWarnings("unchecked")
private FilterManager(String filter) {
if(Util.isEmpty(filter, true)) {
fillValues = new ArrayList<>();
this.fillValues = new ArrayList<Map<String, Object>>();
} else {
ObjectMapper fileMapper = new ObjectMapper();
try {
Expand All @@ -67,12 +67,12 @@ private FilterManager(String filter) {
*/
TypeReference<HashMap<String,Object>> valueType = new TypeReference<HashMap<String,Object>>() {};
// JavaType valueType = fileMapper.getTypeFactory().constructMapLikeType(Map.class, String.class, Object.class);
fillValues = new ArrayList<>();
this.fillValues = new ArrayList<Map<String, Object>>();

Map<String, Object> keyValueFilters = fileMapper.readValue(filter, valueType);
if (keyValueFilters != null && !keyValueFilters.isEmpty()) {
keyValueFilters.entrySet().forEach(entry -> {
Map<String, Object> condition = new HashMap<>();
Map<String, Object> condition = new HashMap<String, Object>();

// set column name as key filter
condition.put(Filter.NAME, entry.getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class SortingManager {

private List<Map<String, String>> fillValues = new ArrayList<>();;
private List<Map<String, String>> fillValues = new ArrayList<Map<String, String>>();

/**
* read filters and convert to stub
Expand All @@ -46,7 +46,7 @@ public class SortingManager {
@SuppressWarnings("unchecked")
private SortingManager(String sorting) {
if(Util.isEmpty(sorting, true)) {
this.fillValues = new ArrayList<>();
this.fillValues = new ArrayList<Map<String, String>>();
} else {
ObjectMapper fileMapper = new ObjectMapper();
try {
Expand All @@ -70,10 +70,10 @@ private SortingManager(String sorting) {
// JavaType valueType = fileMapper.getTypeFactory().constructMapLikeType(Map.class, String.class, Object.class);
Map<String, String> keyValueFilters = fileMapper.readValue(sorting, valueType);

this.fillValues = new ArrayList<>();
this.fillValues = new ArrayList<Map<String, String>>();
if (keyValueFilters != null && !keyValueFilters.isEmpty()) {
keyValueFilters.entrySet().forEach(entry -> {
Map<String, String> condition = new HashMap<>();
Map<String, String> condition = new HashMap<String, String>();
condition.put(Order.NAME, entry.getKey());
condition.put(Order.TYPE, Order.ASCENDING);
String sortType = entry.getValue();
Expand All @@ -87,12 +87,12 @@ private SortingManager(String sorting) {
/**
"DisplayColumn_C_BPartner_ID ASC, DocumentNo DESC"
*/
this.fillValues = new ArrayList<>();
this.fillValues = new ArrayList<Map<String, String>>();

// throw new RuntimeException("Invalid Order");
List<String> sortColumns = Arrays.asList(sorting.split("\\s*,\\s*"));
sortColumns.forEach(sortCondition -> {
Map<String, String> condition = new HashMap<>();
Map<String, String> condition = new HashMap<String, String>();

List<String> sortValues = Arrays.asList(sortCondition.split("\\s"));
String columnName = sortValues.get(0).trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ public static Map<String, Object> convertJsonStringToMap(String jsonValues) {
* @return
*/
public static Map<String, Object> convertValuesMapToObjects(Map<String, Value> values) {
Map<String, Object> convertedValues = new HashMap<>();
Map<String, Object> convertedValues = new HashMap<String, Object>();
if (values == null || values.size() <= 0) {
return convertedValues;
}
Expand All @@ -709,7 +709,7 @@ public static Map<String, Object> convertValuesMapToObjects(Map<String, Value> v
* @return
*/
public static Map<String, Object> convertValuesMapToObjects(Map<String, Value> values, Map<String, Integer> displayTypeColumns) {
Map<String, Object> convertedValues = new HashMap<>();
Map<String, Object> convertedValues = new HashMap<String, Object>();
if (values == null || values.size() <= 0) {
return convertedValues;
}
Expand Down
Loading