Skip to content

Commit

Permalink
Merge pull request #24207 from manovotn/replaceStringWithClassReference
Browse files Browse the repository at this point in the history
Arc - Replace hard coded String with class reference
  • Loading branch information
gsmet authored Mar 9, 2022
2 parents 9526be3 + 6069a11 commit 5663226
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ Collection<Resource> generate(String name, BeanDeployment beanDeployment,

void createSharedAnnotationLiteral(ClassOutput classOutput, Key key, Literal literal, Set<String> existingClasses) {
// Ljavax/enterprise/util/AnnotationLiteral<Lcom/foo/MyQualifier;>;Lcom/foo/MyQualifier;
String signature = String.format("Ljavax/enterprise/util/AnnotationLiteral<L%1$s;>;L%1$s;",
String signature = String.format("L%1$s<L%2$s;>;L%2$s;",
AnnotationLiteral.class.getName().replace('.', '/'),
key.annotationName.toString().replace('.', '/'));
String generatedName = literal.className.replace('.', '/');
if (existingClasses.contains(generatedName)) {
Expand Down Expand Up @@ -122,7 +123,8 @@ static void createAnnotationLiteral(ClassOutput classOutput, ClassInfo annotatio
.collect(Collectors.toMap(AnnotationValue::name, Function.identity()));

// Ljavax/enterprise/util/AnnotationLiteral<Lcom/foo/MyQualifier;>;Lcom/foo/MyQualifier;
String signature = String.format("Ljavax/enterprise/util/AnnotationLiteral<L%1$s;>;L%1$s;",
String signature = String.format("L%1$s<L%2$s;>;L%2$s;",
AnnotationLiteral.class.getName().replace('.', '/'),
annotationClass.name().toString().replace('.', '/'));
String generatedName = literalName.replace('.', '/');

Expand Down

0 comments on commit 5663226

Please sign in to comment.