java.lang.StringIndexOutOfBoundsException: length=1; index=1

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 Coderanch by kalyan enganti, 1 year ago
String index out of range: 658
via GitHub by ElBarto90
, 2 years ago
String index out of range: 0
via Stack Overflow by Mark
, 6 months ago
via Oracle Community by 807600, 2 months ago
String index out of range: 0
java.lang.StringIndexOutOfBoundsException: length=1; index=1
at java.lang.String.charAt(Native Method)
at com.adguard.filter.rules.CssFilterRule.parsePseudoClass(CssFilterRule.java:169)
at com.adguard.filter.rules.CssFilterRule.(CssFilterRule.java:102)
at com.adguard.filter.rules.FilterRule.createRule(FilterRule.java:104)
at com.adguard.filter.filters.RequestFilter.addRule(RequestFilter.java:80)
at com.adguard.filter.filters.RequestFilter.addRules(RequestFilter.java:96)
at com.adguard.android.filtering.filter.HttpFilter.initialize(HttpFilter.java:118)
at com.adguard.android.service.ProtectionServiceImpl.initializeHttpFilter(ProtectionServiceImpl.java:286)
at com.adguard.android.service.ProtectionServiceImpl.configureHttpFilter(ProtectionServiceImpl.java:303)
at com.adguard.android.service.ProtectionServiceImpl.access$400(ProtectionServiceImpl.java:35)
at com.adguard.android.service.ProtectionServiceImpl$StartVpnServiceTask.processTask(ProtectionServiceImpl.java:320)
at com.adguard.android.service.LongRunningTask.execute(LongRunningTask.java:46)
at com.adguard.commons.concurrent.DispatcherThreadPool$DispatcherTaskRunner.run(DispatcherThreadPool.java:206)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

4 times, 4 months ago
6 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
2 times, 1 year ago
43 more bugmates

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