Avoid Classes with a High Public Data Ratio (JEE) | CAST Appmarq

Avoid Classes with a High Public Data Ratio (JEE)


Rule Definition
Public fields can be accessed by any other Class, therefore its value can be modified at any time, without control by the Class itself. This goes against OO Encapsulation concepts.

Remediation
Change the field visibility to private and provide appropriate accessors.

Related Technologies

Health Factor

  Total Quality Index


Technical Criterion
Programming Practices - Modularity and OO Encapsulation Conformity

About CAST Appmarq

CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.

Benchmark Statistics

Global Compliance

96.10%

Total Violations
16,648
Total Opportunities
426,841
Average Violations / App.
35.50
The compliance score represents 1 minus the ratio between the number of times a rule has been violated compared to the number of opportunities in a set of applications that the rule could have been violated.

Industry Insights

Telecommunications

91.08%

Financial Services

97.33%

Utilities

88.23%