Skip to content

Commit

Permalink
Actually fix null package issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Oct 13, 2023
1 parent ff7d8e4 commit 1e15bd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'dev.lukebemish.docpatcher'
version = '0.2.5'
version = '0.2.6'

java {
// I don't feel like dealing with old java...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private String simplifyName(CtElement context, CtType<?> type, @Nullable CtEleme
return type.getSimpleName();
}
CtType<?> contextType = context instanceof CtType ? (CtType<?>) context : context.getParent(CtType.class);
if (contextType != null && contextType.getPackage() != null && contextType.getPackage().getQualifiedName().equals(type.getPackage().getQualifiedName())) {
if (contextType != null && contextType.getPackage() != null && type.getPackage() != null && contextType.getPackage().getQualifiedName().equals(type.getPackage().getQualifiedName())) {
return type.getSimpleName();
}
CtCompilationUnit parentUnit = original.getPosition().getCompilationUnit();
Expand Down

0 comments on commit 1e15bd8

Please sign in to comment.