Conversation
|
|
||
| if(!existingNs.equals(curieNamespace)) { | ||
|
|
||
| String origCurieForDebugLog = curiePrefix; |
Check notice
Code scanning / CodeQL
Unread local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
In general, an unread local variable should either be removed or used. Since origCurieForDebugLog is only relevant to a commented-out debug print and has no other role, the most straightforward fix that preserves existing functionality is to delete its declaration.
Concretely, in dataload/extras/json2sssom/src/main/java/CurieMap.java, within the second occurrence of the block that handles if (!existingNs.equals(curieNamespace)), remove the line:
String origCurieForDebugLog = curiePrefix;No additional imports, methods, or definitions are needed. This change does not alter any runtime behavior because the variable was never read.
| @@ -214,8 +214,6 @@ | ||
|
|
||
| if(!existingNs.equals(curieNamespace)) { | ||
|
|
||
| String origCurieForDebugLog = curiePrefix; | ||
|
|
||
| // try to find a different curie prefix for this namespace | ||
| String nsToCp = namespaceToCuriePrefix.get(curieNamespace); | ||
| if(nsToCp != null) { |
No description provided.