Skip to content

Commit 0bbedaa

Browse files
committed
Defined default implementation for the deprecated getConfigurationSource() method in order to remove it in the next major version
1 parent 4391834 commit 0bbedaa

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

common/src/main/java/com/kumuluz/ee/common/ConfigExtension.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public interface ConfigExtension extends Extension {
3535
* @deprecated Use {@link #getConfigurationSources()} instead.
3636
*/
3737
@Deprecated
38-
ConfigurationSource getConfigurationSource();
38+
default ConfigurationSource getConfigurationSource() {
39+
return null;
40+
}
3941

4042
default List<ConfigurationSource> getConfigurationSources() {
4143
return Collections.emptyList();

core/src/main/java/com/kumuluz/ee/EeApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ private void initialize() {
227227
List<ConfigurationSource> sources = extension.getExtension().getConfigurationSources();
228228

229229
if (sources == null || sources.size() == 0) {
230+
//noinspection deprecation
230231
sources = Collections.singletonList(extension.getExtension().getConfigurationSource());
231232
}
232233

0 commit comments

Comments
 (0)