forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SmallRye Fault Tolerance: upgrade to 6.7.0
This commit not only bumps the SmallRye Fault Tolerance version, but also adapts the extension to the extensive changes made in this version. This especially includes: - deprecation of `FaultTolerance` and `@ApplyFaultTolerance`; replacements are `Guard`, `TypedGuard` and `@ApplyGuard` - new `smallrye.faulttolerance.*` configuration properties, together with adaptation to `quarkus.fault-tolerance.*` Most changes in this commit are added tests, which all adapt an already existing test in SmallRye Fault Tolerance.
- Loading branch information
Showing
48 changed files
with
2,126 additions
and
35 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
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
43 changes: 43 additions & 0 deletions
43
...loyment/src/main/java/io/quarkus/smallrye/faulttolerance/deployment/ConfigUtilJandex.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,43 @@ | ||
package io.quarkus.smallrye.faulttolerance.deployment; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
import org.jboss.jandex.ClassInfo; | ||
import org.jboss.jandex.MethodInfo; | ||
|
||
import io.smallrye.faulttolerance.config.ConfigPrefix; | ||
import io.smallrye.faulttolerance.config.NewConfig; | ||
|
||
// copy of `io.smallrye.faulttolerance.config.ConfigUtil` and translation from reflection to Jandex | ||
final class ConfigUtilJandex { | ||
static final String GLOBAL = "global"; | ||
|
||
static String newKey(Class<? extends Annotation> annotation, String member, MethodInfo declaringMethod) { | ||
return ConfigPrefix.VALUE + "\"" + declaringMethod.declaringClass().name() + "/" + declaringMethod.name() | ||
+ "\"." + NewConfig.get(annotation, member); | ||
} | ||
|
||
static String oldKey(Class<? extends Annotation> annotation, String member, MethodInfo declaringMethod) { | ||
return declaringMethod.declaringClass().name() + "/" + declaringMethod.name() | ||
+ "/" + annotation.getSimpleName() + "/" + member; | ||
} | ||
|
||
static String newKey(Class<? extends Annotation> annotation, String member, ClassInfo declaringClass) { | ||
return ConfigPrefix.VALUE + "\"" + declaringClass.name() + "\"." | ||
+ NewConfig.get(annotation, member); | ||
} | ||
|
||
static String oldKey(Class<? extends Annotation> annotation, String member, ClassInfo declaringClass) { | ||
return declaringClass.name() + "/" + annotation.getSimpleName() + "/" + member; | ||
} | ||
|
||
static String newKey(Class<? extends Annotation> annotation, String member) { | ||
return ConfigPrefix.VALUE + GLOBAL + "." + NewConfig.get(annotation, member); | ||
} | ||
|
||
static String oldKey(Class<? extends Annotation> annotation, String member) { | ||
return annotation.getSimpleName() + "/" + member; | ||
} | ||
|
||
// no need to have the `isEnabled()` method, that is only needed at runtime | ||
} |
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
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.