Skip to content

Commit 70a7de2

Browse files
authored
Merge pull request #1136 from jzinkweg/feature/go-migration
Log warning if java_opts.yml parsing fails
2 parents 32bd0bc + 647d233 commit 70a7de2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/java/frameworks/java_opts.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ func NewJavaOptsFramework(ctx *common.Context) *JavaOptsFramework {
2626
return &JavaOptsFramework{context: ctx}
2727
}
2828

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

0 commit comments

Comments
 (0)