fixes from PR and export-docs fix

This commit is contained in:
Jonathan Shook 2023-12-15 12:57:03 -06:00
parent 842cca0d9d
commit 8cb3051af2
4 changed files with 7 additions and 14 deletions

View File

@ -103,7 +103,7 @@ public class StandardAction<A extends StandardActivity<R, ?>, R extends Op> impl
if (op instanceof RunnableOp) {
((RunnableOp) op).run();
} else if (op instanceof CycleOp<?>) {
result = ((CycleOp) op).apply(cycle);
result = ((CycleOp<?>) op).apply(cycle);
} else if (op instanceof ChainingOp) {
result = ((ChainingOp) op).apply(result);
} else {

View File

@ -28,9 +28,6 @@ public record CyclesSpec(long first_inclusive, long last_exclusive, String first
if (first_inclusive>last_exclusive) {
throw new InvalidParameterException("cycles must start with a lower first cycle than last cycle");
}
// if (first_inclusive==last_exclusive) {
// logger.warn("This cycles interval means zero total:" + this);
// }
}
public static CyclesSpec parse(String spec) {

View File

@ -47,8 +47,6 @@ public class ParameterMap extends ConcurrentHashMap<String, Object> implements B
private final static Logger logger = LogManager.getLogger("PARAMS");
private final static Gson gson = new GsonBuilder().create();
// private final ConcurrentHashMap<String, String> paramMap = new ConcurrentHashMap<>(10);
private final AtomicLong changeCounter;
private final LinkedList<Listener> listeners = new LinkedList<>();
@ -73,7 +71,6 @@ public class ParameterMap extends ConcurrentHashMap<String, Object> implements B
+ ". Just use one of them.");
}
return Arrays.stream(objects).map(String::valueOf).findAny();
//return Optional.ofNullable(super.get(paramName)).map(String::valueOf);
}
public Optional<String> removeOptionalString(String... paramName) {
@ -181,9 +178,6 @@ public class ParameterMap extends ConcurrentHashMap<String, Object> implements B
public void set(String paramName, Object newValue) {
// if (paramName.equals("cycles")) {
// logger.warn("Setting 'cycles' on the parameter map is likely causing a bug in your activity. Call setCycles on the def instead.");
// }
super.put(paramName, String.valueOf(newValue));
logger.info(() -> "setting param " + paramName + "=" + newValue);
markMutation();

View File

@ -30,9 +30,7 @@ import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.*;
import java.util.function.Function;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -56,9 +54,13 @@ public class BundledMarkdownZipExporter {
DocsBinder docsNameSpaces = BundledMarkdownLoader.loadBundledMarkdown(); //Loads the drivers under @Service Annotation
Set<Path> loaded = new HashSet<>();
for (DocsNameSpace docs_ns : docsNameSpaces) {
for (Path p : docs_ns) {
addEntry(p, p.getParent(), zipstream, docs_ns.getName() + "/");
if (!loaded.contains(p)) {
addEntry(p, p.getParent(), zipstream, docs_ns.getName() + "/");
loaded.add(p);
}
}
}