this is simply unneeded, the setContentFromStream method called below is using getContent() so we are sure the Resource is initialized.