Judge upholds Cook Inlet belugas as endangered