-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change yaml parser to yamlbeans #995
Conversation
@@ -278,25 +278,26 @@ public Set<GitHubConfig> getAllGitHubConfig(User user) throws FileNotFoundExcept | |||
return getAllGithubConfig(gitConfigYaml); | |||
} | |||
|
|||
private Set<GitHubConfig> getAllGithubConfig(FileEntry gitConfigYaml) { | |||
protected Set<GitHubConfig> getAllGithubConfig(FileEntry gitConfigYaml) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why modifier was changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was changed it for adding a unit test. But, it doesn't need to change access modifier.
I will change it back to private and add a unit test to verify that successfully parse the .gitconfig.yml
file.
36c3093
to
bd51284
Compare
❌ Build & Test workflow failed ❌ |
|
||
@Before | ||
public void before() throws IOException { | ||
File file = new File(System.getProperty("java.io.tmpdir"), "repo"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about use Junit TempDir?
It will be deleted automatically after test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using junit 4.13.1 😭. And TempDir seems to be supported since Junit5.
Line 4 in f6d0672
junit.version=4.13.1 |
I tried to use TempDir but it fails to get temp directory file via
@TempDir
annotation.
This reverts commit 1a28741.
This reverts commit 1a28741.
snakeyaml 1.x has security vulnerability. So, I tried to bump it up to 2.x. But, the snakeyaml is related to spring framework also. When the snakeyaml is found on classpath, spring try to use the given snakeyaml to handling yaml property file.
Most of spring-boot versions are depend on snakeyaml 1.x except latest version of spring-boot. I think that upgrade spring-boot to latest version will take long time. So, just change the yaml parser to yamlbeans that has most stars library in yaml official website except snakeyaml.