aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/java/provider.rs
diff options
context:
space:
mode:
authorBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-25 10:41:33 +0100
committerBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-29 02:58:02 +0100
commitaba94d55f00c4241c12f5d7ccd6e87c5955a3fd5 (patch)
tree048f4486999e18166452d1265f1776a4442f225a /src-tauri/src/core/java/provider.rs
parent83e9e3c6067c8a2016676d461c17835d4da8b7ab (diff)
downloadDropOut-aba94d55f00c4241c12f5d7ccd6e87c5955a3fd5.tar.gz
DropOut-aba94d55f00c4241c12f5d7ccd6e87c5955a3fd5.zip
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
Diffstat (limited to 'src-tauri/src/core/java/provider.rs')
-rw-r--r--src-tauri/src/core/java/provider.rs9
1 files changed, 1 insertions, 8 deletions
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<Vec<u32>, 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