cleanup: use primitive type instead of wrapper type

This commit is contained in:
P0nk
2021-04-08 17:45:50 +02:00
parent 202f2d8bc5
commit a5b42b8a43
10 changed files with 20 additions and 23 deletions

View File

@@ -221,8 +221,8 @@ public class MapleCouponInstaller {
if(d.contains("rate")) {
String r = getNodeValue(token);
Double db = Double.parseDouble(r);
itemMultiplier = db.intValue();
double db = Double.parseDouble(r);
itemMultiplier = (int) db;
}
}
}

View File

@@ -238,9 +238,9 @@ public class MapleGachaponItemidRetriever {
ResultSet rs = ps.executeQuery();
while(rs.next()) {
Integer id = rs.getInt("id");
int id = rs.getInt("id");
str += id.toString();
str += Integer.toString(id);
str += " ";
}

View File

@@ -20,11 +20,7 @@
package mapleidretriever;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.*;
import java.util.ArrayList;
/**
@@ -175,9 +171,9 @@ public class MapleIdRetriever {
String str = "";
while(rs.next()) {
Integer id = rs.getInt("id");
int id = rs.getInt("id");
str += id.toString();
str += Integer.toString(id);
str += " ";
}