Skip to content

Commit

Permalink
Refactor variables names
Browse files Browse the repository at this point in the history
Signed-off-by: upendrakumbham <[email protected]>
  • Loading branch information
upendrakumbham committed Dec 4, 2024
1 parent a4575ab commit 6c3a201
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ public ImmutableMap fetchDefaultPlotMethodAndParameterisation(String experimentA
return cellPlotService.fetchDefaultPlotMethodWithParameterisation(experimentAccession);
}

public JsonArray getMarkerGeneMetadata(JsonArray toUpdateMetadata, String experimentAccession) {
public JsonArray getMarkerGeneMetadata(JsonArray metadata, String experimentAccession) {
JsonArray markerGenesArray = new JsonArray();

toUpdateMetadata.forEach(item -> {
JsonObject metaDataObject = getAsJsonObject(item);
metadata.forEach(metadataObject -> {
JsonObject metaDataObject = getAsJsonObject(metadataObject);

if (metaDataObject != null) {
String value = getValueAsString(metaDataObject);
Expand All @@ -280,11 +280,11 @@ private JsonObject processMarkerGene(JsonObject jsonObject, String experimentAcc
return jsonObject;
}

private JsonObject getAsJsonObject(Object item) {
private JsonObject getAsJsonObject(Object metadataItem) {
try {
return (JsonObject) item;
return (JsonObject) metadataItem;
} catch (ClassCastException e) {
LOGGER.debug("Invalid metadata item: " + item);
LOGGER.debug("Invalid metadata item: " + metadataItem);
return null;
}
}
Expand Down

0 comments on commit 6c3a201

Please sign in to comment.