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

Register XStream alias even earlier #304

Merged
merged 2 commits into from
Oct 19, 2022
Merged
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 @@ -7,6 +7,8 @@
import org.jenkinsci.plugins.github.migration.Migrator;

import edu.umd.cs.findbugs.annotations.NonNull;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;

import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;

Expand All @@ -23,6 +25,8 @@ public class GitHubPlugin extends Plugin {
* Launched before plugin starts
* Adds alias for {@link GitHubPlugin} to simplify resulting xml.
*/
@Initializer(before = InitMilestone.SYSTEM_CONFIG_LOADED)
@Restricted(DoNotUse.class)
public static void addXStreamAliases() {
Migrator.enableCompatibilityAliases();
Migrator.enableAliases();
Expand All @@ -39,11 +43,6 @@ public static void runMigrator() throws Exception {
new Migrator().migrate();
}

@Override
public void start() throws Exception {
addXStreamAliases();
rsandell marked this conversation as resolved.
Show resolved Hide resolved
}

/**
* Shortcut method for getting instance of {@link GitHubPluginConfig}.
*
Expand Down