MCPcopy Create free account
hub / github.com/LFYSec/MScan / writeOptions

Method writeOptions

src/main/java/pascal/taie/config/Options.java:399–411  ·  view source on GitHub ↗

Writes options to given file.

(Options options, File output)

Source from the content-addressed store, hash-verified

397 * Writes options to given file.
398 */
399 private static void writeOptions(Options options, File output) {
400 ObjectMapper mapper = new ObjectMapper(
401 new YAMLFactory()
402 .disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER)
403 .enable(YAMLGenerator.Feature.MINIMIZE_QUOTES));
404 try {
405 logger.info("Writing options to {}", output.getAbsolutePath());
406 mapper.writeValue(output, options);
407 } catch (IOException e) {
408 throw new ConfigException("Failed to write options to "
409 + output.getAbsolutePath(), e);
410 }
411 }
412
413 /**
414 * Represents a file that supports placeholder and automatically replaces it

Callers 1

postProcessMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected