Skip to content

Commit d667ba2

Browse files
committed
修复部分 lint 问题
1 parent a9a1fe2 commit d667ba2

File tree

8 files changed

+10
-76
lines changed

8 files changed

+10
-76
lines changed

.project

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/main/java/com/tencentyun/Base64URL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public static byte[] base64DecodeUrl(byte[] input) throws IOException {
4343
default:
4444
break;
4545
}
46-
return new BASE64Decoder().decodeBuffer(base64.toString());
46+
return new BASE64Decoder().decodeBuffer(new String(base64));
4747
}
4848
}

src/main/java/com/tencentyun/TLSSigAPIv2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import org.json.JSONObject;
1818

1919
public class TLSSigAPIv2 {
20-
private long sdkappid;
21-
private String key;
20+
final private long sdkappid;
21+
final private String key;
2222

2323
public TLSSigAPIv2(long sdkappid, String key) {
2424
this.sdkappid = sdkappid;

src/main/main.iml

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/test/com/com.iml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.tencentyun;
22

3-
import org.junit.Test;
4-
import org.junit.Before;
53
import org.junit.After;
4+
import org.junit.Before;
5+
import org.junit.Test;
66

77
/**
88
* TLSSigAPI Tester.
@@ -14,11 +14,11 @@
1414
public class TLSSigAPITest {
1515

1616
@Before
17-
public void before() throws Exception {
17+
public void before() {
1818
}
1919

2020
@After
21-
public void after() throws Exception {
21+
public void after() {
2222
}
2323

2424
/**
@@ -36,9 +36,10 @@ public void testGenSigWithUserBug() {
3636
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
3737
System.out.println(api.genPrivateMapKey("xiaojun", 180 * 86400, 10000, 255));
3838
}
39+
3940
//使用userbuf和字符串房间号生产privatemapkey
4041
@Test
41-
public void testGenSigWithUserBug() {
42+
public void testGenSigWithUserBug1() {
4243
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
4344
System.out.println(api.genPrivateMapKeyWithStringRoomID("xiaojun", 180 * 86400, "100000000", 255));
4445
}
@@ -47,18 +48,7 @@ public void testGenSigWithUserBug() {
4748
* Method: hmacsha256(String identifier, long currTime, long expire)
4849
*/
4950
@Test
50-
public void testHmacsha256() throws Exception {
51-
//TODO: Test goes here...
52-
/*
53-
try {
54-
Method method = TLSSigAPI.getClass().getMethod("hmacsha256", String.class, long.class, long.class);
55-
method.setAccessible(true);
56-
method.invoke(<Object>, <Parameters>);
57-
} catch(NoSuchMethodException e) {
58-
} catch(IllegalAccessException e) {
59-
} catch(InvocationTargetException e) {
60-
}
61-
*/
51+
public void testHmacsha256() {
6252
}
6353

6454
}

src/test/com/tencentyun/Untitled.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/test/test.iml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)