Either leave the warning - which is irritating,
or create precursor code with a comment
//TODO When *text* can have alternatives, create a switch statement.
TODO comments will normally be listed in the IDE.
In this way you will keep your code at the correct technical stage without
(unfounded?) assumption that more cases will follow.
Of course the real problem here is that a future alternative risks not to be covered. You hope that a future addition will give a future warning that not all cases are covered.
The solution could be made using OOP: instead a switch a method of the base class.
For instance with an enum:
public enum MyEnum { APP1;
public String getAppName() {
return "app1";
}
}
MyEnum text = ...;
return text.getAppName();