-
Notifications
You must be signed in to change notification settings - Fork 468
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
[WFCORE-7114] Deprecate use of ModuleIdentifier in ModuleDefinition #6302
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,16 +25,31 @@ public class ModuleDefinition { | |
private final Set<ModuleDependency> dependencies; | ||
private final ModuleSpec moduleSpec; | ||
|
||
|
||
/** @deprecated use {@link #ModuleDefinition(String, Set, ModuleSpec)} */ | ||
@Deprecated(forRemoval = true) | ||
public ModuleDefinition(final ModuleIdentifier moduleIdentifier, final Set<ModuleDependency> dependencies, final ModuleSpec moduleSpec) { | ||
this.moduleIdentifier = moduleIdentifier; | ||
this.dependencies = dependencies; | ||
this.moduleSpec = moduleSpec; | ||
} | ||
|
||
public ModuleDefinition(final String moduleIdentifier, final Set<ModuleDependency> dependencies, final ModuleSpec moduleSpec) { | ||
this.moduleIdentifier = ModuleIdentifier.fromString(moduleIdentifier); // inefficient but this is unused. When we switch the use to this we'll store the string. | ||
this.dependencies = dependencies; | ||
this.moduleSpec = moduleSpec; | ||
} | ||
|
||
/** @deprecated use {@link #getModuleName()} */ | ||
@Deprecated(forRemoval = true) | ||
public ModuleIdentifier getModuleIdentifier() { | ||
return moduleIdentifier; | ||
} | ||
|
||
public String getModuleName() { | ||
return moduleIdentifier.toString(); // inefficient but this is unused. When we switch the use to this we'll store the string. | ||
} | ||
Comment on lines
+49
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if getModuleName is what we would want. The ModuleIdentifier is composed by As additional detail, the JBoss Modules documentation still makes a distinction about what a module name is (https://jboss-modules.github.io/jboss-modules/manual/#names) and what are module identifiers https://jboss-modules.github.io/jboss-modules/manual/#slots There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getModuleIdentifier() is already taken, so .... |
||
|
||
public ModuleSpec getModuleSpec() { | ||
return moduleSpec; | ||
} | ||
|
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.
As a rule of thumb, we are always asking for the since attribute on all @deprecated annotations so we can make an idea without looking at the Git history when it was deprecated.
This can be done later though