What Does @PrintFormat "Unsubstituted expression" Mean?


I'm seeing an inspection warning that says only "Unsubstituted expression" on a parameter to a method call. It appears this is related to the use of the IntelliLang @PrintFormat annotation on the formal parameter declaration corresponding to this actual parameter. I can't find any documentation on this diagnostic, however.

I'm running IDEA 6.0.5/#6180 and IntelliLang 1.2.3.


Randall Schulz


A piece of extra information:

This inspection warning appears only when a variable is passed through to a formal parameter annotated with @PrintFormat. When a literal character string is used, the warning is not produced.

Randall Schulz


Hello Randall,

sorry for the delayed response, but even though I do read these forums, subjects that don't explicitly name a plugin are easy to miss, especially for topics would that belong into the plugins forum ;)

"Unsubstituted expression" means that IntelliLang isn't able to analyze the string being passed/assigned to a variable because it's neither compile time constant nor annotated with an @Subst annotation. There's also an option in the inspection configuration (Settings -> Errors -> Pattern Validation -> Validate Annotated Patterns | "Flag non compile-time constants expressions") that allows to exclude such expressions from static checks.

If you think this warning is incorrect, please post (or send me via email) a code fragment that shows the warning.




Thanks for the explanation.

So, given what you say, I don't think the behavior I'm seeing is incorrect.

Randall Schulz


Please sign in to leave a comment.