[Git][java-team/openhft-chronicle-core][upstream] New upstream version 1.16.25
Tony Mancill
gitlab at salsa.debian.org
Fri Sep 14 06:05:52 BST 2018
Tony Mancill pushed to branch upstream at Debian Java Maintainers / openhft-chronicle-core
Commits:
22d4813e by tony mancill at 2018-09-13T04:10:05Z
New upstream version 1.16.25
- - - - -
6 changed files:
- benchmarks/pom.xml
- pom.xml
- src/main/java/net/openhft/chronicle/core/StackTrace.java
- src/main/java/net/openhft/chronicle/core/time/SystemTimeProvider.java
- src/main/java/net/openhft/chronicle/core/time/TimeProvider.java
- src/main/java/net/openhft/chronicle/core/util/StringUtils.java
Changes:
=====================================
benchmarks/pom.xml
=====================================
@@ -43,7 +43,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-bom</artifactId>
- <version>1.16.161</version>
+ <version>1.16.167</version>
<type>pom</type>
<scope>import</scope>
</dependency>
=====================================
pom.xml
=====================================
@@ -25,7 +25,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>chronicle-core</artifactId>
- <version>1.16.24</version>
+ <version>1.16.25</version>
<name>OpenHFT/Chronicle-Core</name>
<description>Chronicle-Core</description>
<packaging>bundle</packaging>
@@ -273,7 +273,7 @@
<connection>scm:git:git at github.com:OpenHFT/Chronicle-Core.git</connection>
<developerConnection>scm:git:git at github.com:OpenHFT/Chronicle-Core.git
</developerConnection>
- <tag>chronicle-core-1.16.24</tag>
+ <tag>chronicle-core-1.16.25</tag>
</scm>
</project>
=====================================
src/main/java/net/openhft/chronicle/core/StackTrace.java
=====================================
@@ -9,13 +9,14 @@ package net.openhft.chronicle.core;
*/
public class StackTrace extends Throwable {
public StackTrace() {
+ this(null);
}
public StackTrace(String message) {
- super(message);
+ this(message, null);
}
public StackTrace(String message, Throwable cause) {
- super(message, cause);
+ super(message, cause, false, false);
}
}
=====================================
src/main/java/net/openhft/chronicle/core/time/SystemTimeProvider.java
=====================================
@@ -16,16 +16,12 @@
package net.openhft.chronicle.core.time;
-import java.util.concurrent.atomic.AtomicReference;
-
/*
* Created by Peter Lawrey on 10/03/16.
*/
public enum SystemTimeProvider implements TimeProvider {
INSTANCE;
- static final AtomicReference<TimeProvider> TIME_PROVIDER = new AtomicReference<>(INSTANCE);
-
static {
// warmUp()
for (int i = 0; i < 1000; i++)
=====================================
src/main/java/net/openhft/chronicle/core/time/TimeProvider.java
=====================================
@@ -18,18 +18,12 @@ package net.openhft.chronicle.core.time;
import java.util.concurrent.TimeUnit;
-import static net.openhft.chronicle.core.time.SystemTimeProvider.TIME_PROVIDER;
-
/*
* Created by Peter Lawrey on 10/03/16.
*/
@FunctionalInterface
public interface TimeProvider {
- static TimeProvider get() {
- return TIME_PROVIDER.get();
- }
-
long currentTimeMillis();
default long currentTimeMicros() {
@@ -37,12 +31,19 @@ public interface TimeProvider {
}
default long currentTimeNanos() {
- return currentTimeMillis() * 1000000;
+ return currentTimeMicros() * 1000;
}
default long currentTime(TimeUnit timeUnit) {
- return timeUnit == TimeUnit.MILLISECONDS
- ? currentTimeMillis()
- : timeUnit.convert(currentTimeNanos(), TimeUnit.NANOSECONDS);
+ switch (timeUnit) {
+ case NANOSECONDS:
+ return currentTimeNanos();
+ case MICROSECONDS:
+ return currentTimeMicros();
+ case MILLISECONDS:
+ return currentTimeMillis();
+ default:
+ return timeUnit.convert(currentTimeMillis(), TimeUnit.MILLISECONDS);
+ }
}
}
=====================================
src/main/java/net/openhft/chronicle/core/util/StringUtils.java
=====================================
@@ -386,4 +386,14 @@ public enum StringUtils {
}
return sb.toString();
}
+
+ public static void reverse(StringBuilder text, int start) {
+ int end = text.length() - 1;
+ int mid = (start + end + 1) / 2;
+ for (int i = 0; i < mid - start; i++) {
+ char ch = text.charAt(start + i);
+ text.setCharAt(start + i, text.charAt(end - i));
+ text.setCharAt(end - i, ch);
+ }
+ }
}
View it on GitLab: https://salsa.debian.org/java-team/openhft-chronicle-core/commit/22d4813ef591befea4ca96ba9b15ed6f5783feae
--
View it on GitLab: https://salsa.debian.org/java-team/openhft-chronicle-core/commit/22d4813ef591befea4ca96ba9b15ed6f5783feae
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180914/20c5b7ec/attachment.html>
More information about the pkg-java-commits
mailing list