-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not validate configs in unused beans
- Loading branch information
Showing
14 changed files
with
492 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
core/deployment/src/main/java/io/quarkus/deployment/builditem/ConfigMappingBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import java.util.Objects; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
import io.quarkus.runtime.annotations.StaticInitSafe; | ||
|
||
public final class ConfigMappingBuildItem extends MultiBuildItem { | ||
private final Class<?> configClass; | ||
private final String prefix; | ||
|
||
public ConfigMappingBuildItem(final Class<?> configClass, final String prefix) { | ||
this.configClass = configClass; | ||
this.prefix = prefix; | ||
} | ||
|
||
public Class<?> getConfigClass() { | ||
return configClass; | ||
} | ||
|
||
public String getPrefix() { | ||
return prefix; | ||
} | ||
|
||
public boolean isStaticInitSafe() { | ||
return configClass.isAnnotationPresent(StaticInitSafe.class); | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final ConfigMappingBuildItem that = (ConfigMappingBuildItem) o; | ||
return configClass.equals(that.configClass) && | ||
prefix.equals(that.prefix); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(configClass, prefix); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
core/deployment/src/main/java/io/quarkus/deployment/builditem/ConfigPropertiesBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import java.util.Objects; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
public final class ConfigPropertiesBuildItem extends MultiBuildItem { | ||
private final Class<?> configClass; | ||
private final String prefix; | ||
|
||
public ConfigPropertiesBuildItem(final Class<?> configClass, final String prefix) { | ||
this.configClass = configClass; | ||
this.prefix = prefix; | ||
} | ||
|
||
public Class<?> getConfigClass() { | ||
return configClass; | ||
} | ||
|
||
public String getPrefix() { | ||
return prefix; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final ConfigPropertiesBuildItem that = (ConfigPropertiesBuildItem) o; | ||
return configClass.equals(that.configClass) && | ||
prefix.equals(that.prefix); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(configClass, prefix); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.