Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/java/frameworks/java_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ func NewJavaOptsFramework(ctx *common.Context) *JavaOptsFramework {
return &JavaOptsFramework{context: ctx}
}

// Detect always returns true (universal framework for JAVA_OPTS configuration)
// Detect returns a positive result if loadConfig() finds settings (universal framework for JAVA_OPTS configuration)
func (j *JavaOptsFramework) Detect() (string, error) {
// Check if there's any configuration to apply
config, err := j.loadConfig()
if err != nil {
j.context.Log.Debug("Failed to load java_opts config: %s", err.Error())
// if detect "fails" Finalize() is not called so log parse failures as warning
j.context.Log.Warning("Failed to load java_opts config: %s", err.Error())
return "", nil
}

Expand Down