Skip to content

Directory structure of elasticsearch-java-8.0.0-SNAPSHOT.jar contains /./ #5

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

Closed
sothawo opened this issue Jun 7, 2021 · 1 comment · Fixed by #6
Closed

Directory structure of elasticsearch-java-8.0.0-SNAPSHOT.jar contains /./ #5

sothawo opened this issue Jun 7, 2021 · 1 comment · Fixed by #6

Comments

@sothawo
Copy link
Contributor

sothawo commented Jun 7, 2021

Not sure if this is an issue with the generated code, my IntelliJ setup or perhaps a bug in IntelliJ I am using the current version 2021.1.1).

I just want to write the code to create a SearchRequest.Builder and add some values.

When I have entered

SearchRequest.Builder builder = new SearchRequest.Builder();
builder.i

just after entering the i after the period, when IntelliJ IDEA is starting to autocomplete, the UI freezes and in the IntelliJ logs I can see, that the JVM is running out of heap space. Happens on two machines, the first has IDEA configured with 8GB heap, the second with 16GB.

Is this working for other people using IntelliJ IDEA?

@sothawo
Copy link
Contributor Author

sothawo commented Jun 7, 2021

After JetBrains had a look at this issue they found that the directory structure of the elasticsearch-java-8.0.0-SNAPSHOT.jar is somewhat strange:

$ jar tf elasticsearch-java-8.0.0-SNAPSHOT.jar.bak | head
META-INF/
META-INF/MANIFEST.MF
META-INF/./
META-INF/./LICENSE.txt
META-INF/./NOTICE.txt
co/
co/elastic/
co/elastic/clients/
co/elastic/clients/util/
co/elastic/clients/util/Union3$Tag.class

The license and notice file are in a subdirectory named /./. This causes IntelliJ to run into a recursion.

I extracted all the files and repackaged them so that the directory structure now is:

 jar tf elasticsearch-java-8.0.0-SNAPSHOT.jar | head
META-INF/
META-INF/MANIFEST.MF
META-INF/NOTICE.txt
META-INF/LICENSE.txt
co/
co/elastic/
co/elastic/clients/
co/elastic/clients/util/
co/elastic/clients/util/Union3$Tag.class
co/elastic/clients/util/QuadConsumer.class

With this I have no problems anymore with the code completion.

Is this a bug in the setup how the jar file is built?

@sothawo sothawo changed the title Using autocompletion in IntelliJ IDEA for the generated builders causes IDE to run out of memory Directory structure of elasticsearch-java-8.0.0-SNAPSHOT.jar contains /./ Jun 7, 2021
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

Successfully merging a pull request may close this issue.

1 participant