Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions solstice/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format.

## [Unreleased]
### Fixed
- Fix NoSuchElementException if package is not exported
- Update selfie snapshot to fix P2Test

## [1.8.1] - 2025-01-14
Expand Down
14 changes: 8 additions & 6 deletions solstice/src/main/java/dev/equo/solstice/Solstice.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023 EquoTech, Inc. and others.
* Copyright (c) 2023-2026 EquoTech, Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -293,11 +293,13 @@ private boolean pkgExportIsNotDuplicate(
if (thisManifest.totalPkgImports().contains(pkg)) {
return true;
}
var element =
thisManifest.pkgExportsRaw().stream()
.filter(e -> e.getValue().equals(pkg))
.findFirst()
.get();
var elementOpt =
thisManifest.pkgExportsRaw().stream().filter(e -> e.getValue().equals(pkg)).findFirst();
if (elementOpt.isEmpty()) {
return false;
}
var element = elementOpt.get();

String mandatory = element.getDirective("mandatory");
if (mandatory != null) {
if ("split".equals(element.getAttribute(mandatory))) {
Expand Down
Loading