StringIndexOutOfBoundsException
See original GitHub issuereactor.core.Scannable, method stepName
This code:
name = name
.substring(0, name.indexOf('$'))
.substring(name.lastIndexOf('.') + 1);
throws .StringIndexOutOfBoundsException for name:
ScopePassingSpanSubscriber{subscriber=reactor.core.publisher.MonoNext$NextSubscriber@1bf6ebc, parent=org.springframework.cloud.sleuth.api.noop.NoOpTraceContext@7110297e}
I don’t think I need to explain why
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
StringIndexOutOfBoundsException (Java Platform SE 7 )
Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods...
Read more >How to Handle String Index Out Of Bounds Exception in Java
The StringIndexOutOfBoundsException is an unchecked exception in Java that occurs when an attempt is made to access the character of a ...
Read more >How to handle StringIndexOutOfBoundsException in Java?
If you try to access the character of a String at the index which is greater than its length a StringIndexOutOfBoundsException is thrown....
Read more >Java - StringIndexOutOfBoundsException - Stack Overflow
When you're in the last iteration, you're trying to access the char in the string at the position i+1 which doesn't exists.
Read more >How to solve stringindexoutofboundsexception - CodeProject
is a seperate function which insert the line into an array list. When I compile the program it throws an exception.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@marcingrzejszczak I guess it can make sense to have a customized
toString()
, and here the best course of action is to overridestepName()
to return something likesubscriber.stepName() + "(traced)"
or something similar (ie rely on thestepName()
of the wrapped subscriber).superseded by #2526 and fixed by 4de5ab08aa1efa0496de4d2f75adb58f4308c935