Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. Start or end index provided to substring method outside the range of String indices
    Java Runtime
    302
    803
    195

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
    at java.lang.String.substring(String.java:1937)
    at org.springframework.ide.eclipse.data.jdt.core.QueryMethodCandidate.getPartAtPosition(QueryMethodCandidate.java:66)
    at org.springframework.ide.eclipse.data.jdt.core.EntityPropertyCompletionProposals.computeCompletionProposals(EntityPropertyCompletionProposals.java:109)
    at org.springframework.ide.eclipse.data.jdt.core.EntityPropertyCompletionProposals.computeCompletionProposals(EntityPropertyCompletionProposals.java:75)
21 frames hidden

Solution

rp3 years ago

Ensure that the start and end indices for the substring are within range of the String's start and end indices

External results for this pattern (10)

  1. 843789via Oracle Community3 weeks ago
    String index out of range: 45
    Show stack trace
  2. nicolatimeusvia GitHub3 weeks ago
    String index out of range: -10
    Show stack trace
  3. CreeperHangvia GitHub3 weeks ago
    String index out of range: -1
    Show stack trace
  4. lightlikevia GitHub3 weeks ago
    String index out of range: -1
    Show stack trace
  5. bin4rym4gevia GitHub3 weeks ago
    String index out of range: 2
    Show stack trace
  6. zachbrvia GitHub3 weeks ago
    String index out of range: -279
    Show stack trace
  7. Patryk003via GitHub3 weeks ago
    String index out of range: -1
    Show stack trace
  8. musketyrvia GitHub3 weeks ago
    String index out of range: 5
    Show stack trace
  9. pedrorijo91via GitHub3 weeks ago
    String index out of range: -1
    Show stack trace
  10. smolavia GitHub4 weeks ago
    exception writing response
    Show stack trace