Repository: quarkusio/quarkus
Issue: Qute 1.3.0.CR2 - property/method [raw] not found on class [java.lang.String]

**Describe the bug**
Updating from 1.2.1 to 1.3.0.CR2 now gives me the following BuildException, that previously worked in 1.2.1:

```
[1] Incorrect expression: playable.getPlayTitleEmbed().raw
        - property/method [raw] not found on class [java.lang.String] nor handled by an extension method
        - found in template [play.html] on line 6
```

Snippet from play.html contains the following:
```
{@com.foo.model.Playable playable}
{playable.getPlayTitleEmbed().raw}
```

where Playable is an interface:
```
@TemplateData
public interface Playable {
  public String getPlayTitleEmbed();
```

If I change the template code to `{playable.getPlayTitleEmbed}` and change the method to be `public RawString getPlayTitleEmbed();`, I instead get the following warning upon startup:
```
WARN  [io.qua.dep.ste.ReflectiveHierarchyStep] (build-36) Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
        - io.quarkus.qute.RawString
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.");.
```

**Environment (please complete the following information):**
Quarkus 1.3.0.CR2
Java 11.0.6
Maven 3.6.3



Changed files:
extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/EscapingTest.java
extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeCheckExcludeBuildItem.java
extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java

diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java
index 4df0854ceee..71e734b6532 100644
--- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java
+++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java
@@ -118,6 +118,7 @@ public class QuteProcessor {
 
     static final DotName MAP_ENTRY = DotName.createSimple(Entry.class.getName());
     static final DotName COLLECTION = DotName.createSimple(Collection.class.getName());
+    static final DotName STRING = DotName.createSimple(String.class.getName());
 
     private static final String MATCH_NAME = "matchName";
     private static final String PRIORITY = "priority";
@@ -711,16 +712,21 @@ ServiceProviderBuildItem registerPublisherFactory() {
 
     @BuildStep
     void excludeTypeChecks(BuildProducer<TypeCheckExcludeBuildItem> excludes) {
-        // Exclude all checks that involve built-in value resolvers that accept at least one parameter
+        // Exclude all checks that involve built-in value resolvers
+        // TODO we need a better way to exclude value resolvers that are not template extension methods
         excludes.produce(new TypeCheckExcludeBuildItem(new Predicate<Check>() {
             @Override
             public boolean test(Check check) {
+                // RawString
+                if (check.isProperty() && check.classNameEquals(STRING) && check.nameIn("raw", "safe")) {
+                    return true;
+                }
                 // Elvis and ternary operators
-                if (check.numberOfParameters == 1 && check.nameEquals("?:", "or", ":", "?")) {
+                if (check.numberOfParameters == 1 && check.nameIn("?:", "or", ":", "?")) {
                     return true;
                 }
                 // Collection.contains()
-                if (check.numberOfParameters == 1 && check.clazz.name().equals(COLLECTION) && check.name.equals("contains")) {
+                if (check.numberOfParameters == 1 && check.classNameEquals(COLLECTION) && check.name.equals("contains")) {
                     return true;
                 }
                 return false;
diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeCheckExcludeBuildItem.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeCheckExcludeBuildItem.java
index e3829fd37d2..efca6374b42 100644
--- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeCheckExcludeBuildItem.java
+++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeCheckExcludeBuildItem.java
@@ -3,6 +3,7 @@
 import java.util.function.Predicate;
 
 import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
 
 import io.quarkus.builder.item.MultiBuildItem;
 
@@ -44,7 +45,7 @@ public Check(String name, ClassInfo clazz, int parameters) {
             this.numberOfParameters = parameters;
         }
 
-        public boolean nameEquals(String... values) {
+        public boolean nameIn(String... values) {
             for (String value : values) {
                 if (name.equals(value)) {
                     return true;
@@ -53,6 +54,14 @@ public boolean nameEquals(String... values) {
             return false;
         }
 
+        public boolean isProperty() {
+            return numberOfParameters == -1;
+        }
+
+        public boolean classNameEquals(DotName name) {
+            return clazz.name().equals(name);
+        }
+
     }
 
 }
diff --git a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/EscapingTest.java b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/EscapingTest.java
index 40488586bde..a5c54c1a4fa 100644
--- a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/EscapingTest.java
+++ b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/EscapingTest.java
@@ -10,6 +10,7 @@
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
+import io.quarkus.qute.Engine;
 import io.quarkus.qute.RawString;
 import io.quarkus.qute.Template;
 import io.quarkus.qute.TemplateData;
@@ -26,7 +27,9 @@ public class EscapingTest {
                     .addAsResource(new StringAsset("{item} {item.raw}"),
                             "templates/item.html")
                     .addAsResource(new StringAsset("{text} {other} {text.raw} {text.safe} {item.foo}"),
-                            "templates/bar.txt"));
+                            "templates/bar.txt")
+                    .addAsResource(new StringAsset("{@java.lang.String text}{text} {text.raw} {text.safe}"),
+                            "templates/validation.html"));
 
     @Inject
     Template foo;
@@ -37,6 +40,9 @@ public class EscapingTest {
     @Inject
     Template item;
 
+    @Inject
+    Engine engine;
+
     @Test
     public void testEscaper() {
         assertEquals("&lt;div&gt; &amp;&quot;&#39; <div> <div> <span>",
@@ -49,6 +55,12 @@ public void testEscaper() {
                 item.data("item", new Item()).render());
     }
 
+    @Test
+    public void testValidation() {
+        assertEquals("&lt;div&gt; <div> <div>",
+                engine.getTemplate("validation").data("text", "<div>").render());
+    }
+
     @TemplateData
     public static class Item {