quarkusio/quarkus · error · java.lang.IllegalArgumentException

Not a hint info

Error message

Not a hint info

What it means

TypeInfo is a sealed hierarchy of parsed template expression fragments; only HintInfo subclasses implement asHintInfo(). The base TypeInfo.asHintInfo() unconditionally throws IllegalArgumentException('Not a hint info') when called on a non-hint node (e.g. a plain part, method, or bracket), acting as a safe downcast guard.

Source

Thrown at extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/TypeInfos.java:277

        boolean hasHints() {
            return false;
        }

        VirtualMethodInfo asVirtualMethod() {
            throw new IllegalArgumentException("Not a virtual method");
        }

        PropertyInfo asProperty() {
            throw new IllegalArgumentException("Not a property");
        }

        TypeInfo asTypeInfo() {
            throw new IllegalArgumentException("Not a type info: " + getClass().getName() + ":" + toString());
        }

        HintInfo asHintInfo() {
            throw new IllegalArgumentException("Not a hint info");
        }

        @Override
        public String toString() {
            return value;
        }

    }

    static abstract class HintInfo extends Info {

        static final Pattern HINT_PATTERN = Pattern.compile("\\<[a-zA-Z_0-9#-]+\\>");

        // <loop#1>, <set#10><loop-element>, etc.
        final List<String> hints;

        HintInfo(String value, Expression.Part part, String hintStr) {
            super(value, part);

View on GitHub (pinned to e1c734241f)

Solutions

  1. Call asTypeInfo() or instanceof-check HintInfo before calling asHintInfo()
  2. Inspect the expression in the template: the code expected a hint (loop/when section value hint) but found another fragment
  3. If it comes from a custom extension, fix the fragment-type dispatch logic

Example fix

// before
info.asHintInfo();
// after
if (info instanceof HintInfo) { info.asHintInfo(); } else { info.asTypeInfo(); }
Defensive patterns

Strategy: type-guard

Validate before calling

boolean isHint = info instanceof HintInfo;

Type guard

if (info instanceof HintInfo hint) {
    // safe to use hint-specific API
} else {
    TypeInfo type = info.asTypeInfo();
}

Prevention

When it happens

Trigger: Internal validation code (validateCheckedFragments, validateNestedExpressions, processRoot, processHintsIfNeeded) or third-party extension code walks type info fragments and calls asHintInfo() on a fragment that is not a hint.

Common situations: Custom Qute/extension code iterating expression parts and assuming every fragment is a hint; template expressions that end in a non-hint segment causing the traversal to hit the wrong node type.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/879001feecd282b3. Report an issue: GitHub.