Skip to content

Commit

Permalink
review code.
Browse files Browse the repository at this point in the history
  • Loading branch information
lijiahangmax committed Sep 5, 2022
1 parent 93063a3 commit d9000d0
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 334 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ MD5签名 | Signatures.md5
├─mail 邮件工具类
├─nginx nginx 解析工具类
├─process 进程工具类
├─tail 文件 tail 工具类
Expand Down
13 changes: 0 additions & 13 deletions orion-ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@
<version>${dom4j.version}</version>
</dependency>

<!-- nginx-parser -->
<dependency>
<groupId>com.github.odiszapc</groupId>
<artifactId>nginxparser</artifactId>
<version>${nginxparser.version}</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- git -->
<dependency>
<groupId>org.eclipse.jgit</groupId>
Expand Down
88 changes: 0 additions & 88 deletions orion-ext/src/main/java/com/orion/ext/nginx/NginxEntry.java

This file was deleted.

219 changes: 0 additions & 219 deletions orion-ext/src/main/java/com/orion/ext/nginx/NginxExt.java

This file was deleted.

13 changes: 6 additions & 7 deletions orion-http/src/main/java/com/orion/http/BaseHttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract class BaseHttpRequest {
/**
* 请求参数
*/
protected Map<String, String> queryParams;
protected Map<String, Object> queryParams;

/**
* 请求参数
Expand Down Expand Up @@ -137,20 +137,19 @@ public BaseHttpRequest method(HttpMethod method) {
return this;
}

public BaseHttpRequest queryParam(String key, String value) {
public BaseHttpRequest queryParam(String key, Object value) {
if (this.queryParams == null) {
this.queryParams = new LinkedHashMap<>();
}
this.queryParams.put(key, value);
return this;
}

public BaseHttpRequest queryParams(Map<String, String> queryParams) {
public BaseHttpRequest queryParams(Map<String, ?> queryParams) {
if (this.queryParams == null) {
this.queryParams = queryParams;
} else {
this.queryParams.putAll(queryParams);
this.queryParams = new LinkedHashMap<>();
}
this.queryParams.putAll(queryParams);
return this;
}

Expand Down Expand Up @@ -333,7 +332,7 @@ public String getMethod() {
return method;
}

public Map<String, String> getQueryParams() {
public Map<String, Object> getQueryParams() {
return queryParams;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static ApacheResponse get(String url) {
* @param params params
* @return response
*/
public static ApacheResponse get(String url, Map<String, String> params) {
public static ApacheResponse get(String url, Map<String, ?> params) {
ApacheRequest request = new ApacheRequest(url);
request.queryParams(params);
return request.await();
Expand Down
2 changes: 1 addition & 1 deletion orion-http/src/main/java/com/orion/http/ok/OkRequests.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static OkResponse get(String url) {
* @param params params
* @return response
*/
public static OkResponse get(String url, Map<String, String> params) {
public static OkResponse get(String url, Map<String, ?> params) {
OkRequest request = new OkRequest(url);
request.queryParams(params);
return request.await();
Expand Down
Loading

0 comments on commit d9000d0

Please sign in to comment.