@Test public void canParse() { when(blob.get()).thenAnswer( stream -> getClass().getResourceAsStream("conanmanifest.txt")); AttributesMap attributesMap = ConanManifest.parse(blob); assertTrue(attributesMap.get(".c_src/CMakeLists.txt").equals("9fd53df6571335b5080891a9b40e66b2")); assertTrue(attributesMap.get("conanfile.py").equals("9ea8083ad1c71182fa64ca0378bade18")); }
public static AttributesMap parse(InputStream conanManifestContentStream) { AttributesMap attributesMap = new AttributesMap(); try(BufferedReader reader = new BufferedReader(new InputStreamReader(conanManifestContentStream))) { String line; while ((line = reader.readLine()) != null) { String[] split = line.split(":"); if (split.length == 2) { attributesMap.set(split[0].trim(), split[1].trim()); } } } catch (IOException e) { LOGGER.warn("Unable to convertKeys manifest file"); } return attributesMap; }
ConanManifest { public static AttributesMap parse(InputStream conanManifestContentStream) { AttributesMap attributesMap = new AttributesMap(); try(BufferedReader reader = new BufferedReader(new InputStreamReader(conanManifestContentStream))) { String line; while ((line = reader.readLine()) != null) { String[] split = line.split(":"); if (split.length == 2) { attributesMap.set(split[0].trim(), split[1].trim()); } } } catch (IOException e) { LOGGER.warn("Unable to convertKeys manifest file"); } return attributesMap; } }
ConanManifest { public static AttributesMap parse(InputStream conanManifestContentStream) { AttributesMap attributesMap = new AttributesMap(); try(BufferedReader reader = new BufferedReader(new InputStreamReader(conanManifestContentStream))) { String line; while ((line = reader.readLine()) != null) { String[] split = line.split(":"); if (split.length == 2) { attributesMap.set(split[0].trim(), split[1].trim()); } } } catch (IOException e) { LOGGER.warn("Unable to convertKeys manifest file"); } return attributesMap; }  }
ConanManifest { public static AttributesMap parse(InputStream conanManifestContentStream) { AttributesMap attributesMap = new AttributesMap(); try(BufferedReader reader = new BufferedReader(new InputStreamReader(conanManifestContentStream))) { String line; while ((line = reader.readLine()) != null) { String[] split = line.split(":"); if (split.length == 2) { attributesMap.set(split[0].trim(), split[1].trim()); } } } catch (IOException e) { LOGGER.warn("Unable to convertKeys manifest file"); } return attributesMap; }  static AttributesMap parse(InputStream conanManifestContentStream); static AttributesMap parse(TempBlob blob); }
ConanManifest { public static AttributesMap parse(InputStream conanManifestContentStream) { AttributesMap attributesMap = new AttributesMap(); try(BufferedReader reader = new BufferedReader(new InputStreamReader(conanManifestContentStream))) { String line; while ((line = reader.readLine()) != null) { String[] split = line.split(":"); if (split.length == 2) { attributesMap.set(split[0].trim(), split[1].trim()); } } } catch (IOException e) { LOGGER.warn("Unable to convertKeys manifest file"); } return attributesMap; }  static AttributesMap parse(InputStream conanManifestContentStream); static AttributesMap parse(TempBlob blob);  }