'migrate', tool uses an incorrect replacement for the UriParameter
StSche opened this issue · comments
The following replacement is done by the migration tool:
„jQuery.sap.getUriParameters().get("$direct")“ by “new UriParameters(window.location.href).get("$direct")”
But in the JSDoc of the UriParameter is described under "Future Migration", one should not use the constructor
Future Migration
* * Note: To simplify a future migration from this class to the standardURLSearchParams
* API, consuming code should follow some recommendations:
* -
*
- **do not use the constructor,** either use {@link #.fromURL UriParameters.fromURL} when the input is a full URL,
* or use {@link #.fromQuery UriParameters.fromQuery} when the input only contains the query part of an URL
* (e.g.
location.search
).
* - do not use the
get
method with the second parameterbAll
; use thegetAll
* method instead
* - do not access the internal property
mParams
(you never should access internal properties of * UI5 classes or objects). With the predecessor of this API, access tomParams
was often used * to check whether a parameter is defined at all. Using the newhas
method or checking the * result ofget
againstnull
serves the same purpose.
*
Thanks for this feedback.
This is definitely something which needs to be adjusted.
#fromURL was introduced with 1.68.0 and should be used