Skip to content

Commit 692dce0

Browse files
committed
format
1 parent a0fc230 commit 692dce0

File tree

4 files changed

+41
-42
lines changed

4 files changed

+41
-42
lines changed

src/main/java/com/qiniu/http/Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public okhttp3.Response intercept(Chain chain) throws IOException {
3939
IpTag tag = (IpTag) request.tag();
4040
try {
4141
tag.ip = chain.connection().socket().getRemoteSocketAddress().toString();
42-
}catch (Exception e){
42+
} catch (Exception e) {
4343
e.printStackTrace();
4444
tag.ip = "";
4545
}

src/test/java/com/qiniu/storage/FormUploadTest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,6 @@ public void testSizeMin2() {
244244
}
245245
}
246246

247-
class MyRet {
248-
public String hash;
249-
public String key;
250-
public String fsize;
251-
public String fname;
252-
public String mimeType;
253-
}
254-
255247
// @Test
256248
public void testFormLargeSize() {
257249
Config.PUT_THRESHOLD = 25 * 1024 * 1024;
@@ -277,7 +269,6 @@ public void testFormLargeSize() {
277269

278270
}
279271

280-
281272
// @Test
282273
public void testFormLargeSize2() {
283274
Config.PUT_THRESHOLD = 25 * 1024 * 1024;
@@ -308,4 +299,12 @@ public void testFormLargeSize2() {
308299

309300
}
310301

302+
class MyRet {
303+
public String hash;
304+
public String key;
305+
public String fsize;
306+
public String fname;
307+
public String mimeType;
308+
}
309+
311310
}

src/test/java/com/qiniu/storage/RecordUploadTest.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -171,30 +171,6 @@ public void test25M1k() throws Throwable {
171171
template(1024 * 25 + 1);
172172
}
173173

174-
class Up implements Callable<Response> {
175-
private final UploadManager uploadManager;
176-
private final File file;
177-
private final String key;
178-
private final String token;
179-
180-
public Up(UploadManager uploadManager, File file, String key, String token) {
181-
this.uploadManager = uploadManager;
182-
this.file = file;
183-
this.key = key;
184-
this.token = token;
185-
}
186-
187-
@Override
188-
public Response call() throws Exception {
189-
Response res = uploadManager.put(file, key, token);
190-
System.out.println("up: " + res);
191-
System.out.println("up: " + res.bodyString());
192-
isDone = true;
193-
response = res;
194-
return res;
195-
}
196-
}
197-
198174
@Test
199175
public void testLastModify() throws IOException {
200176
File f = File.createTempFile("qiniutest", "b");
@@ -240,4 +216,28 @@ public void testLastModify() throws IOException {
240216
long m4 = recoderFile.lastModified();
241217
assertTrue(m4 > m1);
242218
}
219+
220+
class Up implements Callable<Response> {
221+
private final UploadManager uploadManager;
222+
private final File file;
223+
private final String key;
224+
private final String token;
225+
226+
public Up(UploadManager uploadManager, File file, String key, String token) {
227+
this.uploadManager = uploadManager;
228+
this.file = file;
229+
this.key = key;
230+
this.token = token;
231+
}
232+
233+
@Override
234+
public Response call() throws Exception {
235+
Response res = uploadManager.put(file, key, token);
236+
System.out.println("up: " + res);
237+
System.out.println("up: " + res.bodyString());
238+
isDone = true;
239+
response = res;
240+
return res;
241+
}
242+
}
243243
}

src/test/java/com/qiniu/storage/ResumeUploadTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616

1717
public class ResumeUploadTest {
1818

19-
class MyRet {
20-
public String hash;
21-
public String key;
22-
public String fsize;
23-
public String fname;
24-
public String mimeType;
25-
}
26-
2719
private void template(int size) throws IOException {
2820
final String expectKey = "\r\n?&r=" + size + "k";
2921
final File f = TempFile.createFile(size);
@@ -70,4 +62,12 @@ public void test8M1k() throws Throwable {
7062
}
7163
template(1024 * 8 + 1);
7264
}
65+
66+
class MyRet {
67+
public String hash;
68+
public String key;
69+
public String fsize;
70+
public String fname;
71+
public String mimeType;
72+
}
7373
}

0 commit comments

Comments
 (0)