java.lang.StringIndexOutOfBoundsException: String index out of range: -4

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.

,
via oracle.com by Unknown author

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.

Solutions on the web

via Google Groups by Gerd Katzenbeisser, 1 year ago
String index out of range: -4
via GitHub by arvindsv
, 1 year ago
via Stack Overflow by ootklm
, 1 year ago
String index out of range: -1
via stackexchange.com by Unknown author, 1 year ago
via Google Groups by Unknown author, 1 year ago
via GitHub by tomzo
, 1 year ago
String index out of range: -4
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.lang.String.charAt(Unknown Source)
at org.bouncycastle.util.encoders.Base64Encoder.decode(Unknown Source)
at org.bouncycastle.util.io.pem.PemReader.loadObject(Unknown Source)
at com.thoughtworks.go.security.Registration.fromJson(Registration.java:49)

Users with the same issue

Once, 2 months ago
Once, 2 months ago
3 times, 3 months ago
2 times, 3 months ago
Once, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.