Re-arrange code, such that no warnings is written to the log if everything was done correctly. In detail, the current Constructor called internally an older, deprecated constructor which generated a warning, which was unnecessary because the newer Constructor took care of the reported "problem".