-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Throw IllegalArgumentException when find multiple connector jar for one pluginIdentifier #5551
Throw IllegalArgumentException when find multiple connector jar for one pluginIdentifier #5551
Conversation
d972566
to
05a4698
Compare
05a4698
to
5a2847a
Compare
final String engineType = pluginIdentifier.getEngineType().toLowerCase(); | ||
final String pluginType = pluginIdentifier.getPluginType().toLowerCase(); | ||
final String pluginName = pluginIdentifier.getPluginName().toLowerCase(); | ||
if (!pluginConfig.hasPath(engineType)) { | ||
if (pluginMappingConfig.isEmpty() || !pluginMappingConfig.hasPath(engineType)) { |
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.
Any reason for add pluginMappingConfig.isEmpty()
condition? I think if pluginMappingConfig.isEmpty()
is true, the !pluginMappingConfig.hasPath(engineType)
is true too?
@AfterEach | ||
public void after() throws IOException { | ||
for (Path pluginJar : pluginJars) { | ||
Files.deleteIfExists(pluginJar); | ||
} | ||
} |
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.
Should revert seatunnelHome
?
c571ee6
to
a31ba69
Compare
…ne pluginIdentifier
a31ba69
to
71fed74
Compare
…ne pluginIdentifier (apache#5551)
Purpose of this pull request
Right now, we use prefix match to find the target connector, if we have two plugin jars has the same prefix, then the first one will be used, this may cause problems in some cases. So it's needed to throw an exception if we find two plugin jars for a given plugin.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Add UT to test this.
Check list
New License Guide
release-note
.