(refac) Clean up code issues
This commit is contained in:
parent
5cdb07023b
commit
2201b1a506
@ -127,7 +127,7 @@ public class EdgeDomain implements Serializable {
|
||||
ret.append(topDomain, 0, cutPoint);
|
||||
}
|
||||
|
||||
if (!"".equals(subDomain) && !"www".equals(subDomain)) {
|
||||
if (!subDomain.isEmpty() && !"www".equals(subDomain)) {
|
||||
ret.append(":");
|
||||
ret.append(subDomain);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public class LinkParser {
|
||||
}
|
||||
|
||||
private boolean isUrlRelevant(String href) {
|
||||
if (null == href || "".equals(href)) {
|
||||
if (null == href || href.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
if (href.length() > 128) {
|
||||
|
@ -56,7 +56,7 @@ public class IndexMetadataService {
|
||||
continue;
|
||||
}
|
||||
|
||||
long id = searchTermsUtil.getWordId(term);
|
||||
long id = SearchTermsUtil.getWordId(term);
|
||||
termIdsList.add(id);
|
||||
termToId.put(term, id);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class SearchSetsService {
|
||||
return anySet;
|
||||
}
|
||||
|
||||
if ("NONE".equals(searchSetIdentifier) || "".equals(searchSetIdentifier)) {
|
||||
if ("NONE".equals(searchSetIdentifier) || searchSetIdentifier.isEmpty()) {
|
||||
return anySet;
|
||||
}
|
||||
|
||||
|
@ -20,9 +20,7 @@ public record ProcessHeartbeat(
|
||||
}
|
||||
public String progressStyle() {
|
||||
if ("RUNNING".equals(status) && progress != null) {
|
||||
return """
|
||||
background: linear-gradient(90deg, #ccc 0%%, #ccc %d%%, #fff %d%%)
|
||||
""".formatted(progress, progress, progress);
|
||||
return STR."background: linear-gradient(90deg, #ccc 0%, #ccc \{progress}%, #fff \{progress}%)";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -21,9 +21,7 @@ public record TaskHeartbeat(
|
||||
|
||||
public String progressStyle() {
|
||||
if ("RUNNING".equals(status) && progress != null) {
|
||||
return """
|
||||
background: linear-gradient(90deg, #ccc 0%%, #ccc %d%%, #fff %d%%)
|
||||
""".formatted(progress, progress, progress);
|
||||
return STR."background: linear-gradient(90deg, #ccc 0%, #ccc \{progress}%, #fff \{progress}%)";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ public class ActorProcessWatcher {
|
||||
public MqMessage waitResponse(MqOutbox outbox, ProcessService.ProcessId processId, long msgId)
|
||||
throws ActorControlFlowException, InterruptedException, SQLException
|
||||
{
|
||||
// enums values only have a single instance,
|
||||
// so it's safe to synchronize on them
|
||||
// even though it looks a bit weird to
|
||||
// synchronize on a parameter like this:
|
||||
synchronized (processId) {
|
||||
// Wake up the process spawning actor
|
||||
processId.notifyAll();
|
||||
|
Loading…
Reference in New Issue
Block a user