Skip to content

Commit

Permalink
Merge pull request #12983 from radcortez/srconfig-193
Browse files Browse the repository at this point in the history
Upgrade to SmallRye Config 1.9.3
  • Loading branch information
gsmet authored Oct 27, 2020
2 parents 6ab1dba + 6f97b00 commit 3554136
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<microprofile-reactive-streams-operators.version>1.0.1</microprofile-reactive-streams-operators.version>
<microprofile-rest-client.version>1.4.1</microprofile-rest-client.version>
<smallrye-common.version>1.4.1</smallrye-common.version>
<smallrye-config.version>1.9.2</smallrye-config.version>
<smallrye-config.version>1.9.3</smallrye-config.version>
<smallrye-health.version>2.2.5</smallrye-health.version>
<smallrye-metrics.version>2.4.4</smallrye-metrics.version>
<smallrye-open-api.version>2.0.13</smallrye-open-api.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.oracle.svm.core.threadlocal.FastThreadLocalInt;

import io.smallrye.common.constraint.Assert;
import io.smallrye.config.ConfigMappingMetadata;
import io.smallrye.config.Expressions;

/**
Expand Down Expand Up @@ -56,6 +57,15 @@ public static <T> T withoutExpansion(Supplier<T> supplier) {

@TargetClass(className = "io.smallrye.config.ConfigMappingLoader")
static final class Target_ConfigMappingLoader {
@Substitute
static Class<?> loadClass(final Class<?> parent, final ConfigMappingMetadata configMappingMetadata) {
try {
return parent.getClassLoader().loadClass(configMappingMetadata.getClassName());
} catch (ClassNotFoundException e) {
return null;
}
}

@Substitute
private static Class<?> defineClass(final Class<?> parent, final String className, final byte[] classBytes) {
return null;
Expand All @@ -77,5 +87,11 @@ public static Target_ConfigMappingInterface getConfigurationInterface(Class<?> i
return null;
}
}

// This should not be called, but we substitute it anyway to make sure we remove any references to ASM classes.
@Substitute
public byte[] getClassBytes() {
return null;
}
}
}

0 comments on commit 3554136

Please sign in to comment.