Skip to content

Commit 47ab746

Browse files
committed
[Java] Update Checkstyle DTD and apply Javadoc method checks for when used.
1 parent 95a78aa commit 47ab746

File tree

8 files changed

+40
-12
lines changed

8 files changed

+40
-12
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
3-
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
3+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
44
<module name="Checker">
55
<module name="SuppressionFilter">
66
<property name="file" value="${config_loc}/suppressions.xml"/>
@@ -170,5 +170,10 @@
170170
<property name="illegalPattern" value="true"/>
171171
<property name="message" value="Trailing whitespace"/>
172172
</module>
173+
174+
<module name="JavadocMethod">
175+
<property name="allowMissingJavadoc" value="true"/>
176+
<property name="allowUndeclaredRTE" value="true"/>
177+
</module>
173178
</module>
174179
</module>

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp/NamespaceOutputManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class NamespaceOutputManager implements OutputManager
3535
/**
3636
* Create a new {@link OutputManager} for generating C++98 source files into a given package.
3737
*
38-
* @param baseDirName for the generated source code.
39-
* @param namespaceName for the generated source code relative to the baseDirName.
38+
* @param baseDirName for the generated source code.
39+
* @param namespaceName for the generated source code relative to the baseDirName.
4040
*/
4141
public NamespaceOutputManager(final String baseDirName, final String namespaceName)
4242
{
@@ -61,6 +61,7 @@ public NamespaceOutputManager(final String baseDirName, final String namespaceNa
6161
*
6262
* @param name the name of the C++ class.
6363
* @return a {@link java.io.Writer} to which the source code should be written.
64+
* @throws IOException if an issue occurs when creating the file.
6465
*/
6566
public Writer createOutput(final String name) throws IOException
6667
{

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpNamespaceOutputManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class CSharpNamespaceOutputManager implements OutputManager
4040
* files into a given package.
4141
*
4242
* @param baseDirName for the generated source code.
43-
* @param packageName for the generated source code relative to the baseDirName.
43+
* @param packageName for the generated source code relative to the baseDirName.
4444
*/
4545
public CSharpNamespaceOutputManager(final String baseDirName, final String packageName)
4646
{
@@ -65,6 +65,7 @@ public CSharpNamespaceOutputManager(final String baseDirName, final String packa
6565
*
6666
* @param name the name of the C# class.
6767
* @return a {@link java.io.Writer} to which the source code should be written.
68+
* @throws IOException if an issue occurs when creating the file.
6869
*/
6970
public Writer createOutput(final String name) throws IOException
7071
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public GolangOutputManager(final String baseDirName, final String namespaceName)
6161
*
6262
* @param name the name of the golang class.
6363
* @return a {@link java.io.Writer} to which the source code should be written.
64+
* @throws IOException if an issue occurs when creating the file.
6465
*/
6566
public Writer createOutput(final String name) throws IOException
6667
{

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/CompositeType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@
3636
import static uk.co.real_logic.sbe.xml.XmlSchemaParser.getAttributeValueOrNull;
3737

3838
/**
39-
* SBE compositeType.
39+
* SBE compositeType which is a composite of other composites, sets, enums, or simple types.
4040
*/
4141
public class CompositeType extends Type
4242
{
43+
/**
44+
* SBE schema composite type.
45+
*/
4346
public static final String COMPOSITE_TYPE = "composite";
4447
public static final String SUB_TYPES_EXP = "type|enum|set|composite|ref";
4548

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/EncodedDataType.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@
3333
import static uk.co.real_logic.sbe.xml.XmlSchemaParser.getAttributeValueOrNull;
3434

3535
/**
36-
* SBE encodedDataType
36+
* SBE simple encoded data type.
3737
*/
3838
public class EncodedDataType extends Type
3939
{
40+
/**
41+
* SBE schema type.
42+
*/
4043
public static final String ENCODED_DATA_TYPE = "type";
4144

4245
private final PrimitiveType primitiveType;
@@ -248,6 +251,11 @@ public boolean isVariableLength()
248251
return varLen;
249252
}
250253

254+
/**
255+
* Set if the type is variable length or not.
256+
*
257+
* @param variableLength true if variable length.
258+
*/
251259
public void variableLength(final boolean variableLength)
252260
{
253261
this.varLen = variableLength;
@@ -289,7 +297,6 @@ public int encodedLength()
289297
* @return value of the constant for this type
290298
*/
291299
public PrimitiveValue constVal()
292-
throws IllegalArgumentException
293300
{
294301
if (presence() != CONSTANT)
295302
{

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/EnumType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@
3636
import static uk.co.real_logic.sbe.xml.XmlSchemaParser.getAttributeValueOrNull;
3737

3838
/**
39-
* SBE enumType
39+
* SBE enum type for representing an enumeration of values.
4040
*/
4141
public class EnumType extends Type
4242
{
43+
/**
44+
* SBE schema enum type.
45+
*/
4346
public static final String ENUM_TYPE = "enum";
4447

4548
private final PrimitiveType encodingType;

sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/SetType.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@
3131
import static uk.co.real_logic.sbe.xml.XmlSchemaParser.*;
3232

3333
/**
34-
* SBE setType representing a bitset of options.
34+
* SBE set tpe representing a bitset of options.
3535
*/
3636
public class SetType extends Type
3737
{
38+
/**
39+
* SBE schema set type.
40+
*/
3841
public static final String SET_TYPE = "set";
3942

4043
private final PrimitiveType encodingType;
@@ -172,6 +175,11 @@ public Collection<Choice> choices()
172175
return choiceByNameMap.values();
173176
}
174177

178+
/**
179+
* Always false.
180+
*
181+
* {@inheritDoc}
182+
*/
175183
public boolean isVariableLength()
176184
{
177185
return false;
@@ -187,7 +195,7 @@ public String toString()
187195
}
188196

189197
/**
190-
* Holder for valid values for EnumType
198+
* Holder for valid values for SBE schema enum type.
191199
*/
192200
public static class Choice
193201
{
@@ -260,7 +268,6 @@ public int sinceVersion()
260268
return sinceVersion;
261269
}
262270

263-
264271
/**
265272
* Version in which {@link Choice} was deprecated. Only valid if greater than zero.
266273
*

0 commit comments

Comments
 (0)