The doc USE flag in the ebuilds for the sun-jdk package has only the effect of adding a dependency on the documentation package. Since USE flags should generally correspond to differences in installed data, I think this dependency based on the doc USE flag should be dropped.
i think its ok to make an exception in this case