MCPcopy Create free account
hub / github.com/cloudfoundry/java-buildpack / isEnabled

Method isEnabled

src/java/frameworks/jmx.go:100–112  ·  view source on GitHub ↗

isEnabled checks if JMX is enabled

()

Source from the content-addressed store, hash-verified

98
99// isEnabled checks if JMX is enabled
100func (j *jmxConfig) isEnabled() bool {
101 // Check BPL_JMX_ENABLED first (Cloud Native Buildpacks convention)
102 bplEnabled := os.Getenv("BPL_JMX_ENABLED")
103 if bplEnabled == "true" || bplEnabled == "1" {
104 return true
105 }
106 if bplEnabled == "false" || bplEnabled == "0" {
107 return false
108 }
109
110 // Check JBP_CONFIG_JMX environment variable (Java Buildpack convention)
111 return j.Enabled
112}
113
114// getPort returns the JMX port
115func (j *jmxConfig) getPort() int {

Callers 1

DetectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected