Skip to content

Commit 3ae6c81

Browse files
committed
Route OSInfo.getArchName() through LlamaSystemProperties.getOsinfoArchitecture()
OSInfo.getArchName() read the override system property via a hard-coded string literal: String override = System.getProperty("net.ladenthin.llama.osinfo.architecture"); bypassing LlamaSystemProperties.getOsinfoArchitecture(), the registry-side getter built specifically to be the single source of truth for that property name. The deep scan that produced the README System Properties Reference (e36f631) surfaced this as one of two registry-bypass smells; fixing it here closes the first. Routing through the registry keeps the property name in exactly one place, mirrors the recent BAF Radix.HEX consolidation (where every literal '16' radix was replaced by a single Radix.HEX constant), and means future renames or scope tightenings of the property only have to land in LlamaSystemProperties. Tests: OSInfoTest 16/16 pass (the override-set branch is already covered by the test that sets ARCH_OVERRIDE_PROP); mvn compile clean.
1 parent e36f631 commit 3ae6c81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/net/ladenthin/llama/OSInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static String resolveArmArchType() {
387387
* @return the canonical architecture folder name
388388
*/
389389
public static String getArchName() {
390-
String override = System.getProperty("net.ladenthin.llama.osinfo.architecture");
390+
String override = new LlamaSystemProperties().getOsinfoArchitecture();
391391
if (override != null) {
392392
return override;
393393
}

0 commit comments

Comments
 (0)