The method encode(String) from the type URLEncoder is deprecated


i use in my rules the URLEncoder, this way


and then for example for a poster image

var String newValueactorposter3 = actor1_movie3_poster.toString
var String newValueactorposter3_encoded = URLEncoder::encode(newValueactorposter3)
var String actorposter_movie3_complete = "" + newValueactorposter3_encoded

but i still get the warning that the URLEncoder is deprecated.

Can me someone say thats the right way`?


That’s really a question about the java version you are using.
Does it work?
Will you be changing the java version anytime soon?
But this looks easy enough to avoid

1 Like

Java 11 with openhab 3 m3.

I take a Look at the link