AuthMe/ConfigMe

Remove YamlFileResource#yamlObject

ljacqu opened this issue · 1 comments

ljacqu commented

With the recent refactoring to export everything via SnakeYAML nodes, the field yamlObject in YamlFileResource has become obsolete as the SnakeYAML instance is only used once. I didn't want to clean it up immediately because it also involves removing various other methods, which we'll take care of in ConfigMe 2.0.

In the class YamlFileResource:

  • Replace the only usage of getYamlObject with createNewYaml
  • Remove method onWriteComplete -> probably has no point for anyone anymore?
  • Remove the field yamlObject
  • Rename createNewYaml to createYamlInstance or similar? (Maybe createSnakeYamlInstance is more descriptive?)

Hi @ljacqu I have raised the PR with required refactoring changes, please review 😊