add @SuppressWarnings(unchecked)

master
YuQing 2023-01-29 14:47:09 +08:00
parent 1b263e6436
commit 42132c694c
3 changed files with 3 additions and 3 deletions

View File

@ -155,13 +155,13 @@ public class IniFileReader {
} finally {
try {
if (in != null) in.close();
//System.out.println("loadFrom...finally...in.close(); done");
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
@SuppressWarnings("unchecked")
private void readToParamTable(InputStream in) throws IOException {
this.paramTable = new Hashtable();
if (in == null) return;
@ -206,7 +206,6 @@ public class IniFileReader {
try {
if (bufferedReader != null) bufferedReader.close();
if (inReader != null) inReader.close();
//System.out.println("readToParamTable...finally...bufferedReader.close();inReader.close(); done");
} catch (Exception ex) {
ex.printStackTrace();
}

View File

@ -219,7 +219,7 @@ public class ClientGlobal {
* server','
*/
public static void initByTrackers(String trackerServers) throws IOException, MyException {
List<InetSocketAddress> list = new ArrayList();
List<InetSocketAddress> list = new ArrayList<InetSocketAddress>();
String spr1 = ",";
String spr2 = ":";
String[] arr1 = trackerServers.trim().split(spr1);

View File

@ -27,6 +27,7 @@ public class ProtoStructDecoder<T extends StructBase> {
/**
* decode byte buffer
*/
@SuppressWarnings("unchecked")
public T[] decode(byte[] bs, Class<T> clazz, int fieldsTotalSize) throws Exception {
if (bs.length % fieldsTotalSize != 0) {
throw new IOException("byte array length: " + bs.length + " is invalid!");