You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method io.smallrye.config.common.utils.StringUtil.toLowerCaseAndDotted(String) is causing a java.lang.StringIndexOutOfBoundsException when faced with an input parameter such as 00_PYTHON_2_7. This issue occurs during deployment of an application into WildFly 26.1.3 using the library smallrye-config-common-2.10.0.jar.
Steps to Reproduce:
Create a unit test similar to the following:
packagedeleteMe;
importorg.junit.Test;
importio.smallrye.config.common.utils.StringUtil;
publicclassSmallRyeStringUtilBugTest {
@TestpublicvoidtoLowerCaseAndDottedTest() {
Stringtemp01 = StringUtil.toLowerCaseAndDotted("Abc_EFD");
// This environment variable is accepted:// String temp02 = StringUtil.toLowerCaseAndDotted("PYTHON_2_7");// However, this environment variable leads to an exceptionStringtemp02 = StringUtil.toLowerCaseAndDotted("00_PYTHON_2_7");
}
}
Expected Behavior:
The method should handle input parameters correctly without causing exceptions.
Actual Behavior:
The method throws a StringIndexOutOfBoundsException when processing certain input strings.
java.lang.StringIndexOutOfBoundsException: start -1, end 0, length 2
at java.base/java.lang.AbstractStringBuilder.checkRangeSIOOBE(AbstractStringBuilder.java:1724)
at java.base/java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:946)
at java.base/java.lang.StringBuilder.replace(StringBuilder.java:302)
at io.smallrye.config.common.utils.StringUtil.toLowerCaseAndDotted(StringUtil.java:118)
at deleteMe.SmallRyeStringUtilBugTest.toLowerCaseAndDottedTest(SmallRyeStringUtilBugTest.java:17)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Thanks.
The text was updated successfully, but these errors were encountered:
Ah, super. Thanks for that information. Then please feel free to close the defect. No, we cannot simply update WildFly whenever we want. We have specific update windows throughout the year to keep up with the latest and most stable runtime technology. However, it's good to know that this update is available.
In any case, this issue is more of a major annoyance and time-consuming for developers who are surprised by it and encounter difficulties deploying applications that others can deploy. Once you're aware of it, you can easily adapt your development environment to work around the problem. So, it's not critical at all once you have that knowledge.
The method
io.smallrye.config.common.utils.StringUtil.toLowerCaseAndDotted(String)
is causing ajava.lang.StringIndexOutOfBoundsException
when faced with an input parameter such as00_PYTHON_2_7
. This issue occurs during deployment of an application into WildFly 26.1.3 using the librarysmallrye-config-common-2.10.0.jar
.Steps to Reproduce:
Expected Behavior:
The method should handle input parameters correctly without causing exceptions.
Actual Behavior:
The method throws a
StringIndexOutOfBoundsException
when processing certain input strings.Environment:
smallrye-config-common-2.10.0.jar
These were the maven dependencies on my pom.xml
Here is the stack trace from wildfly:
For the unit test exception we have:
Thanks.
The text was updated successfully, but these errors were encountered: