Skip to content

Commit

Permalink
fix(core): no longer lowercasing PluginClassIdentifier to have proper…
Browse files Browse the repository at this point in the history
… validation upon Plugin deserialization

closes #7387
  • Loading branch information
brian-mulier-p committed Feb 28, 2025
1 parent cacbd06 commit 17e5413
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static ClassTypeIdentifier create(final String identifier) {
if (identifier == null || identifier.isBlank()) {
throw new IllegalArgumentException("Cannot create plugin identifier from null or empty string");
}
return new ClassTypeIdentifier(identifier.toLowerCase(Locale.ROOT));
return new ClassTypeIdentifier(identifier);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.kestra.core.plugins;

import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class ClassTypeIdentifierTest {
@Test
void caseMatters() {
String identifier = "io.kestra.core.plugins.serdes.PluginDeserializerTest.TestPlugin";
assertThat(
DefaultPluginRegistry.ClassTypeIdentifier.create(identifier).type(),
is(identifier)
);
}
}

0 comments on commit 17e5413

Please sign in to comment.