Skip to content

Commit c99a1be

Browse files
committed
[Java] Warnings cleanup.
1 parent 73206cb commit c99a1be

File tree

7 files changed

+6
-36
lines changed

7 files changed

+6
-36
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/golang/GolangGenerator.java

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ public void generateTypeStubs() throws IOException
8181
generateComposite(tokens, "");
8282
break;
8383

84-
case BEGIN_MESSAGE:
85-
break;
86-
8784
default:
8885
break;
8986
}
@@ -2112,24 +2109,10 @@ private void generateFields(
21122109
generateSinceActingDeprecated(sb, containingTypeName, propertyName, signalToken);
21132110
generateFieldMetaAttributeMethod(sb, containingTypeName, propertyName, signalToken);
21142111

2115-
switch (encodingToken.signal())
2112+
if (encodingToken.signal() == Signal.ENCODING)
21162113
{
2117-
case ENCODING:
2118-
generateMinMaxNull(sb, containingTypeName, propertyName, encodingToken);
2119-
generateCharacterEncoding(sb, containingTypeName, propertyName, encodingToken);
2120-
break;
2121-
2122-
case BEGIN_ENUM:
2123-
break;
2124-
2125-
case BEGIN_SET:
2126-
break;
2127-
2128-
case BEGIN_COMPOSITE:
2129-
break;
2130-
2131-
default:
2132-
break;
2114+
generateMinMaxNull(sb, containingTypeName, propertyName, encodingToken);
2115+
generateCharacterEncoding(sb, containingTypeName, propertyName, encodingToken);
21332116
}
21342117
}
21352118
}

sbe-tool/src/test/java/uk/co/real_logic/sbe/TargetCodeGeneratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class TargetCodeGeneratorTest
2727
{
2828
@Test
29-
public void shouldThrowOnNoTargetLanguage() throws Exception
29+
public void shouldThrowOnNoTargetLanguage()
3030
{
3131
assertThrows(IllegalArgumentException.class, () ->
3232
SbeTool.generate(mock(Ir.class), ".", "none"));

sbe-tool/src/test/java/uk/co/real_logic/sbe/generation/csharp/Issue567GroupSizeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class Issue567GroupSizeTest
2222
public static final String ERR_MSG =
2323
"WARNING: at <sbe:message name=\"issue567\"> <group name=\"group\"> \"numInGroup\" should be UINT8 or UINT16";
2424

25+
private final PrintStream mockErr = mock(PrintStream.class);
2526
private PrintStream err;
26-
private PrintStream mockErr = mock(PrintStream.class);
2727

2828
@BeforeEach
2929
public void before()
@@ -40,7 +40,7 @@ public void after()
4040
}
4141

4242
@Test
43-
public void shouldThrowWhenUsingATypeThatIsNotConstrainedToFitInAnIntAsTheGroupSize() throws Exception
43+
public void shouldThrowWhenUsingATypeThatIsNotConstrainedToFitInAnIntAsTheGroupSize()
4444
{
4545
final ParserOptions options = ParserOptions.builder().stopOnError(true).build();
4646
assertThrows(IllegalArgumentException.class,

sbe-tool/src/test/java/uk/co/real_logic/sbe/xml/CompositeTypeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ public void shouldHandleCompositeHasNullableType()
161161

162162
@Test
163163
public void shouldThrowExceptionWhenCompositeTypeHasTypeNameDuplicates()
164-
throws Exception
165164
{
166165
final String testXmlString =
167166
"<types>" +

sbe-tool/src/test/java/uk/co/real_logic/sbe/xml/EncodedDataTypeTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ public void shouldUseAppropriatePresence()
128128

129129
@Test
130130
public void shouldThrowExceptionWhenUnknownPresenceSpecified()
131-
throws Exception
132131
{
133132
final String testXmlString =
134133
"<types>" +
@@ -140,7 +139,6 @@ public void shouldThrowExceptionWhenUnknownPresenceSpecified()
140139

141140
@Test
142141
public void shouldThrowExceptionWhenNoPrimitiveTypeSpecified()
143-
throws Exception
144142
{
145143
final String testXmlString =
146144
"<types>" +
@@ -152,7 +150,6 @@ public void shouldThrowExceptionWhenNoPrimitiveTypeSpecified()
152150

153151
@Test
154152
public void shouldThrowExceptionWhenNoNameSpecified()
155-
throws Exception
156153
{
157154
final String testXmlString =
158155
"<types>" +
@@ -198,7 +195,6 @@ public void shouldUseAppropriatePrimitiveType()
198195

199196
@Test
200197
public void shouldThrowExceptionWhenUnknownPrimitiveTypeSpecified()
201-
throws Exception
202198
{
203199
final String testXmlString =
204200
"<types>" +
@@ -303,7 +299,6 @@ public void shouldReturnNullWhenSemanticTypeNotSpecified()
303299

304300
@Test
305301
public void shouldThrowExceptionWhenConstantPresenceButNoDataSpecified()
306-
throws Exception
307302
{
308303
final String testXmlString =
309304
"<types>" +

sbe-tool/src/test/java/uk/co/real_logic/sbe/xml/EnumTypeTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ public void shouldHandleCharEnumEncodingType()
183183

184184
@Test
185185
public void shouldThrowExceptionWhenIllegalEncodingTypeSpecified()
186-
throws Exception
187186
{
188187
final String testXmlString =
189188
"<types>" +
@@ -199,7 +198,6 @@ public void shouldThrowExceptionWhenIllegalEncodingTypeSpecified()
199198

200199
@Test
201200
public void shouldThrowExceptionWhenDuplicateValueSpecified()
202-
throws Exception
203201
{
204202
final String testXmlString =
205203
"<types>" +
@@ -216,7 +214,6 @@ public void shouldThrowExceptionWhenDuplicateValueSpecified()
216214

217215
@Test
218216
public void shouldThrowExceptionWhenDuplicateNameSpecified()
219-
throws Exception
220217
{
221218
final String testXmlString =
222219
"<types>" +

sbe-tool/src/test/java/uk/co/real_logic/sbe/xml/SetTypeTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public void shouldHandleSetTypeList()
118118

119119
@Test
120120
public void shouldThrowExceptionWhenIllegalEncodingTypeSpecified()
121-
throws Exception
122121
{
123122
final String testXmlString =
124123
"<types>" +
@@ -134,7 +133,6 @@ public void shouldThrowExceptionWhenIllegalEncodingTypeSpecified()
134133

135134
@Test
136135
public void shouldThrowExceptionWhenDuplicateValueSpecified()
137-
throws Exception
138136
{
139137
final String testXmlString =
140138
"<types>" +
@@ -150,7 +148,6 @@ public void shouldThrowExceptionWhenDuplicateValueSpecified()
150148

151149
@Test
152150
public void shouldThrowExceptionWhenDuplicateNameSpecified()
153-
throws Exception
154151
{
155152
final String testXmlString =
156153
"<types>" +
@@ -166,7 +163,6 @@ public void shouldThrowExceptionWhenDuplicateNameSpecified()
166163

167164
@Test
168165
public void shouldThrowExceptionWhenValueOutOfBoundsSpecified()
169-
throws Exception
170166
{
171167
final String testXmlString =
172168
"<types>" +

0 commit comments

Comments
 (0)