add @SuppressWarnings(unchecked)
parent
1b263e6436
commit
42132c694c
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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!");
|
||||
|
|
Loading…
Reference in New Issue