Skip to content

Commit efc18e8

Browse files
Minor auto-refactor code cleanup on a massive scale (#2479)
Co-authored-by: labkey-tchad <[email protected]>
1 parent c2d20f7 commit efc18e8

332 files changed

Lines changed: 639 additions & 894 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

buildTestModules/communityArtifacts/src/org/labkey/communityartifacts/CommunityArtifactsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class BeginAction extends SimpleViewAction
4040
{
4141
public ModelAndView getView(Object o, BindException errors)
4242
{
43-
return new JspView("/org/labkey/communityartifacts/view/hello.jsp");
43+
return new JspView<>("/org/labkey/communityartifacts/view/hello.jsp");
4444
}
4545

4646
@Override

buildTestModules/starterArtifacts/src/org/labkey/starterartifacts/StarterArtifactsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class BeginAction extends SimpleViewAction
4040
{
4141
public ModelAndView getView(Object o, BindException errors)
4242
{
43-
return new JspView("/org/labkey/starterartifacts/view/hello.jsp");
43+
return new JspView<>("/org/labkey/starterartifacts/view/hello.jsp");
4444
}
4545

4646
@Override

data/qc/src/org/labkey/AbstractAssayValidator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public abstract class AbstractAssayValidator
3131
private String _email;
3232
private String _password;
3333
private File _errorFile;
34-
private Map<String, String> _runProperties = new HashMap<>();
35-
private Map<String, String> _transformFile = new HashMap<>();
36-
private List<String> _errors = new ArrayList<>();
34+
private final Map<String, String> _runProperties = new HashMap<>();
35+
private final Map<String, String> _transformFile = new HashMap<>();
36+
private final List<String> _errors = new ArrayList<>();
3737
private String _host;
3838

3939
public enum Props {

data/qc/src/org/labkey/AssayTransformNoOp.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@
1515
*/
1616
package org.labkey;
1717

18-
import java.io.BufferedReader;
19-
import java.io.BufferedWriter;
2018
import java.io.File;
21-
import java.io.FileReader;
22-
import java.io.FileWriter;
23-
import java.io.IOException;
24-
import java.io.PrintWriter;
25-
import java.util.Arrays;
26-
import java.util.List;
27-
import java.util.stream.Collectors;
2819

2920
public class AssayTransformNoOp extends AbstractAssayValidator
3021
{

data/qc/src/org/labkey/AssayValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public void runQC(File inputFile, String username, String password, String host)
5151
if (getRunProperties().containsKey(Props.runDataFile.name()))
5252
{
5353
List<Map<String, String>> dataMap = parseRunData(new File(getRunProperties().get(Props.runDataFile.name())));
54-
Map<String, String> ptidMap = new HashMap<String, String>();
55-
Map<String, String> animalMap = new HashMap<String, String>();
54+
Map<String, String> ptidMap = new HashMap<>();
55+
Map<String, String> animalMap = new HashMap<>();
5656

5757
for (Map<String, String> row : dataMap)
5858
{

modules/crawlerTest/src/org/labkey/crawlertest/CrawlerTestController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public CrawlerTestController()
3838
}
3939

4040
@RequiresPermission(ReadPermission.class)
41-
public class InjectJspAction extends SimpleViewAction<InjectForm>
41+
public static class InjectJspAction extends SimpleViewAction<InjectForm>
4242
{
4343
@Override
4444
public void validate(InjectForm form, BindException errors)

modules/dumbster/src/com/dumbster/smtp/SimpleSmtpServer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class SimpleSmtpServer implements Runnable {
5959
/**
6060
* Port the server listens on - set to the default SMTP port initially.
6161
*/
62-
private int port = DEFAULT_SMTP_PORT;
62+
private final int port;
6363

6464
/**
6565
* Timeout listening on server socket.
@@ -166,7 +166,6 @@ public synchronized void stop() {
166166
* @param out output stream
167167
* @param input input stream
168168
* @return List of SmtpMessage
169-
* @throws IOException
170169
*/
171170
private List<SmtpMessage> handleTransaction(PrintWriter out, BufferedReader input) throws IOException {
172171
// Initialize the state machine

modules/editableModule/src/org/labkey/editablemodule/EditableModuleController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ public EditableModuleController()
3636
}
3737

3838
@RequiresPermission(ReadPermission.class)
39-
public class HelloAction extends SimpleViewAction
39+
public static class HelloAction extends SimpleViewAction<Object>
4040
{
41+
@Override
4142
public ModelAndView getView(Object o, BindException errors)
4243
{
43-
return new JspView("/org/labkey/editablemodule/view/hello.jsp");
44+
return new JspView<>("/org/labkey/editablemodule/view/hello.jsp");
4445
}
4546

4647
@Override

modules/linkedschematest/src/org/labkey/linkedschematest/TestLinkedSchemaCustomizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*/
4343
public class TestLinkedSchemaCustomizer implements LinkedSchemaCustomizer
4444
{
45-
private static Logger LOG = LogManager.getLogger(TestLinkedSchemaCustomizer.class);
45+
private static final Logger LOG = LogManager.getLogger(TestLinkedSchemaCustomizer.class);
4646

4747
// Name of the parameter declaration
4848
private static final String PARAM_FAMILY = "PARAM_FAMILY";

modules/linkedschematest/src/org/labkey/linkedschematest/TestTableCustomizer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.labkey.api.data.TableInfo;
2424

2525
import java.util.Collection;
26-
import java.util.List;
2726

2827
public class TestTableCustomizer implements TableCustomizer
2928
{

0 commit comments

Comments
 (0)