Skip to content

Commit

Permalink
[core] Make loggers static final where possible (#7562)
Browse files Browse the repository at this point in the history
  • Loading branch information
agilob authored Oct 2, 2020
1 parent e1fd221 commit 4fe76fc
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class InlineModelResolver {
structureMapper.writer(new DefaultPrettyPrinter());
}

static Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class);
static final Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class);

void flatten(OpenAPI openapi) {
this.openapi = openapi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen {
public static final String PROJECT_NAME = "projectName";

static Logger LOGGER = LoggerFactory.getLogger(FsharpFunctionsServerCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(FsharpFunctionsServerCodegen.class);

public CodegenType getTag() {
return CodegenType.SERVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class KotlinVertxServerCodegen extends AbstractKotlinCodegen {

public static final String PROJECT_NAME = "projectName";

static Logger LOGGER = LoggerFactory.getLogger(KotlinVertxServerCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(KotlinVertxServerCodegen.class);

public CodegenType getTag() {
return CodegenType.SERVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.openapitools.codegen.utils.StringUtils.camelize;

public class NimClientCodegen extends DefaultCodegen implements CodegenConfig {
static Logger LOGGER = LoggerFactory.getLogger(NimClientCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(NimClientCodegen.class);

public static final String PROJECT_NAME = "projectName";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class PlantumlDocumentationCodegen extends DefaultCodegen implements CodegenConfig {
public static final String ALL_OF_SUFFIX = "AllOf";

static Logger LOGGER = LoggerFactory.getLogger(PlantumlDocumentationCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(PlantumlDocumentationCodegen.class);

public CodegenType getTag() {
return CodegenType.DOCUMENTATION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ScalaAkkaHttpServerCodegen extends AbstractScalaCodegen implements
public static final String AKKA_HTTP_VERSION_DESC = "The version of akka-http";
public static final String DEFAULT_AKKA_HTTP_VERSION = "10.1.10";

static Logger LOGGER = LoggerFactory.getLogger(ScalaAkkaHttpServerCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(ScalaAkkaHttpServerCodegen.class);

public CodegenType getTag() {
return CodegenType.SERVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
public static final String ROUTES_FILE_NAME = "routesFileName";
public static final String BASE_PACKAGE = "basePackage";

static Logger LOGGER = LoggerFactory.getLogger(ScalaPlayFrameworkServerCodegen.class);
static final Logger LOGGER = LoggerFactory.getLogger(ScalaPlayFrameworkServerCodegen.class);

protected boolean skipStubs = false;
protected boolean supportAsync = false;
Expand Down
2 changes: 1 addition & 1 deletion new.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ import org.slf4j.LoggerFactory;
public class ${lang_classname} extends DefaultCodegen implements CodegenConfig {
public static final String PROJECT_NAME = "projectName";
static Logger LOGGER = LoggerFactory.getLogger(${lang_classname}.class);
static final Logger LOGGER = LoggerFactory.getLogger(${lang_classname}.class);
public CodegenType getTag() {
return CodegenType.${codegen_type_enum};
Expand Down

0 comments on commit 4fe76fc

Please sign in to comment.