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 on refresh

See original GitHub issue

I often receive this exception. When I set a lot of filters before refreshing the change list, there is no exception.

Plugin version: 1.0.0.1-146 IntelliJ version: IntelliJ IDEA 2016.3.7 IU-163.15529.5 OS: Windows 7 6.1 Java: Oracle Corporation 1.8.0_112

Exception:

String index out of range: 9
java.lang.StringIndexOutOfBoundsException: String index out of range: 9
	at java.lang.String.substring(String.java:1963)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel.getHash(GerritChangeListPanel.java:419)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel.generateColumnsInfo(GerritChangeListPanel.java:253)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel.initModel(GerritChangeListPanel.java:232)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel.setChanges(GerritChangeListPanel.java:216)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel$2.consume(GerritChangeListPanel.java:148)
	at com.urswolfer.intellij.plugin.gerrit.ui.GerritChangeListPanel$2.consume(GerritChangeListPanel.java:145)
	at com.urswolfer.intellij.plugin.gerrit.rest.LoadChangesProxy$1.consume(LoadChangesProxy.java:74)
	at com.urswolfer.intellij.plugin.gerrit.rest.LoadChangesProxy$1.consume(LoadChangesProxy.java:63)
	at com.urswolfer.intellij.plugin.gerrit.rest.GerritUtil$20$1$1.run(GerritUtil.java:695)
	at com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:318)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:417)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:401)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:679)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
uwolfercommented, Aug 12, 2017

@saenenjoris: Thanks for your help. I have added a workaround so this error won’t happen anymore even when a change-id is empty.

1reaction
uwolfercommented, Aug 11, 2017

@saenenjoris: Thanks for your feedback.

Can you please get the JSON result of this change? This is what the plugin consumes. You can get it that way: https://gerrit.example.com/a/changes/number (replace number with your change number (the one you see in the url - it’s not the change-id). If this URL does not work, please remove the /a from the URL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting java.lang.StringIndexOutOfBoundsException
I believe it is from the line maze[i][j]= line.charAt(j); because the input from scanner is not guaranteed to be of length j ....
Read more >
String index out of range: 0” when workflow engine is not ...
ERROR : “java.lang.StringIndexOutOfBoundsException: String index out of range: 0” when workflow engine is not starting in 10.1.1 ...
Read more >
java.lang.StringIndexOutOfBoundsException: String index out ...
Hi, We have Oracle 9i Forms environment. OS: AIX 5L Here a report is scheduled as a batch program and the commandis executed...
Read more >
StringIndexOutOfBoundsException: String index out of range ...
StringIndexOutOfBoundsException : String index out of range: 8 when generating HTML report after update to 1.2.0 #2134.
Read more >
java.lang.StringIndexOutOfBoundsException occurs when ...
java.lang.StringIndexOutOfBoundsException occurs when retrieve numeric data using the Connect for JDBC 5.1 DB2 driver · An exception is thrown ...
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