sadv1r / ansible-vault-editor-idea-plugin

Ansible Vault Editor IntelliJ Plugin with auto encryption/decryption
https://plugins.jetbrains.com/plugin/14278-ansible-vault-editor
MIT License
36 stars 5 forks source link

Fixed wrong line separators: '\r\n' #237

Closed sadv1r closed 9 months ago

sadv1r commented 9 months ago

For some reason, EditorFactory has no method with control parameter for \r validity and we need to cast EditorFactory to EditorFactoryImpl. We can do it safely, for example:

    decryptedDocument = (editorFactory as? EditorFactoryImpl)?.createDocument(
        decryptedDocumentData.toString(Charsets.UTF_8),
        true, false
    ) ?: editorFactory.createDocument(
        decryptedDocumentData.toString(Charsets.UTF_8)
    )

But it's a pretty old API and JetBrains is just using cast everywhere, so I did the same

github-actions[bot] commented 9 months ago

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked ☁️ View the detailed Qodana report

Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions