Skip to content

Commit

Permalink
fix : fix http util log
Browse files Browse the repository at this point in the history
  • Loading branch information
sondertara committed Sep 14, 2020
1 parent f1ece8c commit 270ed74
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions common-tara/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<parent>
<groupId>com.sondertara</groupId>
<artifactId>tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.sondertara</groupId>
<artifactId>common-tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>

<name>common-tara</name>
<description>common utils.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ public class HttpClientUtil {
requestConfig = RequestConfig.custom().setConnectionRequestTimeout(
connectionRequestTimeout).setSocketTimeout(socketTimeout).setConnectTimeout(
connectTimeout).build();

//System.out.println("初始化HttpClientTest~~~结束");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyStoreException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static String sendPostJson(String url, Map<String, Object> param) throws

public static String sendPostJson(String url, String jsonParam) throws TaraException {
logger.info("post url ==>[{}]", url);
logger.info("post param ==>[{}]", url);
logger.info("post param ==>[{}]", jsonParam);
OutputStream out = null;
InputStream in = null;
HttpURLConnection conn = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
public class StringUtil {

private static final Logger logger = LoggerFactory.getLogger(StringUtil.class);

private static final String NULL_STR="null";

private static final Pattern PHONE_PATTERN = Pattern.compile("^[1][3,4,5,6,7,8,9][0-9]{9}$");

Expand All @@ -39,7 +41,7 @@ public class StringUtil {
* @return is blank
*/
public static boolean isBlank(Object str) {
return str == null || "".equals(str.toString().trim()) || "null".equalsIgnoreCase(str.toString().trim());
return str == null || "".equals(str.toString().trim()) || NULL_STR.equalsIgnoreCase(str.toString().trim());
}

/**
Expand Down Expand Up @@ -72,7 +74,7 @@ public static String convertNullToZero(Object str) {
* @return str maybe null
*/
public static String convertNullToNull(Object str) {
if (str == null || "".equals(str.toString().trim()) || "null".equalsIgnoreCase(str.toString().trim())) {
if (str == null || "".equals(str.toString().trim()) || NULL_STR.equalsIgnoreCase(str.toString().trim())) {
return null;
}
return str.toString();
Expand All @@ -88,7 +90,7 @@ public static String convertNullToNull(Object str) {
* @return number
*/
public static String convertToNumber(Object str) {
if (str == null || "".equals(str.toString().trim()) || "null".equalsIgnoreCase(str.toString().trim())) {
if (str == null || "".equals(str.toString().trim()) || NULL_STR.equalsIgnoreCase(str.toString().trim())) {
return null;
}
String s = org.apache.commons.lang3.StringUtils.deleteWhitespace(str.toString());
Expand All @@ -105,11 +107,11 @@ public static String convertToNumber(Object str) {
* 如果字符串为空或者null,会返回默认值
* </p>
*
* @param str
* @return
* @param str str
* @return number
*/
public static String convertToNumber(Object str, Number defaultValue) {
if (str == null || "".equals(str.toString().trim()) || "null".equalsIgnoreCase(str.toString().trim())) {
if (str == null || "".equals(str.toString().trim()) || NULL_STR.equalsIgnoreCase(str.toString().trim())) {
return String.valueOf(defaultValue);
}
String s = StringUtils.deleteWhitespace(str.toString());
Expand Down Expand Up @@ -170,8 +172,8 @@ public static String convertEncode(String strIn, String encoding, String targetE
/**
* 截取str中以startStr开头,endStr结束的字符串
*
* @param str
* @param startStr
* @param str str
* @param startStr str
* @param endStr
* @return 返回以以startStr开头,以endStr结束的字符串,如果startStr不存在,则有str为起始;如果endStr不存在,则以字符串结束为终结
*/
Expand Down Expand Up @@ -989,9 +991,9 @@ public static String getExtension(String uri) {
return "";
}
if (uri.contains(".")) {
String[] strs = uri.split("\\.");
if (strs.length > 1) {
String extension = strs[1];
String[] strings = uri.split("\\.");
if (strings.length > 1) {
String extension = strings[1];
if (isNotEmpty(extension)) {
return extension;
}
Expand Down
6 changes: 3 additions & 3 deletions excel-tara/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>com.sondertara</groupId>
<artifactId>tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.sondertara</groupId>
<artifactId>excel-tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
<name>excel-tara</name>
<description>High performance Excel kit.</description>
<properties>
Expand Down Expand Up @@ -99,7 +99,7 @@
<dependency>
<groupId>com.sondertara</groupId>
<artifactId>common-tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
</dependency>

</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions notify-tara/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>com.sondertara</groupId>
<artifactId>tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.sondertara</groupId>
<artifactId>notify-tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>

<name>notify-tara</name>
<description>notify kit.</description>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>com.sondertara</groupId>
<artifactId>common-tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.sondertara</groupId>
<artifactId>tara</artifactId>
<version>0.0.3.303</version>
<version>0.0.3.304</version>
<packaging>pom</packaging>
<name>tara</name>
<description>tara is a awesome java advance Kit.</description>
Expand Down

0 comments on commit 270ed74

Please sign in to comment.