This is an automated email from the ASF dual-hosted git repository. brandonwilliams pushed a commit to branch CASSANDRA-18449-trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 5ddbc54a489414fe6232067172878170e4b5905a Author: Brandon Williams <[email protected]> AuthorDate: Mon Apr 17 10:35:28 2023 -0500 Forbid deprecated methods in checkstyle --- checkstyle.xml | 22 ++++++++++++++++++++++ checkstyle_test.xml | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/checkstyle.xml b/checkstyle.xml index 053cc735ab..3a273a840e 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -106,6 +106,28 @@ <property name="message" value="Avoid Path#toFile(), as some implementations may not support it." /> </module> + <module name="RegexpSinglelineJava"> + <!-- block Integer() --> + <property name="id" value="blockIntegerInstantiation"/> + <property name="format" value="new Integer\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Integer() and use Integer.valueOf()" /> + </module> + <module name="RegexpSinglelineJava"> + <!-- block Long() --> + <property name="id" value="blockLongInstantiation"/> + <property name="format" value="new Long\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Long() and use Long.valueOf()" /> + </module> + <module name="RegexpSinglelineJava"> + <!-- block Float() --> + <property name="id" value="blockFloatInstantiation"/> + <property name="format" value="new Float\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Float() and use Float.valueOf()" /> + </module> + <module name="RedundantImport"/> <module name="UnusedImports"/> </module> diff --git a/checkstyle_test.xml b/checkstyle_test.xml index d237827f44..9377b06821 100644 --- a/checkstyle_test.xml +++ b/checkstyle_test.xml @@ -57,6 +57,28 @@ <property name="classes" value=""/> </module> + <module name="RegexpSinglelineJava"> + <!-- block Integer() --> + <property name="id" value="blockIntegerInstantiation"/> + <property name="format" value="new Integer\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Integer() and use Integer.valueOf()" /> + </module> + <module name="RegexpSinglelineJava"> + <!-- block Long() --> + <property name="id" value="blockLongInstantiation"/> + <property name="format" value="new Long\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Long() and use Long.valueOf()" /> + </module> + <module name="RegexpSinglelineJava"> + <!-- block Float() --> + <property name="id" value="blockFloatInstantiation"/> + <property name="format" value="new Float\("/> + <property name="ignoreComments" value="true"/> + <property name="message" value="Avoid Float() and use Float.valueOf()" /> + </module> + <module name="RedundantImport"/> <module name="UnusedImports"/> </module> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
