Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Fixed
- Issue [#322](https://github.com/reportportal/client-java/issues/322): PatternSyntaxException on Android: unescaped '}' in TemplateProcessing regex, by @blundell

## [5.4.14]
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
public class AbstractJoinedLaunch extends LaunchImpl {
final LaunchIdLock lock;
volatile String uuid;
private static final Random random = new Random();
private static final AtomicLong THREAD_COUNTER = new AtomicLong();
private static final ThreadFactory THREAD_FACTORY = r -> {
Thread t = new Thread(r);
Expand All @@ -45,8 +46,7 @@ public class AbstractJoinedLaunch extends LaunchImpl {

private static ScheduledFuture<?> getUpdateTask(String instanceUuid, long updateInterval, LaunchIdLock launchIdLock,
ScheduledExecutorService service) {
Random r = new Random();
int delay = updateInterval > Integer.MAX_VALUE ? r.nextInt(Integer.MAX_VALUE) : r.nextInt((int) updateInterval);
int delay = updateInterval > Integer.MAX_VALUE ? random.nextInt(Integer.MAX_VALUE) : random.nextInt((int) updateInterval);
return service.scheduleWithFixedDelay(
() -> launchIdLock.updateInstanceUuid(instanceUuid),
delay,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class TemplateProcessing {

public static final String NULL_VALUE = "NULL";

private static final Pattern TEMPLATE_GROUP = Pattern.compile("\\{([\\w$]+(\\.[\\w$]+)*)}");
private static final Pattern TEMPLATE_GROUP = Pattern.compile("\\{([\\w$]+(\\.[\\w$]+)*)\\}");

private TemplateProcessing() {
throw new IllegalStateException("Static only class");
Expand Down
Loading