Refactor - Use CreateEmptyInstance

Instead of empty array in CreateInstance because of unspecified
behaviour in Java.