Skip to content
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

Fix issue with github-plugin-configuration unmarshalling #390

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class GitHubPluginConfig extends GlobalConfiguration {

public GitHubPluginConfig() {
getConfigFile().getXStream().alias("github-server-config", GitHubServerConfig.class);
getConfigFile().getXStream().alias(GITHUB_PLUGIN_CONFIGURATION_ID, GitHubPluginConfig.class);
Comment on lines 87 to +88
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though the actual problem is that load() is called in the constructor it looks like a too involved fix to make that right. Instead all aliases already have a central point where they should be made.

Suggested change
getConfigFile().getXStream().alias("github-server-config", GitHubServerConfig.class);
getConfigFile().getXStream().alias(GITHUB_PLUGIN_CONFIGURATION_ID, GitHubPluginConfig.class);
GitHubPlugin.addXStreamAliases();

And add alias("github-server-config", GitHubServerConfig.class) to org.jenkinsci.plugins.github.migration.Migrator#enableAliases instead.

load();
}

Expand Down
Loading