diff --git a/so-util/src/main/java/com/pineone/icbms/so/util/session/DefaultSession.java b/so-util/src/main/java/com/pineone/icbms/so/util/session/DefaultSession.java index 6ffe4583..9d99808f 100644 --- a/so-util/src/main/java/com/pineone/icbms/so/util/session/DefaultSession.java +++ b/so-util/src/main/java/com/pineone/icbms/so/util/session/DefaultSession.java @@ -44,10 +44,6 @@ public class DefaultSession implements Session { */ private String id; - public DefaultSession(String id) { - this.id = id; - } - /** * The sessionData is pair of key, value. */ @@ -59,6 +55,20 @@ public DefaultSession(String id) { private Long calculateTime; + public DefaultSession(String id) { + this.id = id; + } + + public DefaultSession() { + id = UUID.randomUUID().toString(); + sessionData = new HashMap<>(); + } + + public DefaultSession(String id, Map sessionData) { + this.id = id; + this.sessionData = sessionData; + } + public DefaultSession(String id, Map sessionData, String createDate, Date mongoTime , Long calculateTime) { this.id = id; this.sessionData = sessionData; @@ -77,16 +87,6 @@ public void setCreateDate(String createDate) { this.createDate = createDate; } - public DefaultSession() { - id = UUID.randomUUID().toString(); - sessionData = new HashMap<>(); - } - - public DefaultSession(String id, Map sessionData) { - this.id = id; - this.sessionData = sessionData; - } - @Override public Long getCalculateTime() { return calculateTime; diff --git a/so-util/src/test/java/com/pineone/icbms/so/util/session/SessionTest.java b/so-util/src/test/java/com/pineone/icbms/so/util/session/SessionTest.java index 5f8db72a..00923e6a 100644 --- a/so-util/src/test/java/com/pineone/icbms/so/util/session/SessionTest.java +++ b/so-util/src/test/java/com/pineone/icbms/so/util/session/SessionTest.java @@ -52,7 +52,7 @@ public void name() throws Exception { @Test public void dbTime(){ - String time = "583bc66ecf8b437a86b83375"; + String time = "583e7935ab3897ffc529b813"; String hexTime = time.substring(0,8); long date = Long.parseLong(hexTime,16); System.out.println(new SimpleDateFormat("yyyy-mm-dd HH-mm:ss").format(new Date(date*1000))); diff --git a/sonar-project.properties b/sonar-project.properties index 2ae42299..7f0862c8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,13 +1,33 @@ -sonar.projectKey=icmbs:so +sonar.projectKey=SO # this is the name displayed in the SonarQube UI -sonar.projectName=so -sonar.projectVersion=2.0.1 +sonar.projectName=ICBMS SO +sonar.projectVersion=2.0.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # Since SonarQube 4.2, this property is optional if sonar.modules is set. # If not set, SonarQube starts looking for source code from the directory containing # the sonar-project.properties file. -sonar.sources=. - +sonar.sources=src + +# List of the module identifiers +sonar.modules=so-bizcontext, so-compositevirtualobject, so-contextinformation, so-contextmodel, so-creator, so-device, so-domain, so-profile, so-scheduler, so-service, so-servicemodel, so-util, so-virtualobject + + +# Properties can obviously be overriden for +# each module - just prefix them with the module ID +so-bizcontext.sonar.projectName=bizcontext +so-compositevirtualobject.sonar.projectName=compositevirtualobject +so-contextinformation.sonar.projectName=contextinformation +so-contextmodel.sonar.projectName=contextmodel +so-creator.sonar.projectName=creator +so-device.sonar.projectName=device +so-domain.sonar.projectName=domain +so-profile.sonar.projectName=profile +so-scheduler.sonar.projectName=scheduler +so-service.sonar.projectName=service +so-util.sonar.projectName=util +so-servicemodel.sonar.projectName=servicemodel +so-virtualobject.sonar.virtualobject=servicemodel + # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 \ No newline at end of file