Skip to content

Commit

Permalink
Remove deprecated QNameModule methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobianas committed Oct 8, 2024
1 parent f55ba29 commit 79cd3aa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ private void resolveType(final TypeDefinition<? extends TypeDefinition<?>> type,
final TypeDefinition<?> rootType = getRootType(type);
final String rootLocalName = rootType.getQName().getLocalName();
if (!Objects.equals(rootLocalName, type.getQName().getLocalName()) && !rootLocalName.equals("boolean")) {
final QNameModule mod = QNameModule.create(type.getQName().getNamespace(), type.getQName().getRevision());
final QNameModule mod = type.getQName().getRevision().isPresent()
? QNameModule.of(type.getQName().getNamespace(), type.getQName().getRevision().get())
: QNameModule.of(type.getQName().getNamespace());

usedImportedTypeDefs.computeIfAbsent(mod, k -> new TreeSet<>(Comparator.comparing(SchemaNode::getQName)))
.add(type);
usedImports.computeIfAbsent(module.getQNameModule(), k -> new HashSet<>())
Expand Down

0 comments on commit 79cd3aa

Please sign in to comment.