Skip to content

Possible final fields with default accessors needs to be reviewed and updated #5030

Description

@vhvb1989

Checkstyle rule:

Fields should be 'final' when:

  • Initialized and never reassigned in constructor or other methods.
  • Only assigned in constructor and no other method.

Next cases below has one of this rules and fields are not final because they have default access to enable direct assignation from same package classes.

Please review each case and decide if this default access is required or if it can be changed to private and then adding a default access method in the class to have that field updated (encapsulate fields).

Each file is currently suppressed. Please remove checkstyle suppress after updating the file

Reference info:

Originally posted by @conniey in https://github.com/Azure/azure-sdk-for-java/pull/5009/files

Cases

1 KeyCreateOptions.java (KV)
2 LocalKeyCryptographyClient.java (KV)

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions