QQQ-14 Checkstyle cleanup

This commit is contained in:
2022-06-20 08:28:20 -05:00
parent d89263fe4b
commit 570f4a3f34
4 changed files with 23 additions and 20 deletions

View File

@ -46,6 +46,7 @@
--> -->
<module name="TreeWalker"> <module name="TreeWalker">
<module name="SuppressWarningsHolder"/>
<module name="OuterTypeFilename"/> <module name="OuterTypeFilename"/>
<module name="IllegalTokenText"> <module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/> <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
@ -171,7 +172,7 @@
<property name="caseIndent" value="3"/> <property name="caseIndent" value="3"/>
<property name="throwsIndent" value="6"/> <property name="throwsIndent" value="6"/>
<property name="lineWrappingIndentation" value="3"/> <property name="lineWrappingIndentation" value="3"/>
<property name="arrayInitIndent" value="2"/> <property name="arrayInitIndent" value="6"/>
</module> </module>
<!-- <!--
<module name="AbbreviationAsWordInName"> <module name="AbbreviationAsWordInName">
@ -260,4 +261,5 @@
<module name="MissingOverride"/> <module name="MissingOverride"/>
</module> </module>
<module name="SuppressWarningsFilter"/>
</module> </module>

View File

@ -59,18 +59,6 @@ public abstract class QTableBackendDetails
/*******************************************************************************
** Fluent Setter for backendType
**
*******************************************************************************/
public QTableBackendDetails withBackendType(String backendType)
{
this.backendType = backendType;
return (this);
}
/******************************************************************************* /*******************************************************************************
** Setter for backendType ** Setter for backendType
** **
@ -88,6 +76,20 @@ public abstract class QTableBackendDetails
} }
} }
/*******************************************************************************
** Fluent Setter for backendType
**
*******************************************************************************/
public QTableBackendDetails withBackendType(String backendType)
{
this.backendType = backendType;
return (this);
}
/******************************************************************************* /*******************************************************************************
** Fluent Setter for backendType ** Fluent Setter for backendType
** **
@ -98,6 +100,4 @@ public abstract class QTableBackendDetails
return (this); return (this);
} }
} }

View File

@ -81,15 +81,15 @@ public class DeserializerUtils
/******************************************************************************* /*******************************************************************************
** **
*******************************************************************************/ *******************************************************************************/
public static <T> T reflectivelyDeserialize(Class<T> _class, TreeNode treeNode) throws IOException public static <T> T reflectivelyDeserialize(Class<T> outputClass, TreeNode treeNode) throws IOException
{ {
try try
{ {
T output = _class.getConstructor().newInstance(); T output = outputClass.getConstructor().newInstance();
System.out.println("Reflectively deserializing a: " + _class.getName()); System.out.println("Reflectively deserializing a: " + outputClass.getName());
Map<String, Consumer<String>> setterMap = new HashMap<>(); Map<String, Consumer<String>> setterMap = new HashMap<>();
for(Method method : _class.getMethods()) for(Method method : outputClass.getMethods())
{ {
if(method.getName().startsWith("set") && method.getParameterTypes().length == 1) if(method.getName().startsWith("set") && method.getParameterTypes().length == 1)
{ {
@ -131,7 +131,7 @@ public class DeserializerUtils
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// if we hit this, we might want to add an else-if to handle the type // // if we hit this, we might want to add an else-if to handle the type //
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
throw (new RuntimeException("Field " + fieldName + " is of an unhandled type " + parameterType.getName() + " when deserializing " + _class.getName())); throw (new RuntimeException("Field " + fieldName + " is of an unhandled type " + parameterType.getName() + " when deserializing " + outputClass.getName()));
} }
else else
{ {

View File

@ -82,6 +82,7 @@ public class MockQueryAction implements QueryInterface
** Get a mock value to use, based on its type. ** Get a mock value to use, based on its type.
** **
*******************************************************************************/ *******************************************************************************/
@SuppressWarnings("checkstyle:MagicNumber")
private Serializable getValue(QTableMetaData table, String field) private Serializable getValue(QTableMetaData table, String field)
{ {
// @formatter:off // IJ can't do new-style switch correctly yet... // @formatter:off // IJ can't do new-style switch correctly yet...