Skip to content

Commit 82965f2

Browse files
longbaiMistyL
authored andcommitted
update travis
1 parent 2fe7bf3 commit 82965f2

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android:
2929
# Emulator Management: Create, Start and Wait
3030
before_script:
3131
- android list targets
32-
- echo no | android create avd --force -n test -t android-25 --abi armeabi-v7a
32+
- echo no | android create avd --force -n test -t android-25
3333
- emulator -avd test -no-skin -no-audio -no-window &
3434
- android-wait-for-emulator
3535
- adb shell input keyevent 82 &

library/src/main/java/com/qiniu/android/bigdata/Configuration.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ public final class Configuration implements Cloneable {
2222
*/
2323
public int responseTimeout = 10;
2424

25-
/**
26-
* 上传失败重试次数
27-
*/
28-
public int retryMax = 3;
29-
30-
25+
public Configuration clone() throws CloneNotSupportedException{
26+
return (Configuration)super.clone();
27+
}
28+
29+
static Configuration copy(Configuration config){
30+
if (config == null){
31+
return new Configuration();
32+
}
33+
try {
34+
return config.clone();
35+
} catch (CloneNotSupportedException e) {
36+
return new Configuration();
37+
}
38+
}
3139
}

library/src/main/java/com/qiniu/android/bigdata/pipeline/Pipeline.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public final class Pipeline {
2121
private final Client client;
2222

2323
public Pipeline(Configuration config) {
24-
this.config = (config == null ? new Configuration() : config);
24+
this.config = Configuration.copy(config);
2525
this.client = new Client(this.config.proxy, this.config.connectTimeout, this.config.responseTimeout, null, null);
2626
}
2727

0 commit comments

Comments
 (0)