Skip to content

Commit

Permalink
Fixes #303 (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Riduidel authored Dec 15, 2022
1 parent c89b716 commit 65d62f4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
--add-opens java.base/java.lang=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<version.structurizr.annotations>1.3.5</version.structurizr.annotations>
<version.jsoup>1.15.3</version.jsoup>
<version.junit>5.9.1</version.junit>
<error-prone.version>2.16</error-prone.version>
</properties>
<scm>
<connection>scm:git:git@github.com:Riduidel/aadarchi.git</connection>
Expand Down Expand Up @@ -211,6 +212,21 @@
<version>3.10.1</version>
<configuration>
<release>${maven.compiler.release}</release>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
<!-- Other annotation processors go here.
If 'annotationProcessorPaths' is set, processors will no longer be
discovered on the regular -classpath; see also 'Using Error Prone
together with other annotation processors' below. -->
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public <Type extends CodeRepresentation> Optional<Type> containerOfType(Class<Ty
return Optional.of(clazz.cast(this));
if(parent.isPresent()) {
CodeRepresentation parentRepresentation = parent.get();
if(clazz.isInstance(clazz)) {
if(clazz.isInstance(parentRepresentation)) {
return Optional.of(clazz.cast(parentRepresentation));
} else {
return parentRepresentation.containerOfType(clazz);
Expand Down

0 comments on commit 65d62f4

Please sign in to comment.