question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StringIndexOutOfBoundsException

See original GitHub issue

reactor.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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
simonbaslecommented, Jan 5, 2021

@marcingrzejszczak I guess it can make sense to have a customized toString(), and here the best course of action is to override stepName() to return something like subscriber.stepName() + "(traced)" or something similar (ie rely on the stepName() of the wrapped subscriber).

0reactions
simonbaslecommented, Feb 4, 2021

superseded by #2526 and fixed by 4de5ab08aa1efa0496de4d2f75adb58f4308c935

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found