OVT-7393: Use %n instead of \n

When formatting strings.
OVT-7393: Mark parameter as @Nonnull
Fix formatting