Skip to content

Commit 42132c6

Browse files
committed
add @SuppressWarnings(unchecked)
1 parent 1b263e6 commit 42132c6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/org/csource/common/IniFileReader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ private void loadFromFile(String confFilePath) throws IOException {
155155
} finally {
156156
try {
157157
if (in != null) in.close();
158-
//System.out.println("loadFrom...finally...in.close(); done");
159158
} catch (Exception ex) {
160159
ex.printStackTrace();
161160
}
162161
}
163162
}
164163

164+
@SuppressWarnings("unchecked")
165165
private void readToParamTable(InputStream in) throws IOException {
166166
this.paramTable = new Hashtable();
167167
if (in == null) return;
@@ -206,7 +206,6 @@ private void readToParamTable(InputStream in) throws IOException {
206206
try {
207207
if (bufferedReader != null) bufferedReader.close();
208208
if (inReader != null) inReader.close();
209-
//System.out.println("readToParamTable...finally...bufferedReader.close();inReader.close(); done");
210209
} catch (Exception ex) {
211210
ex.printStackTrace();
212211
}

src/main/java/org/csource/fastdfs/ClientGlobal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public static void initByProperties(Properties props) throws IOException, MyExce
219219
* server之间用逗号','分隔
220220
*/
221221
public static void initByTrackers(String trackerServers) throws IOException, MyException {
222-
List<InetSocketAddress> list = new ArrayList();
222+
List<InetSocketAddress> list = new ArrayList<InetSocketAddress>();
223223
String spr1 = ",";
224224
String spr2 = ":";
225225
String[] arr1 = trackerServers.trim().split(spr1);

src/main/java/org/csource/fastdfs/ProtoStructDecoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public ProtoStructDecoder() {
2727
/**
2828
* decode byte buffer
2929
*/
30+
@SuppressWarnings("unchecked")
3031
public T[] decode(byte[] bs, Class<T> clazz, int fieldsTotalSize) throws Exception {
3132
if (bs.length % fieldsTotalSize != 0) {
3233
throw new IOException("byte array length: " + bs.length + " is invalid!");

0 commit comments

Comments
 (0)