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

IndexOutOfBoundException when using MSDL with an empty section #416

Closed
1 of 5 tasks
ate47 opened this issue Sep 12, 2023 · 0 comments
Closed
1 of 5 tasks

IndexOutOfBoundException when using MSDL with an empty section #416

ate47 opened this issue Sep 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ate47
Copy link
Collaborator

ate47 commented Sep 12, 2023

Part of the endpoint? (leave empty if you don't know)

  • Backend (qendpoint-backend)
  • Store (qendpoint-backend)
  • Core (qendpoint-core)
  • Frontend (qendpoint-frontend)
  • Other

Description of the issue

When searching over a MSDL dictionary with an empty section, here the nonTyped section, the location map is returning the wrong index location.

java.lang.IndexOutOfBoundsException: Trying to access position 0 but PFC has 0 elements.

	at com.the_qa_company.qendpoint.core.dictionary.impl.section.PFCOptimizedExtractor.extract(PFCOptimizedExtractor.java:56)
	at com.the_qa_company.qendpoint.core.dictionary.impl.MultipleSectionDictionaryLangPFCOptimizedExtractor.idToString(MultipleSectionDictionaryLangPFCOptimizedExtractor.java:40)
	at com.the_qa_company.qendpoint.core.iterator.DictionaryTranslateIteratorBuffer.fill(DictionaryTranslateIteratorBuffer.java:107)
	at com.the_qa_company.qendpoint.core.iterator.DictionaryTranslateIteratorBuffer.fetchBlock(DictionaryTranslateIteratorBuffer.java:146)
	at com.the_qa_company.qendpoint.core.iterator.DictionaryTranslateIteratorBuffer.next(DictionaryTranslateIteratorBuffer.java:172)
	at com.the_qa_company.qendpoint.core.iterator.DictionaryTranslateIteratorBuffer.next(DictionaryTranslateIteratorBuffer.java:40)

Excepted behavior

Returning the right map id

Obtained behavior

Having the map

[NSHARED, NSHARED] and the id 1 is returned instead of 0 when searching for "NSHARED"

How to reproduce

  • Create HDT with 0 nonTyped and 100% shared
  • Search over the last shared element

Endpoint version

latest

Do I want to contribute to fix it?

Yes

Something else?

No response

@ate47 ate47 added the bug Something isn't working label Sep 12, 2023
ate47 added a commit that referenced this issue Sep 12, 2023
ate47 added a commit that referenced this issue Sep 12, 2023
@ate47 ate47 mentioned this issue Sep 12, 2023
5 tasks
ate47 added a commit that referenced this issue Sep 12, 2023
@ate47 ate47 closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant