Incorrect parameter type of resource method
Reports resource method parameters (annotated with @PathParam
, @QueryParam
, and so on) with unsupported types.
The type of the annotated parameter, field, or property must meet one of the following requirements:
Be a primitive type
Have a constructor that accepts a single
String
argumentHave a static method named
valueOf()
orfromString()
that accepts a singleString
argument, for example,Integer.valueOf(String)
.Have a registered implementation of
ParamConverterProvider
JAX-RS extension SPI that returns aParamConverter
instance capable of converting a string to a particular type.Be
List<T>
,Set<T>
, orSortedSet<T>
, where T satisfies 2, 3, or 4 above. The resulting collection is read-only.
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Jakarta EE: RESTful Web Services (JAX-RS), 233.SNAPSHOT |