From ed505bcbc88ea08aa9fa42a6ae3e1e9f4020184d Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Fri, 24 Jan 2025 12:11:42 -0800 Subject: [PATCH] Remove get/setInputPrefix() --- .../executescript/SamplesConfirmGridView.java | 16 +++++++--------- .../viability/data/MultiValueInputColumn.java | 3 +-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/flow/src/org/labkey/flow/controllers/executescript/SamplesConfirmGridView.java b/flow/src/org/labkey/flow/controllers/executescript/SamplesConfirmGridView.java index 2570e597cb..356357c2a2 100644 --- a/flow/src/org/labkey/flow/controllers/executescript/SamplesConfirmGridView.java +++ b/flow/src/org/labkey/flow/controllers/executescript/SamplesConfirmGridView.java @@ -17,6 +17,7 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.NotNull; import org.labkey.api.action.SpringActionController; import org.labkey.api.collections.NamedObject; import org.labkey.api.collections.NamedObjectList; @@ -308,7 +309,7 @@ protected void renderFormEnd(RenderContext ctx, Writer out) @Override protected String getRecordSelectorName(RenderContext ctx) { - // Bind select checkbox to ImportAnalyisForm.selectedSamples.select + // Bind select checkbox to ImportAnalysisForm.selectedSamples.select String sampleId = ctx.get(SAMPLE_ID_FIELD_KEY, String.class); return "selectedSamples.rows[" + sampleId + "].selected"; } @@ -355,9 +356,8 @@ protected boolean isErrorRow(RenderContext ctx, int rowIndex) } } - private class MatchedFlagDisplayColumn extends SimpleDisplayColumn + private static class MatchedFlagDisplayColumn extends SimpleDisplayColumn { - public MatchedFlagDisplayColumn() { super(); @@ -387,7 +387,7 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep } // Simple lookup to list of original FlowFCSFiles - private class FCSFilesFilesForeignKey extends AbstractForeignKey + private static class FCSFilesFilesForeignKey extends AbstractForeignKey { private static final boolean INCLUDE_ALL_FILES = false; @@ -423,13 +423,13 @@ public StringExpression getURL(ColumnInfo parent) } @Override - public NamedObjectList getSelectList(RenderContext ctx) + public @NotNull NamedObjectList getSelectList(RenderContext ctx) { List candidates = (List)ctx.get(CANDIDATE_FILES_FIELD_KEY, List.class); if (candidates == null || candidates.isEmpty()) return _list; - // Put most likely canidates on the top of the list + // Put most likely candidates on the top of the list Set candidateRowIds = new HashSet<>(candidates.size()); NamedObjectList list = new NamedObjectList(); for (FlowFCSFile candidate : candidates) @@ -480,10 +480,9 @@ protected String getSelectInputDisplayValue(NamedObject entry) if (o instanceof String) return (String)o; - if (!(o instanceof FlowFCSFile)) + if (!(o instanceof FlowFCSFile file)) return null; - FlowFCSFile file = (FlowFCSFile)o; ExpData data = file.getData(); FlowRun run = null; if (data != null && data.getRunId() != null) @@ -517,4 +516,3 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep } } } - diff --git a/viability/src/org/labkey/viability/data/MultiValueInputColumn.java b/viability/src/org/labkey/viability/data/MultiValueInputColumn.java index c6fbeba6e1..b2e1f152ed 100644 --- a/viability/src/org/labkey/viability/data/MultiValueInputColumn.java +++ b/viability/src/org/labkey/viability/data/MultiValueInputColumn.java @@ -43,8 +43,7 @@ public MultiValueInputColumn(ColumnInfo col, List values) @Override public void renderInputHtml(RenderContext ctx, Writer out, Object value) throws IOException { - String formFieldName = ctx.getForm().getFormFieldName(getColumnInfo()); - String id = getInputPrefix() + formFieldName; + String id = ctx.getForm().getFormFieldName(getColumnInfo()); out.write("
"); out.write("