Skip to content

Illegal argument exception thrown if the symbol has '$' symbol #132

@adilkaraoz

Description

@adilkaraoz

Describe the bug
A new symbol is added as 'JNJ$', that's why RestManager.java now throws IllegalArgumentException

To Reproduce
Steps to reproduce the behavior:

  1. Request for key stats (as an example, the others also have the same problem) with the symbol 'JNJ$'
  2. IllegalArgumentException will be thrown afterward from RestManager.java

Expected behavior
IllegalArgumentException won't be thrown and the response will be parsed successfully

Additional context
Caused by: java.lang.IllegalArgumentException: Illegal group reference: group index is missing
at java.base/java.util.regex.Matcher.appendExpandedReplacement(Unknown Source)
at java.base/java.util.regex.Matcher.appendReplacement(Unknown Source)
at java.base/java.util.regex.Matcher.replaceFirst(Unknown Source)
at java.base/java.lang.String.replaceFirst(Unknown Source)
at pl.zankowski.iextrading4j.client.rest.manager.RestManager.createPath(RestManager.java:94)
at pl.zankowski.iextrading4j.client.rest.manager.RestManager.createURL(RestManager.java:73)
at pl.zankowski.iextrading4j.client.rest.manager.RestManager.executeRequest(RestManager.java:30)
at pl.zankowski.iextrading4j.client.rest.AbstractRestEndpoint.execute(AbstractRestEndpoint.java:16)
at pl.zankowski.iextrading4j.client.rest.endpoint.GenericRestEndpoint.executeRequest(GenericRestEndpoint.java:14)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions