Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing TrailingPE from stock with "-" on this field #23

Closed
nice2h8u opened this issue Jan 20, 2022 · 3 comments
Closed

Error when parsing TrailingPE from stock with "-" on this field #23

nice2h8u opened this issue Jan 20, 2022 · 3 comments

Comments

@nice2h8u
Copy link
Contributor

nice2h8u commented Jan 20, 2022

There is empty fields with "-".
For example:

AlphaVantage.api()
                .fundamentalData()
                .companyOverview()
                .forSymbol("YNDX")
                .fetchSync();
@crazzyghost
Copy link
Owner

Nice catch @nice2h8u. Assuming the "-" means the TrailingPE value is null or empty, these lines would need to be updated to include "-" to fix this.

return s.equalsIgnoreCase("none") ? null: Double.valueOf(s);

return s.equalsIgnoreCase("none") ? null: Long.valueOf(s);

Do you mind working on this, or I should fix?

@nice2h8u
Copy link
Contributor Author

Oh I will try to solve this.

nice2h8u added a commit to nice2h8u/alphavantage-java that referenced this issue Jan 26, 2022
nice2h8u pushed a commit to nice2h8u/alphavantage-java that referenced this issue Jan 29, 2022
crazzyghost pushed a commit that referenced this issue Jan 29, 2022
* #23 fix number parsing bug

Co-authored-by: Ilya <nagibatr777>
@crazzyghost
Copy link
Owner

@nice2h8u great job fixing this in v1.6.2 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants