We study optimal investment in assets subject to risk of default for investors that rely on different levels of information. The price dynamics can include noises both from a Wiener process and a Poisson random measure with infinite activity. The default events are modeled via doubly stochastic Poisson processes in line with large part of the literature in credit risk. In order to deal with both cases of inside and partial information we consider the framework of the anticipating calculus of forward integration. This does not require the assumptions typical of the framework of enlargement of filtrations. We then solve the optimization problem for maximum expected utility at terminal time for a large class of utility functions. Various examples are provided.