-
-
Notifications
You must be signed in to change notification settings - Fork 18
Fix selection of multiple target platforms in explore tab #364
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
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughPreselects compatible platform targets in the Explore UI, switches platform filtering to a PLATFORM_LIST criterion, eagerly fetches bundles and targets in repository queries, updates mappers to derive bundle names from the remote package name (method signature changes), and marks certain bundle name fields/accessors as @deprecated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as ExploreController
participant SVC as ExploreService
participant REPO as RemotePackageRepository
participant DB as JPA/DB
rect rgb(247,249,255)
note over UI: Initialization
UI->>UI: Read compatible platform tags from defaults
UI->>UI: Preselect target checkboxes
UI->>SVC: performPackageSearch(criteria incl. PLATFORM_LIST)
end
rect rgb(245,255,245)
note over SVC,REPO: Search flow
SVC->>REPO: sourceEnabled() AND fetchBundlesAndTargets()
REPO->>DB: JPA fetch bundles (inner) and targets (left)
REPO-->>SVC: Spec with eager fetch
SVC->>REPO: Apply toSpecification(criteriaList) (includes PLATFORM_LIST)
REPO->>DB: Query with filters (bundles+targets fetched)
DB-->>SVC: RemotePackage results
SVC-->>UI: displayPackages(results)
end
sequenceDiagram
autonumber
participant REG as RegistryModelAdapter
participant OAS as OASModelAdapter
participant RP as RemotePackage (target)
note over REG: Registry mapping
REG->>RP: jsonMapperToEntity(bundleMapper, remotePackage.name)
note right of RP: bundle.name = "<remotePackage.name> - <targets>"
note over OAS: OAS mapping
OAS->>RP: mapperToEntity(file, remotePackage.name)
note right of RP: bundle.name = "<remotePackage.name> - <targets>"
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
e4be7fe to
0a4444c
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java (2)
94-107: Null-safety on registry fields.
getSystems(),getArchitectures(), andgetContains()may be null; current loops can NPE. Also,file.getType()check below can NPE. Guard them.- List<String> targets = new ArrayList<>(); - for (OASFile.System system : file.getSystems()) { - for (String arch : file.getArchitectures()) { - targets.add(system.getType() + "-" + arch); - } - } + List<String> targets = new ArrayList<>(); + List<OASFile.System> systems = file.getSystems() != null ? file.getSystems() : List.of(); + List<String> archs = file.getArchitectures() != null ? file.getArchitectures() : List.of(); + for (OASFile.System system : systems) { + String sys = system != null && system.getType() != null ? system.getType() : "unknown"; + for (String arch : archs) { + String a = arch != null ? arch : "unknown"; + targets.add(sys + "-" + a); + } + }
136-147: Return a modifiable list and normalize case.
stream().toList()returns an unmodifiable list (JDK 16+). Hibernate may need to mutate ElementCollections. Also normalize input case to avoid mismatches.- private static List<String> getPluginFormatsFromFileFormats(List<String> fileFormats) { - HashSet<String> pluginFormats = new HashSet<>(); - for (String format : fileFormats) { + private static List<String> getPluginFormatsFromFileFormats(List<String> fileFormats) { + HashSet<String> pluginFormats = new HashSet<>(); + if (fileFormats == null) return java.util.Collections.emptyList(); + for (String fmt : fileFormats) { + if (fmt == null) continue; + String format = fmt.toLowerCase(); switch (format) { case "component" -> pluginFormats.add("au"); case "lv2" -> pluginFormats.add("lv2"); case "vst3" -> pluginFormats.add("vst3"); case "so", "vst", "dll" -> pluginFormats.add("vst2"); } } - return pluginFormats.stream().toList(); + return new java.util.ArrayList<>(pluginFormats); }
🧹 Nitpick comments (7)
owlplug-client/src/main/java/com/owlplug/explore/model/PackageBundle.java (2)
39-41: Deprecating only the field makes intent unclear—document or align accessors.If "name" is truly legacy, consider deprecating getters/setters too (or add Javadoc explaining transitional use) so call sites surface warnings when you’re ready to migrate.
- private String name; + @Deprecated + private String name; + + /** + * Deprecated: UI should derive display names from RemotePackage + targets. + */ + @Deprecated + public String getName() { return name; } + + /** + * Deprecated: UI should derive display names from RemotePackage + targets. + */ + @Deprecated + public void setName(String name) { this.name = name; }
44-46: Remove deprecatedformatfield and its accessors fromPackageBundle. No external calls togetFormat/setFormatonPackageBundlewere found; delete the field (lines 44–46) and its getter/setter methods (lines 131–139).owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java (1)
112-127: Avoid recomputation; check file type null.
getPluginFormatsFromFileFormatsis called twice; compute once. Also guardfile.getType()before equals.- if (files != null) { + if (files != null) { for (OASFile file : files) { - - // Skipping. If a file contains only unmappable plugins formats - if (getPluginFormatsFromFileFormats(file.getContains()).isEmpty()) { + // Skipping. If a file contains only unmappable plugins formats + List<String> mappedFormats = getPluginFormatsFromFileFormats(file.getContains()); + if (mappedFormats.isEmpty()) { continue; } // Skipping. OwlPlug only supports archives (installer not supported) - if (!file.getType().equals("archive")) { + if (file.getType() == null || !"archive".equals(file.getType())) { continue; } - PackageBundle bundle = mapperToEntity(file, remotePackage.getName()); + PackageBundle bundle = mapperToEntity(file, remotePackage.getName()); bundle.setRemotePackage(remotePackage); + // Use the formats we already computed + bundle.setFormats(new java.util.ArrayList<>(mappedFormats)); bundles.add(bundle); } }owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/BundleMapper.java (1)
25-26: Surface deprecation at call sites.Also deprecate accessors so usages get flagged during migration to derived names.
@Deprecated private String name; + /** + * Deprecated: bundle display name will be derived from RemotePackage + targets. + */ + @Deprecated + public String getName() { return name; } + /** + * Deprecated: bundle display name will be derived from RemotePackage + targets. + */ + @Deprecated + public void setName(String name) { this.name = name; }owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java (1)
240-248: Good: collapse multiple PLATFORM chips into a single PLATFORM_LIST.This fixes the previous unintended AND. Consider guarding against overlapping async searches (rapid toggles) to avoid stale results replacing newer ones (track a request id/version).
owlplug-client/src/main/java/com/owlplug/explore/services/ExploreService.java (1)
124-127: Switch to fetchBundlesAndTargets: OK; remove dead variable and re-check default filtering.
- The change to
.and(RemotePackageRepository.fetchBundlesAndTargets())is sensible for eager loading.RuntimePlatform env(Line 122) is now unused—remove it.- Since controller filters are now UI-driven, ensure all call sites that bypass
performPackageSearch()won’t unintentionally return unfiltered results.- RuntimePlatform env = this.getApplicationDefaults().getRuntimePlatform(); + // removed: unused RuntimePlatform envowlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java (1)
93-97: Update Javadoc to reflect new parameter.Add
@param nameto the method’s doc to keep Javadoc accurate.- * @param bundleMapper bundle json bundleMapper + * @param bundleMapper bundle json bundleMapper + * @param name remote package name used as bundle display name prefix
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (9)
owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java(4 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/PackageBundle.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java(3 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/BundleMapper.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java(2 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreCriteriaAdapter.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreFilterCriteriaType.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java(2 hunks)owlplug-client/src/main/java/com/owlplug/explore/services/ExploreService.java(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (7)
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java (1)
88-104: Old single-arg mapper removed
All calls tomapperToEntity(OASFile)have been updated to the new two-argument signature. The deprecatedPackageBundle.namesetter remains in use here by design.owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java (1)
117-123: Ignore signature change warning:hasPlatformTagretains both String and List overloads andExploreCriteriaAdapterinvokes each correctly.Likely an incorrect or invalid review comment.
owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreFilterCriteriaType.java (1)
22-22: All ExploreFilterCriteriaType branches handled
ExploreCriteriaAdapter and ExploreController cover PLATFORM_LIST and FORMAT_LIST; no switch statements on this enum and no ordinal‐based serialization detected.owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreCriteriaAdapter.java (1)
56-58: Confirm OR semantics for multi-platform filtering.Please confirm
RemotePackageRepository.hasPlatformTag(List<String>)matches “any-of” semantics. This PR’s aim (“select multiple target platforms”) suggests OR; an AND here would still over-restrict results.owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java (2)
47-47: Import looks correct.
Setimport is required for preselection logic.
179-181: Verify platform tag alignment between UI keys and runtime tags.Keys like "mac" and "linux-arm64" must exactly match
RuntimePlatform.getCompatiblePlatformsTags(). If registry tags differ (e.g., "osx", "macos", "darwin"), preselection won’t trigger.owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java (1)
74-76: Call-site update looks correct.Passing
remotePackage.getName()into the bundle mapper aligns naming across sources.
owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java
Show resolved
Hide resolved
...ug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java
Show resolved
Hide resolved
owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreCriteriaAdapter.java
Show resolved
Hide resolved
owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java
Show resolved
Hide resolved
0a4444c to
46720d3
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
owlplug-client/src/main/java/com/owlplug/core/components/RuntimePlatformResolver.java (1)
57-60: Rosetta compatibility: arm64 Macs should accept x64 targets.To reflect real-world compatibility (Rosetta 2), make
mac-arm64compatible withmac-x64. This aligns with your multi-target selection goal.winX64.getCompatiblePlatforms().add(winX86); linuxX64.getCompatiblePlatforms().add(linuxX86); linuxArm64.getCompatiblePlatforms().add(linuxArm86); + macArm64.getCompatiblePlatforms().add(macX64);
♻️ Duplicate comments (1)
owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java (1)
125-139: Protect fetch-join spec from count queries; set distinct on select.Applying fetch joins during count causes runtime errors on many providers. Guard by result type; set
distinct(true)for the select.@SuppressWarnings("unchecked") static Specification<RemotePackage> fetchBundlesAndTargets() { return (root, query, cb) -> { - Fetch<Object, Object> bundlesFetch = root.fetch("bundles", JoinType.INNER); - bundlesFetch.fetch("targets", JoinType.LEFT); - - // Always true predicate for WHERE clause - return cb.conjunction(); + Class<?> rt = query.getResultType(); + boolean isCount = (rt == Long.class || rt == long.class); + if (!isCount) { + Fetch<Object, Object> bundlesFetch = root.fetch("bundles", JoinType.INNER); + bundlesFetch.fetch("targets", JoinType.LEFT); + query.distinct(true); + } + return cb.conjunction(); }; }
🧹 Nitpick comments (12)
owlplug-client/src/main/java/com/owlplug/core/components/RuntimePlatformResolver.java (3)
44-47: Optional: Add common macOS aliases to improve repository matching.If upstream package metadata uses "darwin"/"macos"/"osx" keys, define aliases like Windows/Linux do.
- RuntimePlatform macX64 = new RuntimePlatform("mac-x64", OperatingSystem.MAC, "x64"); + RuntimePlatform macX64 = new RuntimePlatform("mac-x64", OperatingSystem.MAC, "x64", + new String[] {"darwin-x64", "macos-x64", "osx-x64", "darwin", "macos", "osx"}); platforms.add(macX64); - RuntimePlatform macArm64 = new RuntimePlatform("mac-arm64", OperatingSystem.MAC, "arm64"); + RuntimePlatform macArm64 = new RuntimePlatform("mac-arm64", OperatingSystem.MAC, "arm64", + new String[] {"darwin-arm64", "macos-arm64", "osx-arm64", "aarch64"}); platforms.add(macArm64);
52-55: Nit: RenamelinuxArm86→linuxArm32for clarity.It represents 32‑bit ARM; the current name suggests x86.
- RuntimePlatform linuxArm86 = new RuntimePlatform("linux-arm32", OperatingSystem.LINUX, "arm32"); - platforms.add(linuxArm86); + RuntimePlatform linuxArm32 = new RuntimePlatform("linux-arm32", OperatingSystem.LINUX, "arm32"); + platforms.add(linuxArm32); @@ - linuxArm64.getCompatiblePlatforms().add(linuxArm86); + linuxArm64.getCompatiblePlatforms().add(linuxArm32);Also applies to: 59-59
85-86: Nit: Unify unknown arch casing.Return "unknown" consistently to avoid mismatches.
- if (arch == null) { - return "Unknown"; + if (arch == null) { + return "unknown"; @@ - } else { - return "unknown"; + } else { + return "unknown";Also applies to: 99-100
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java (2)
88-104: Make bundle name and targets deterministic and null-safe.Guard against null/blank name and empty/duplicate targets; sort targets for stable UI; avoid trailing " - " when no targets.
Apply:
- public static PackageBundle mapperToEntity(OASFile file, String name) { + public static PackageBundle mapperToEntity(OASFile file, String name) { @@ - List<String> targets = new ArrayList<>(); - for (OASFile.System system : file.getSystems()) { - for (String arch : file.getArchitectures()) { - targets.add(system.getType() + "-" + arch); - } - } - packageBundle.setTargets(targets); - - String bundleName = name + " - " + String.join(" ", targets); - packageBundle.setName(bundleName); + List<String> targets = new ArrayList<>(); + if (file.getSystems() != null && file.getArchitectures() != null) { + for (OASFile.System system : file.getSystems()) { + if (system == null || system.getType() == null) continue; + for (String arch : file.getArchitectures()) { + if (arch == null || arch.isBlank()) continue; + targets.add(system.getType() + "-" + arch); + } + } + } + targets = targets.stream().distinct().sorted().toList(); + packageBundle.setTargets(targets); + + String safeName = (name == null || name.isBlank()) ? "Bundle" : name.trim(); + String bundleName = targets.isEmpty() ? safeName : safeName + " - " + String.join(", ", targets); + packageBundle.setName(bundleName);
105-107: Confirm bit-to-byte conversion and potential rounding.If upstream size isn’t guaranteed to be a multiple of 8, prefer ceiling to avoid underreporting bytes.
- packageBundle.setFileSize(file.getSize() / 8); + packageBundle.setFileSize((file.getSize() + 7) / 8);owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/BundleMapper.java (1)
25-26: Clarify deprecations and migration path.Add since/version and guidance to use remote package name + targets; consider forRemoval when safe; keep JSON compatibility.
- @Deprecated + @Deprecated(since = "1.9.0") // update to actual version private String name; @@ - @Deprecated + @Deprecated(since = "1.9.0") public String getName() { @@ - @Deprecated + @Deprecated(since = "1.9.0") public void setName(String name) { @@ - @Deprecated + @Deprecated(since = "1.9.0") public String getFormat() { @@ - @Deprecated + @Deprecated(since = "1.9.0") public void setFormat(String format) {Optionally, to ease registry compatibility when only a single ‘format’ is provided:
// Add alongside existing setters @com.fasterxml.jackson.annotation.JsonSetter("format") public void setLegacyFormat(String legacy) { if (legacy == null) return; this.formats = (this.formats == null || this.formats.isEmpty()) ? List.of(legacy) : this.formats; }Also applies to: 40-44, 53-56, 90-94, 111-114
owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreCriteriaAdapter.java (1)
56-58: Guard against null/empty lists to avoid invalidIN ()predicates.Short-circuit when the list is null/empty.
- if (criteria.getFilterType().equals(ExploreFilterCriteriaType.PLATFORM_LIST)) { - return RemotePackageRepository.hasPlatformTag((List<String>) criteria.getValue()); - } + if (criteria.getFilterType().equals(ExploreFilterCriteriaType.PLATFORM_LIST)) { + @SuppressWarnings("unchecked") + List<String> platforms = (List<String>) criteria.getValue(); + if (platforms == null || platforms.isEmpty()) { + return Specification.where(null); + } + return RemotePackageRepository.hasPlatformTag(platforms); + }owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java (1)
117-123: Handle emptyplatformTagListdefensively to avoid provider-specific errors.
path.in(emptyList)can error or always-false depending on JPA provider. Return a tautology when list is empty.static Specification<RemotePackage> hasPlatformTag(List<String> platformTagList) { return (remotePackage, cq, cb) -> { + if (platformTagList == null || platformTagList.isEmpty()) { + return cb.conjunction(); + } Join<Object, Object> bundles = (Join<Object, Object>) remotePackage.fetch("bundles", JoinType.INNER); return bundles.join("targets").in(platformTagList); }; }owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java (4)
180-182: Avoid recomputing defaults inside the loop.Store
preselectedonce before iterating.Example:
final Set<String> preselected = this.getApplicationDefaults().getRuntimePlatform().getCompatiblePlatformsTags(); for (Entry<String, CheckBox> entry : targetFilterCheckBoxes.entrySet()) { entry.getValue().setSelected(preselected.contains(entry.getKey())); ... }
241-249: Good consolidation into a single PLATFORM_LIST criterion; add task-cancel to prevent stale UI.Rapid toggles can race; cancel the previous search before starting a new one.
Additional changes (outside this hunk):
// field private volatile Task<Iterable<RemotePackage>> currentSearch; // in performPackageSearch(), before starting the new thread: if (currentSearch != null) { currentSearch.cancel(); } currentSearch = task;
278-279: Delegating refreshView() to performPackageSearch() is fine.Optionally change the sync listener to
this::performPackageSearchfor clarity; behavior is equivalent.
287-287:synchronizedlikely unnecessary on JavaFX thread.
displayPackagesruns fromTask.setOnSucceededon the FX thread; synchronization can be dropped unless called off-FX elsewhere.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (10)
owlplug-client/src/main/java/com/owlplug/core/components/RuntimePlatformResolver.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java(6 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/PackageBundle.java(2 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java(3 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/BundleMapper.java(3 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java(2 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreCriteriaAdapter.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreFilterCriteriaType.java(1 hunks)owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java(2 hunks)owlplug-client/src/main/java/com/owlplug/explore/services/ExploreService.java(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- owlplug-client/src/main/java/com/owlplug/explore/model/PackageBundle.java
- owlplug-client/src/main/java/com/owlplug/explore/services/ExploreService.java
- owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-04T19:44:02.376Z
Learnt from: DropSnorz
PR: DropSnorz/OwlPlug#364
File: owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java:125-139
Timestamp: 2025-09-04T19:44:02.376Z
Learning: Modern Hibernate versions (≥5.3) automatically handle entity deduplication when using fetch joins in JPA Specifications. The main issue with fetch joins in Specifications is count query compatibility, not duplicate entity creation.
Applied to files:
owlplug-client/src/main/java/com/owlplug/explore/repositories/RemotePackageRepository.java
📚 Learning: 2025-09-04T18:09:08.241Z
Learnt from: DropSnorz
PR: DropSnorz/OwlPlug#364
File: owlplug-client/src/main/java/com/owlplug/explore/model/mappers/registry/RegistryModelAdapter.java:98-106
Timestamp: 2025-09-04T18:09:08.241Z
Learning: In OwlPlug's RegistryModelAdapter.jsonMapperToEntity method, bundleMapper.getTargets() is guaranteed to not be null based on the registry data sources used, so defensive null checks are not needed in this context.
Applied to files:
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (5)
owlplug-client/src/main/java/com/owlplug/core/components/RuntimePlatformResolver.java (1)
44-47: Legacy “mac” platform key usage not found
Ripgrep only reported"mac"in the OperatingSystem enum and OS‐detection (osTag.contains/osName.contains), not in any RuntimePlatform id usage.owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java (1)
88-104: Good alignment with new naming strategy.Using the remote package name plus targets makes bundle labels clearer across Explore/Registry mappings.
owlplug-client/src/main/java/com/owlplug/explore/model/search/ExploreFilterCriteriaType.java (1)
22-22: Enum insertion safe: no ordinal-based persistence found
Ran project-wide search for@Enumerated(EnumType.ORDINAL)and found no usages;ExploreFilterCriteriaTypeisn’t persisted or serialized by ordinal. AddingPLATFORM_LISTmid-enum introduces no breaking change.owlplug-client/src/main/java/com/owlplug/explore/controllers/ExploreController.java (2)
173-175: Mac targets split looks good.Clearer UX with explicit x64/arm64 options.
268-269: Correct to display packages directly on success.Prevents redundant re-querying.
owlplug-client/src/main/java/com/owlplug/core/components/RuntimePlatformResolver.java
Outdated
Show resolved
Hide resolved
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java
Show resolved
Hide resolved
owlplug-client/src/main/java/com/owlplug/explore/model/mappers/oas/OASModelAdapter.java
Show resolved
Hide resolved
46720d3 to
affd42e
Compare
Related to #363