Get returns the JRE whose Name() matches the given name, or nil if not found. Used by the finalize phase to resolve a JRE by the name stored in config.yml.
(name string)
| 107 | // Get returns the JRE whose Name() matches the given name, or nil if not found. |
| 108 | // Used by the finalize phase to resolve a JRE by the name stored in config.yml. |
| 109 | func (r *Registry) Get(name string) JRE { |
| 110 | for _, jre := range r.providers { |
| 111 | if jre.Name() == name { |
| 112 | return jre |
| 113 | } |
| 114 | } |
| 115 | return nil |
| 116 | } |
| 117 | |
| 118 | // Detect finds the JRE provider that should be used |
| 119 | // If a JRE is explicitly configured, it uses that JRE and fails if detection errors |
no test coverage detected