Skip to content

Commit

Permalink
直接 > 0 就可以了,没有必要用三元表达式 a > b ? true : false 可以直接简化为 a > b
Browse files Browse the repository at this point in the history
  • Loading branch information
khotyn committed Sep 18, 2013
1 parent 048fee8 commit 0a18cac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/taobao/profile/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
*/
package com.taobao.profile;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.taobao.profile.config.ProfConfig;
import com.taobao.profile.config.ProfFilter;
import com.taobao.profile.thread.DataDumpThread;
import com.taobao.profile.thread.InnerSocketThread;
import com.taobao.profile.thread.SamplerThread;
import com.taobao.profile.thread.TimeControlThread;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* 管理类,单例实现
*
Expand Down Expand Up @@ -124,7 +124,7 @@ public void initialization() {
// 判断启动时间是否大于采集结束时间 2012-05-25
DateFormat df = new SimpleDateFormat("HH:mm:ss");
String now = df.format(new Date());
moreThanEndTime = (now.compareTo(profConfig.getEndProfTime()) > 0 ) ? true : false;
moreThanEndTime = (now.compareTo(profConfig.getEndProfTime()) > 0 );
isDebugMode = profConfig.isDebugMode();
PORT = profConfig.getPort();

Expand Down

0 comments on commit 0a18cac

Please sign in to comment.