-
Notifications
You must be signed in to change notification settings - Fork 641
Description
Search before asking
- I had searched in the issues and found no similar issues.
Enhancement Request




located at:
eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/metrics PrometheusGrpcExporter PrometheusHttpExporter PrometheusTcpExporter
eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java line 73
analysis and explanation:
a. Field 'paramPairs' may be 'final'
b. Non-static initializers are rarely used, and can be confusing for most developers because they only run when new class instances are created. When possible, non-static initializers should be refactored into standard constructors or field initializers.
c. Local variable 'array' is redundant
Describe the solution you'd like
a.add final

b. Use another way to initialize this instance

c.inline variable

Are you willing to submit PR?
- Yes I am willing to submit a PR!