You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Raphael Jean (JIRA)" <hi...@jakarta.apache.org> on 2005/08/10 16:53:35 UTC
[jira] Created: (HIVEMIND-145) StringIndexOutOfBoundsException when resolving a localized resource without extension
StringIndexOutOfBoundsException when resolving a localized resource without extension
-------------------------------------------------------------------------------------
Key: HIVEMIND-145
URL: http://issues.apache.org/jira/browse/HIVEMIND-145
Project: HiveMind
Type: Bug
Components: framework
Versions: 1.1
Environment: Rev 230890
Reporter: Raphael Jean
When accessing a classpath or context resource that doesn't have an extension, like /foo/bar/home, a StringIndexOutOfBoundsException is thrown:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1444)
at org.apache.hivemind.util.LocalizedContextResourceFinder.resolve(LocalizedContextResourceFinder.java:52)
at org.apache.hivemind.util.TestLocalizedContextResourceFinder.testExtensionlessResource(TestLocalizedContextResourceFinder.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
This is similar to TAPESTRY-526
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
[jira] Updated: (HIVEMIND-145) StringIndexOutOfBoundsException when resolving a localized resource without extension
Posted by "Raphael Jean (JIRA)" <hi...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/HIVEMIND-145?page=all ]
Raphael Jean updated HIVEMIND-145:
----------------------------------
Attachment: extensionlessResource.patch
Patch that fixes the problem for classpath resources, context resources and file resources.
Created corresponding test for each one.
All test suites run successfully.
> StringIndexOutOfBoundsException when resolving a localized resource without extension
> -------------------------------------------------------------------------------------
>
> Key: HIVEMIND-145
> URL: http://issues.apache.org/jira/browse/HIVEMIND-145
> Project: HiveMind
> Type: Bug
> Components: framework
> Versions: 1.1
> Environment: Rev 230890
> Reporter: Raphael Jean
> Attachments: extensionlessResource.patch
>
> When accessing a classpath or context resource that doesn't have an extension, like /foo/bar/home, a StringIndexOutOfBoundsException is thrown:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1444)
> at org.apache.hivemind.util.LocalizedContextResourceFinder.resolve(LocalizedContextResourceFinder.java:52)
> at org.apache.hivemind.util.TestLocalizedContextResourceFinder.testExtensionlessResource(TestLocalizedContextResourceFinder.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> This is similar to TAPESTRY-526
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
[jira] Resolved: (HIVEMIND-145) StringIndexOutOfBoundsException when resolving a localized resource without extension
Posted by "Achim Hügen (JIRA)" <hi...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/HIVEMIND-145?page=all ]
Achim Hügen resolved HIVEMIND-145:
----------------------------------
Fix Version: 1.1
Resolution: Fixed
Thanks for the patch.
> StringIndexOutOfBoundsException when resolving a localized resource without extension
> -------------------------------------------------------------------------------------
>
> Key: HIVEMIND-145
> URL: http://issues.apache.org/jira/browse/HIVEMIND-145
> Project: HiveMind
> Type: Bug
> Components: framework
> Versions: 1.1
> Environment: Rev 230890
> Reporter: Raphael Jean
> Fix For: 1.1
> Attachments: extensionlessResource.patch
>
> When accessing a classpath or context resource that doesn't have an extension, like /foo/bar/home, a StringIndexOutOfBoundsException is thrown:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1444)
> at org.apache.hivemind.util.LocalizedContextResourceFinder.resolve(LocalizedContextResourceFinder.java:52)
> at org.apache.hivemind.util.TestLocalizedContextResourceFinder.testExtensionlessResource(TestLocalizedContextResourceFinder.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> This is similar to TAPESTRY-526
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org