Originally Posted by Landric
Technically speaking the frame is the firearm, a matching serial number on the slide, barrel, or any other part is meaningless, legally speaking. However, if your handgun is listed as being a .40 S&W on your permit, then I wouldn't carry it with the 9mm barrel. Doing so could be seen as a violation in California, depending on exactly what the law says.
I agree... It's hard enough to get a CA CCW in some areas, I wouldn't risk losing your permit (or worse) because some politician thinks you're abusing a technicality.