@Test public void readPartial() throws IOException { CDepManifestYml partial = CDepManifestYmlUtils.convertStringToManifest( FileUtils.readAllText(new File("../third_party/stb/cdep/cdep-manifest-divide.yml"))); }
@NotNull public static CDepManifestYml convertStringToManifest(@NotNull String content) { Yaml yaml = new Yaml(new Constructor(CDepManifestYml.class)); CDepManifestYml manifest; try { manifest = (CDepManifestYml) yaml.load( new ByteArrayInputStream(content.getBytes(StandardCharsets .UTF_8))); if (manifest != null) { manifest.sourceVersion = CDepManifestYmlVersion.vlatest; } } catch (YAMLException e) { try { manifest = V3Reader.convertStringToManifest(content); } catch (YAMLException e2) { require(false, e.toString()); return new CDepManifestYml( EMPTY_COORDINATE ); } } require(manifest != null, "Manifest was empty"); assert manifest != null; return new ConvertNullToDefaultRewriter().visitCDepManifestYml(manifest); }
CDepManifestYmlUtils { @NotNull public static CDepManifestYml convertStringToManifest(@NotNull String content) { Yaml yaml = new Yaml(new Constructor(CDepManifestYml.class)); CDepManifestYml manifest; try { manifest = (CDepManifestYml) yaml.load( new ByteArrayInputStream(content.getBytes(StandardCharsets .UTF_8))); if (manifest != null) { manifest.sourceVersion = CDepManifestYmlVersion.vlatest; } } catch (YAMLException e) { try { manifest = V3Reader.convertStringToManifest(content); } catch (YAMLException e2) { require(false, e.toString()); return new CDepManifestYml( EMPTY_COORDINATE ); } } require(manifest != null, "Manifest was empty"); assert manifest != null; return new ConvertNullToDefaultRewriter().visitCDepManifestYml(manifest); } }
CDepManifestYmlUtils { @NotNull public static CDepManifestYml convertStringToManifest(@NotNull String content) { Yaml yaml = new Yaml(new Constructor(CDepManifestYml.class)); CDepManifestYml manifest; try { manifest = (CDepManifestYml) yaml.load( new ByteArrayInputStream(content.getBytes(StandardCharsets .UTF_8))); if (manifest != null) { manifest.sourceVersion = CDepManifestYmlVersion.vlatest; } } catch (YAMLException e) { try { manifest = V3Reader.convertStringToManifest(content); } catch (YAMLException e2) { require(false, e.toString()); return new CDepManifestYml( EMPTY_COORDINATE ); } } require(manifest != null, "Manifest was empty"); assert manifest != null; return new ConvertNullToDefaultRewriter().visitCDepManifestYml(manifest); }  }
CDepManifestYmlUtils { @NotNull public static CDepManifestYml convertStringToManifest(@NotNull String content) { Yaml yaml = new Yaml(new Constructor(CDepManifestYml.class)); CDepManifestYml manifest; try { manifest = (CDepManifestYml) yaml.load( new ByteArrayInputStream(content.getBytes(StandardCharsets .UTF_8))); if (manifest != null) { manifest.sourceVersion = CDepManifestYmlVersion.vlatest; } } catch (YAMLException e) { try { manifest = V3Reader.convertStringToManifest(content); } catch (YAMLException e2) { require(false, e.toString()); return new CDepManifestYml( EMPTY_COORDINATE ); } } require(manifest != null, "Manifest was empty"); assert manifest != null; return new ConvertNullToDefaultRewriter().visitCDepManifestYml(manifest); }  @NotNull static String convertManifestToString(@NotNull CDepManifestYml manifest); @NotNull static CDepManifestYml convertStringToManifest(@NotNull String content); static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml); @NotNull static List<HardNameDependency> getTransitiveDependencies(@NotNull CDepManifestYml cdepManifestYml); }
CDepManifestYmlUtils { @NotNull public static CDepManifestYml convertStringToManifest(@NotNull String content) { Yaml yaml = new Yaml(new Constructor(CDepManifestYml.class)); CDepManifestYml manifest; try { manifest = (CDepManifestYml) yaml.load( new ByteArrayInputStream(content.getBytes(StandardCharsets .UTF_8))); if (manifest != null) { manifest.sourceVersion = CDepManifestYmlVersion.vlatest; } } catch (YAMLException e) { try { manifest = V3Reader.convertStringToManifest(content); } catch (YAMLException e2) { require(false, e.toString()); return new CDepManifestYml( EMPTY_COORDINATE ); } } require(manifest != null, "Manifest was empty"); assert manifest != null; return new ConvertNullToDefaultRewriter().visitCDepManifestYml(manifest); }  @NotNull static String convertManifestToString(@NotNull CDepManifestYml manifest); @NotNull static CDepManifestYml convertStringToManifest(@NotNull String content); static void checkManifestSanity(@NotNull CDepManifestYml cdepManifestYml); @NotNull static List<HardNameDependency> getTransitiveDependencies(@NotNull CDepManifestYml cdepManifestYml);  }