Skip to content

Commit

Permalink
Cleanign up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
smithkm committed Oct 28, 2024
1 parent 96eeb56 commit 8d8e1da
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -38,7 +35,6 @@
import ca.bc.gov.nrs.vdyp.model.VdypPolygon;
import ca.bc.gov.nrs.vdyp.model.VolumeVariable;
import ca.bc.gov.nrs.vdyp.test.TestUtils;
import ca.bc.gov.nrs.vdyp.test.VdypMatchers;

class BackProcessingEngineTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public int run(final PrintStream os, final InputStream is, final String... args)

processor.run(new FileSystemFileResolver(), new FileSystemFileResolver(), controlFileNames, getAllPasses());

System.err.println("Blah");

} catch (Exception ex) {
logger.error("Error during processing", ex);
return PROCESSING_ERROR_EXIT;
Expand All @@ -90,7 +88,7 @@ public List<String> getControlFileNamesFromUser(final PrintStream os, final Inpu
List<String> controlFileNames;
os.print(
MessageFormat
.format("Enter name of control file (or RETURN for {1}) or *name for both): ", defaultFilename)
.format("Enter name of control file (or RETURN for {0}) or *name for both): ", defaultFilename)
);

controlFileNames = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public ControlKey getControlKey() {
)
).value(3, GENUS_INDEX, ValueParser.INTEGER) //
.space(1) //
.value(2, GENUS, ControlledValueParser.optional(ValueParser.GENUS))
.value(2, GENUS, ControlledValueParser.optional(ControlledValueParser.GENUS))
.value(3, UTILIZATION_CLASS_INDEX, ControlledValueParser.UTILIZATION_CLASS)
.value(9, BASAL_AREA, ValueParser.FLOAT_WITH_DEFAULT)
.value(9, LIVE_TREES_PER_HECTARE, ValueParser.FLOAT_WITH_DEFAULT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.hamcrest.Matcher;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

class ProcessorTest {

@SuppressWarnings("unchecked")
@Test
void test() throws IOException, ResourceParseException, ProcessingException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class VdypProcessingApplicationTest {
@Nested
class Run {

VdypProcessingApplication app;
VdypProcessingApplication<?> app;
Processor processor;

@BeforeEach
void init() {
processor = EasyMock.createMock(Processor.class);

app = new VdypProcessingApplication() {
app = new VdypProcessingApplication<Processor>() {

@Override
public String getDefaultControlFileName() {
Expand Down Expand Up @@ -154,11 +154,11 @@ void testErrorWhileProcessing() throws Exception {
@Nested
class GetControlFileNamesFromUser {

VdypProcessingApplication app;
VdypProcessingApplication<Processor> app;

@BeforeEach
void init() {
app = new VdypProcessingApplication() {
app = new VdypProcessingApplication<Processor>() {

@Override
public String getDefaultControlFileName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@
import static org.junit.jupiter.api.Assertions.*;

import java.io.IOException;
import java.util.ArrayList;
import java.util.NoSuchElementException;

import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import ca.bc.gov.nrs.vdyp.io.parse.common.ResourceParseException;
import ca.bc.gov.nrs.vdyp.model.LayerType;
import ca.bc.gov.nrs.vdyp.model.UtilizationClass;
import ca.bc.gov.nrs.vdyp.test.MockFileResolver;
import ca.bc.gov.nrs.vdyp.test.TestUtils;
import ca.bc.gov.nrs.vdyp.test.VdypMatchers;

import static ca.bc.gov.nrs.vdyp.test.VdypMatchers.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
import static org.junit.jupiter.api.Assertions.*;

import java.io.IOException;
import java.util.ArrayList;
import java.util.NoSuchElementException;

import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;

import ca.bc.gov.nrs.vdyp.io.parse.common.ResourceParseException;
import ca.bc.gov.nrs.vdyp.model.LayerType;
import ca.bc.gov.nrs.vdyp.model.UtilizationClass;
import ca.bc.gov.nrs.vdyp.test.MockFileResolver;
import ca.bc.gov.nrs.vdyp.test.TestUtils;
import ca.bc.gov.nrs.vdyp.test.VdypMatchers;

import static ca.bc.gov.nrs.vdyp.test.VdypMatchers.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
import java.util.ArrayList;
import java.util.NoSuchElementException;

import org.hamcrest.Matchers;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;

import ca.bc.gov.nrs.vdyp.io.parse.common.ResourceParseException;
import ca.bc.gov.nrs.vdyp.io.parse.model.VdypSpeciesParser.Ages;
import ca.bc.gov.nrs.vdyp.model.LayerType;
import ca.bc.gov.nrs.vdyp.model.UtilizationClass;
import ca.bc.gov.nrs.vdyp.test.MockFileResolver;
import ca.bc.gov.nrs.vdyp.test.TestUtils;
import ca.bc.gov.nrs.vdyp.test.VdypMatchers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import java.util.List;
import java.util.Map;

import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;

import org.opentest4j.AssertionFailedError;

import ca.bc.gov.nrs.vdyp.application.VdypApplicationIdentifier;
import ca.bc.gov.nrs.vdyp.common_calculators.BaseAreaTreeDensityDiameter;
import ca.bc.gov.nrs.vdyp.forward.ForwardControlParser;
import ca.bc.gov.nrs.vdyp.forward.ForwardProcessingState;
import ca.bc.gov.nrs.vdyp.forward.model.ControlVariable;
Expand All @@ -19,10 +17,6 @@
import ca.bc.gov.nrs.vdyp.io.parse.control.BaseControlParser;
import ca.bc.gov.nrs.vdyp.io.parse.value.ValueParseException;
import ca.bc.gov.nrs.vdyp.model.Region;
import ca.bc.gov.nrs.vdyp.model.UtilizationClass;
import ca.bc.gov.nrs.vdyp.model.UtilizationVector;
import ca.bc.gov.nrs.vdyp.model.VdypLayer;
import ca.bc.gov.nrs.vdyp.model.VdypSpecies;
import ca.bc.gov.nrs.vdyp.test.TestUtils;

public class ForwardTestUtils {
Expand Down

0 comments on commit 8d8e1da

Please sign in to comment.