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

Optional.isEmpty() does not exist in Java 8 #310

Closed
kanru opened this issue Nov 8, 2021 · 1 comment
Closed

Optional.isEmpty() does not exist in Java 8 #310

kanru opened this issue Nov 8, 2021 · 1 comment

Comments

@kanru
Copy link

kanru commented Nov 8, 2021

Describe the bug
Using Java8, generating PlantUML diagram throws exception java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z

To Reproduce
Steps to reproduce the behavior:

  1. Install JDK version 1.8.0_302
  2. Run Context Mapper CLI v6.6.0 with the test.cml file (or using VSCode extension)
  3. See error

Expected behavior
UML diagram is generated with no errors

Screenshots / Exceptions
Exceptions:

Exception in thread "main" java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z
	at org.contextmapper.dsl.generator.PlantUMLGenerator.getAggregatesWithStatesAndTransitions(PlantUMLGenerator.java:120)
	at org.contextmapper.dsl.generator.PlantUMLGenerator.generateFromContextMappingModel(PlantUMLGenerator.java:76)
	at org.contextmapper.dsl.generator.AbstractContextMappingModelGenerator.doGenerate(AbstractContextMappingModelGenerator.java:54)
	at org.contextmapper.dsl.standalone.StandaloneContextMapper.callGenerator(StandaloneContextMapper.java:61)
	at org.contextmapper.cli.commands.GenerateCommand.run(GenerateCommand.java:55)
	at org.contextmapper.cli.ContextMapperCLI.run(ContextMapperCLI.java:49)
	at org.contextmapper.cli.ContextMapperCLI.main(ContextMapperCLI.java:38)

Input files to reproduce

BoundedContext Test {
  Aggregate Test {
    Entity Test {
    }
  }
}

ContextMap TestMap {
  contains Test
}

IDE and Plugin (please complete the following information):

  • VSCode version 1.62.0
  • ContextMapper plugin version v6.6.0

Additional context
Java 11 works fine.

stefan-ka pushed a commit that referenced this issue Nov 30, 2021
stefan-ka added a commit that referenced this issue Nov 30, 2021
@stefan-ka
Copy link
Member

Hi @kanru

Thanks for reporting this one! We fixed this with the bugfix release v6.6.1.

I'll close the issue. Let us know in case you still have problems with Java 8.

Best regards,
Stefan

FYI @socadk

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

No branches or pull requests

2 participants