Weak protection for vanishing whales violates law, judge says