From aba94d55f00c4241c12f5d7ccd6e87c5955a3fd5 Mon Sep 17 00:00:00 2001 From: "Begonia, HE" <163421589+BegoniaHe@users.noreply.github.com> Date: Sun, 25 Jan 2026 10:41:33 +0100 Subject: refactor(java): suppress dead code warnings and improve detection - Add #[allow(dead_code)] attributes to utility functions - Improve 64-bit detection with case-insensitive check - Support aarch64 architecture in bitness detection - Add TODO for future vendor expansion Reviewed-by: Claude Sonnet 4.5 --- src-tauri/src/core/java/provider.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src-tauri/src/core/java/provider.rs') diff --git a/src-tauri/src/core/java/provider.rs b/src-tauri/src/core/java/provider.rs index 0f9d78a..1b79681 100644 --- a/src-tauri/src/core/java/provider.rs +++ b/src-tauri/src/core/java/provider.rs @@ -1,14 +1,6 @@ use crate::core::java::{ImageType, JavaCatalog, JavaDownloadInfo}; use tauri::AppHandle; -/// Trait for Java download providers (Adoptium, Temurin, Corretto, etc.) -/// -/// Implements SOLID principles: -/// - Single Responsibility: Each provider handles one download source -/// - Open/Closed: New providers can be added without modifying existing code -/// - Liskov Substitution: All providers are interchangeable -/// - Interface Segregation: Minimal required methods -/// - Dependency Inversion: Code depends on trait, not concrete implementations pub trait JavaProvider: Send + Sync { /// Fetch the Java catalog (all available versions for this provider) async fn fetch_catalog( @@ -28,6 +20,7 @@ pub trait JavaProvider: Send + Sync { async fn available_versions(&self) -> Result, String>; /// Get provider name (e.g., "adoptium", "corretto") + #[allow(dead_code)] fn provider_name(&self) -> &'static str; /// Get OS name for this provider's API -- cgit v1.2.3-70-g09d2