Skip to content

Commit f223464

Browse files
committed
Adjust adding non-empty thresholds
1 parent 12df9f4 commit f223464

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/java/frameworks/java_memory_assistant.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ func (j *JavaMemoryAssistantFramework) buildAgentConfig() string {
147147
// Thresholds (default: old_gen >600MB)
148148
thresholds := config.getThresholds()
149149
for memArea, threshold := range thresholds {
150-
configParts = append(configParts, fmt.Sprintf("-Djma.threshold.%s=%s", memArea, threshold))
150+
if threshold != "" {
151+
configParts = append(configParts, fmt.Sprintf("-Djma.threshold.%s=%s", memArea, threshold))
152+
}
151153
}
152154

153155
return strings.Join(configParts, " ")

0 commit comments

Comments
 (0)