Credit: Fame Pictures

Who wears short shorts?

Cameron Diaz!

The actress, 37, donned the skimpy duds Sunday in Los Angeles while shooting the comedy Bad Teacher, costarring her ex Justin Timberlake. (In the flick, Diaz plays a middle school teacher who develops a crush on another teacher, played by Timberlake, 29.)

Despite a rocky 2007 split, Diaz said she is psyched to work with her ex.

"We're thrilled to have him," she recently told Access Hollywood. "He's the best person for the job. He's going to be hilarious.

"He's clearly a very talented comedian -- look at his Saturday Night Live [skits]," she added. "He's fantastic. He's going to be so great."

Timberlake's current squeeze Jessica Biel also is thrilled that the exes are reuniting.

"It sounds like it will be so funny," she recently told E! News of the movie. "Obviously, I’m super-excited for him."