
23 Cal.App.4th 366 (1994)
28 Cal. Rptr.2d 439
In re DOMANIC B., a Person Coming Under the Juvenile Court Law.
THE PEOPLE, Plaintiff and Respondent,
v.
DOMANIC B., Defendant and Appellant.
Docket No. A060483.
Court of Appeals of California, First District, Division Five.
March 17, 1994.
*367 COUNSEL
Kieran D.C. Manjarrez, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney General, Thomas A. Brady and Don Jacobson, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
PETERSON, P.J.
Appellant Domanic B. contends the juvenile court acted improperly when it ordered that he receive a stayed commitment to the California Youth Authority (CYA), as in effect a condition of probation. There is a conflict in our district on this point. Certain dicta contained in a decision of Division Two, In re Ronnie P. (1992) 10 Cal. App.4th 1079, 1089-1090 [12 Cal. Rptr.2d 875], apparently cast doubt on the propriety of the imposition of a suspended or stayed CYA term. However, more recently Division One has criticized and parted company with the Ronnie P. dicta. (In re Kazuo G. (1994) 22 Cal. App.4th 1, 7-11 [27 Cal. Rptr.2d 155].) We agree with Division One. We hold in the published portion of this opinion that a juvenile court may impose a stayed or suspended CYA commitment, provided the general procedural requirements of Welfare and Institutions Code[1] section 777, the filing of a supplemental petition and a noticed hearing thereon, are followed before the stay is lifted. We, therefore, affirm the orders of the juvenile court.


*368 I. FACTS AND PROCEDURAL HISTORY
Appellant was charged with and admitted that he had escaped from previous custody at Los Cerros Ranch (Los Cerros). Appellant was also charged with the possession of rock cocaine, when he was picked up by the police after escaping from Los Cerros. Appellant disputed this charge.
The evidence as to the cocaine charge was in conflict, but we summarize the record as follows. On December 10, 1992, appellant and two young companions were in a car which was stopped by police officers in Oakland, because their car did not have a license plate on the front. They were approached by Officers Mabanag and Yoell of the Oakland Police Department, while the car was pulled over in front of a liquor store, near the Bosn's Locker restaurant in Oakland. Appellant was the only person sitting in the rear seat; he was on the right side of the rear seat, in an unusual, hunched-over posture, and appeared to be putting or dropping something on the floorboard of the car.
Officer Mabanag shined his flashlight into the car and saw what appeared to be a plastic baggie containing rock cocaine drop out of appellant's hands. Officer Mabanag placed appellant under arrest and picked up two rocks of cocaine from the right rear floorboard of the car.
Appellant said his name was "Juan Baxter." Appellant made a statement at the time of the arrest: "I was sitting in the back seat and I didn't have any drugs. I don't know what your [sic] talking about. This is a true statement." Appellant appeared to start to sign the statement with his true name, Domanic, but then scratched out the initial "D" and signed it as "Juan Baxter."
Appellant had previously been picked up by the police on two occasions on drug charges; and in addition to being in custody at Los Cerros, he was on probation for the drug charges and also had a previous assault weapon charge. Appellant's companions were also on parole or probation for selling drugs.
Appellant took the stand and denied having the cocaine in his possession. He admitted being in the rear seat of the car, but claimed he was on the driver's side, not the passenger's side on the right. He also admitted the car was searched; the officer appeared to find something resembling cocaine in the car; he himself had escaped from Los Cerros; and he gave a false name to the officers.
The defense also called two witnesses in an attempt to discredit the testimony of Officer Mabanag. Oran Payne testified that on another occasion *369 he was pulled out of his car and harassed by Officer Mabanag (who was accompanied by a polite female officer) because Payne was in front of the home of one of Mabanag's friends and Payne's car was too far out from the curb. Payne was interrogated by Mabanag and warrant checks were run on him. His car was searched, but the officers found nothing. Eventually he was released without charges, but Mabanag warned Payne that he was out to get dope dealers. Payne told Mabanag he wanted to file a complaint against him with the police department, so Mabanag told Payne his name and wrote it out for him, together with his badge number, on a piece of paper. Payne filed a complaint with the department the next day.
Yolanda Johnson also testified she was detained by Officer Mabanag. While Johnson was walking home, Mabanag drove up to her, demanded her name, searched her purse, did a warrant check, and eventually released her without charges.
In rebuttal, the prosecution recalled Officer Mabanag regarding the two incidents with Payne and Johnson; the prosecution also called Officer Yoell, who was with Mabanag at the time appellant was arrested. Mabanag testified he told Payne he was parked wrong and that he should not park in front of his friend's house, since he did not want Payne to park there. Payne was much bigger than Mabanag and was belligerent. The department investigated Payne's complaint and determined it to be unfounded. Mabanag testified he stopped Johnson on the street because she appeared to be involved in a drug transaction. The suspected drug seller ran away. Johnson, the suspected buyer, approached the car, claimed she had no drugs, and told Mabanag to check her purse if he wanted. Mabanag found a baggie and a piece of wire inside the purse, but no cocaine. Mabanag ran a warrant check on her, whereupon she became angry.
Officer Yoell testified that he was with Officer Mabanag when appellant was arrested and that he, not Officer Mabanag, initiated the traffic stop of the car in which appellant was riding. Appellant was sitting in the rear seat on the right side, not the left side as appellant had testified.
Appellant argued the rock cocaine found in the car should be suppressed, because the car was illegally stopped, appellant was illegally detained, and the officers lacked probable cause to arrest him. Appellant referred to the incidents with Payne and Johnson as showing a pattern of illegal detentions by Mabanag.
The trial court ruled that the stop, detention, and search were legal. The court observed that Officer Mabanag was not a "dream witness" for the *370 prosecution, and noted that his behavior in regards to Payne and Johnson was apparently problematic. However, Officer Mabanag's testimony about his arrest of appellant, as corroborated in relevant part by the testimony of Officer Yoell, was truthful. The court found appellant had possessed the cocaine as charged.
As to a disposition for the minor, the probation department prepared a report with a recommendation that appellant serve 30 days in juvenile hall, then return to Los Cerros, and have a stayed or suspended commitment to CYA. Appellant's counsel requested that the trial court follow this recommendation; and the court, over the objection of the prosecutor who sought an immediate CYA commitment, did impose the suspended CYA commitment, and other terms and conditions which the probation department and appellant sought.
Appellant timely appealed.

II. DISCUSSION
We affirm. The trial court's decision is amply supported by the record, and there was no abuse of discretion in imposing a suspended CYA commitment.

A. Substantial Evidence[*]
.... .... .... .... .... .... .... .

B. Stayed or Suspended Commitment to CYA

(1) Appellant contends the court erred when it accepted the recommendation of the probation department, and imposed a stayed or suspended commitment to CYA. He relies on language taken from a decision of Division Two of this district, In re Ronnie P., supra, 10 Cal. App.4th at pages 1089-1090, which opines in apparent dicta that a stayed or suspended commitment to CYA is beyond the power of a juvenile court: "Underlying [the prosecution] argument is the concept of retributive justice which is explicitly incorporated in adult penal law [citation] and just as explicitly excluded from the juvenile court law [citation]. A juvenile disposition is not an act of graceful abstention by the state, the benefits of which the minor forfeits by misconduct.... [¶] A `stayed' [CYA] commitment has no place in this scheme."
Appellant's reliance on this language from Ronnie P. is misplaced.
*371 Critically viewed, the Ronnie P. court simply held there was no substantial evidence the minor in that case had acted criminally when, while recovering from a head injury, he wandered away from a restaurant where juvenile authorities had mistakenly taken him; therefore, it was an abuse of discretion to commit him to CYA merely because he had previously received a suspended or stayed commitment to CYA. (10 Cal.4th at pp. 1083-1085.) That holding in the case, as opposed to the dicta in the Ronnie P. opinion, was evidently sound.
Ronnie P. recognized that a juvenile court may, as it did here, warn a minor that further criminal behavior will result in actual commitment to CYA: "Of course, the threat of [CYA] commitment may have a salutary effect on a particular minor's attitude, and nothing said here should be understood to restrict the court's ability to employ such a threat to encourage the minor's reform." (10 Cal. App.4th at p. 1090, fn. 8.)
There is obviously, however, an unresolved inconsistency which cannot be rationalized in the Ronnie P. court's assertion, unsupported by relevant authority, that a stayed or suspended CYA commitment "has no place" in the juvenile law, and the directly contrary assertion, on the same page, that the threat of a CYA commitment could serve the salutary purpose of rehabilitation so that "nothing said here should be understood to restrict" such a practice. (Compare 10 Cal. App.4th at p. 1090 with p. 1090, fn. 8.)
It would seem absurd to conclude that a judge may properly threaten a juvenile with what amounts to a stayed CYA term, but lacks the authority to impose one. Common sense compels the conclusion that the action least likely to reform a delinquent juvenile is a hollow threat that cannot be carried out.[2] Thus, this internal inconsistency and impracticality in the above quoted language of the Ronnie P. opinion precludes its extension beyond its particular facts. In an era of rising violent juvenile crime, literal application of that Ronnie P. language would rob a juvenile court of one of its most effective tools in performing a critical mandated duty to protect the public: the imposition of a stayed CYA commitment as a condition of probation.
Further, relevant authorities not cited or discussed in the Ronnie P. opinion point up its flawed analysis. For instance, the Ronnie P. court did not cite or discuss the 1984 amendments to the Juvenile Court Law. As Presiding Justice Low of this division observed, "At the core of the dispute before us is a fundamental disagreement over the purposes of the Juvenile Court Law. Prior to the amending of section 202, California courts ... *372 consistently held that `[j]uvenile commitment proceedings are designed for the purposes of rehabilitation and treatment, not punishment.' [Citation.]" (In re Michael D. (1987) 188 Cal. App.3d 1392, 1396 [234 Cal. Rptr. 103].) "In 1984, the Legislature replaced the provisions of section 202 with new language which emphasized different priorities for the juvenile justice system. [Citation.] The new provisions recognized punishment as a rehabilitative tool. (§ 202, subd. (b).) Section 202 also shifted its emphasis from a primarily less restrictive alternative approach oriented towards the benefit of the minor to the express `protection and safety of the public' [citations], where care, treatment, and guidance shall conform to the interests of public safety and protection. [Citation.]" (Ibid.)
"Finally, the 1984 amendments to the juvenile court law reflected an increased emphasis on punishment as a tool of rehabilitation, and a concern for the safety of the public. [Citation.] Reviewed under this standard and in light of these principles, the minor's contentions are without merit." (In re Asean D. (1993) 14 Cal. App.4th 467, 473 [17 Cal. Rptr.2d 572].) Also, as amended once again in 1989 (Stats. 1989, ch. 569, § 1, p. 1875), the Juvenile Court Law sets forth in section 202 the goals that "Juvenile courts and other public agencies charged with enforcing, interpreting, and administering the juvenile court law shall consider the safety and protection of the public and the best interests of the minor in all deliberations pursuant to this chapter." (Subd. (d), italics added.) The imposition of a suspended or stayed CYA term, as in effect a condition of probation, serves those goals.
More critically, quite apart from the 1984 and 1989 amendments to the Juvenile Court Law, Supreme Court authority not cited by the Ronnie P. court rejects its rationale; i.e., the notion that a suspended juvenile custody commitment can only be retributive and, therefore, "has no place" in the juvenile law. In the case of In re Lance W. (1985) 37 Cal.3d 873, 896-899 [210 Cal. Rptr. 631, 694 P.2d 744], the Supreme Court upheld such suspended or stayed commitments, in the context of a suspended commitment to juvenile hall, and rejected the claim that such a stayed commitment does violence to the legitimate goal of rehabilitation of juvenile offenders. "Nor do we perceive any abuse of discretion in the court's conclusion that the stayed [juvenile hall commitment] order was appropriate and would serve the purpose of the Juvenile Court Law by deterring future violations and thus encouraging rehabilitation.... The prior disposition having been ineffective in rehabilitating appellant, the court could reasonably conclude that when appellant was again returned to the home of his parents on probation, the threat of further confinement if he again violated the terms of probation would serve as a deterrent to delinquent behavior." (Id. at p. 899.) The same *373 is true here: The suspended or stayed term functions as an important part of the rehabilitative process, as a probationary or conditional term.
The Ronnie P. court did not cite the Lance W. decision which relies, inter alia, upon authorities Ronnie P. cites, such as the Legislature's express codification of the practice, which originally arose from case law, of imposing stayed terms in juvenile hall without the filing of a supplemental petition (§ 777, subd. (e)).
If a suspended juvenile hall commitment may serve rehabilitative purposes by deterring further criminal acts, a fortiori so may a suspended CYA commitment. In addition, the Lance W. case correctly held that the purpose of section 777, subdivision (e), which codified suspended commitments to juvenile hall, was to give statutory recognition to a practice established in case law of long standing, which allowed such recommitments without filing a new petition. There is, therefore, no merit in the suggestion that the Legislature intended to forbid, sub silentio, all other suspended or stayed juvenile custody commitments when a supplemental petition is filed, as the Ronnie P. court seems to suggest without citing Lance W. at all. (See In re Benny S. (1991) 230 Cal. App.3d 102, 110-111 [281 Cal. Rptr. 1].)[3]
We, therefore, agree with our colleagues in Division One: "We reiterate our agreement with Ronnie P. that a prior stay of a juvenile commitment may not be automatically lifted at a subsequent dispositional proceeding, but we find the Supreme Court's holding in In re Lance W., supra, controlling. A juvenile commitment may be imposed and stayed when probation is granted  to serve as a warning to the minor where his continued delinquency will lead." (In re Kazuo G., supra, 22 Cal. App.4th at p. 9.) "The court in Ronnie P. failed to make the distinction made in Benny S. between a stay of commitment, imposed as a condition of probation, and a lifting of the stay when probation has been violated." (Id. at p. 10.) As Division One has indicated, a suspended or stayed CYA commitment is entirely consistent with the Juvenile Court Law.
The Juvenile Court Law has long since been changed from the days when rehabilitation was the only goal, and most youth offenders were nonviolent *374 truants or other status offenders who posed no real threat to society. (See § 601.) Instead, we here must apply the amended version of the Juvenile Court Law, which also mandates protection of the public (§ 202), to an apparently incorrigible minor with repeated arrests for drug dealing in a notoriously violent area of Oakland, who was previously convicted of possessing an illegal assault weapon, and who thereupon escaped from custody to resume drug dealing. As the trial court observed, "I share many of the concerns as expressed by the district attorney. And I believe that there is sufficient basis for this Court at this time to commit this minor to the [CYA] on the basis of his conduct. [¶] ... It makes a Court nervous to have kids out selling dope and being armed with firearms at the same time because they are, they constitute the kind of danger that [the district attorney] was speaking about."
The trial court determined it was appropriate, however, to give appellant one last chance to avoid commitment to CYA. The court also determined that appellant was more likely to succeed in rehabilitating himself, and the public was more likely to be protected from further criminal acts, if appellant had hanging over his head a stayed CYA commitment.[4] We conclude there was no abuse of discretion in imposing such a suspended CYA commitment on appellant.[5] "There was substantial evidence supporting the trial court's exercise of discretion." (In re Michael D., supra, 188 Cal. App.3d at p. 1397.)


*375 III. DISPOSITION
The juvenile court's orders are affirmed.
King, J., and Haning, J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of part II.A.
[1]  All subsequent statutory references are to the Welfare and Institutions Code.
[*]   See footnote, ante, page 366.
[2]  As appellant's own counsel conceded at oral argument, when asked about this dicta in the Ronnie P. opinion, "It doesn't make any sense."
[3]  In fact, such stayed CYA commitments appear to be a common and acceptable practice. For instance, in Antonio G. v. Superior Court (1993) 14 Cal. App.4th 422, 425-427 [17 Cal. Rptr.2d 552], the Court of Appeal held that, where a stayed CYA commitment is imposed and thereafter the minor's behavior warrants actual immediate commitment to CYA, the minor cannot interpose a peremptory challenge to the juvenile court judge, since lifting the stay on the commitment to CYA would simply be part of the same continued proceeding in juvenile court. Antonio G. cited Ronnie P. but did not follow its dicta. We do the same.
[4]  We concur with this analysis of the Kazuo G. court: "A juvenile commitment may be imposed and stayed when probation is granted  to serve as a warning to the minor where his continued delinquency will lead. [¶] Moreover, in our view, subdivision (e) of section 777 contemplates just such a procedure. It provides: `The filing of a supplemental petition and the hearing thereon shall not be required for the commitment of a minor to a county institution for a period of 30 days or less pursuant to an original or a previous order imposing a specified time in custody and staying the enforcement of the order subject to subsequent violation of a condition or conditions of probation, provided that in order to make the commitment, the court finds at a hearing that the minor has violated a condition of probation.' [¶] As we read the statute, it merely creates an exception to the requirement of a supplemental petition if the commitment is for 30 days or less. Contrary to the statement in Ronnie P., subdivision (e) does not limit the juvenile court's authority to impose and stay a longer commitment. For commitments longer than 30 days the exception created by subdivision (e) will not apply and the general procedural requirements of section 777 (a supplemental petition and noticed hearing) must be followed before the stay is lifted." (22 Cal. App.4th at pp. 9-10.)
[5]  Additionally, here appellant affirmatively invited any alleged error, by requesting that the trial court follow the recommendation of the probation department and impose such a stayed or suspended term. (See People v. Marshall (1990) 50 Cal.3d 907, 931 [269 Cal. Rptr. 269, 790 P.2d 676] ["We reject the claim under the doctrine of invited error."]; In re Harvill (1959) 168 Cal. App.2d 490, 493 [335 P.2d 1016] ["The point was not raised in the juvenile court hearing and cannot be raised for the first time on appeal."].) The stayed nature of the CYA commitment plainly benefited the minor; if it was beyond the power of the juvenile court to stay the commitment, then it appears appellant would have been sent to CYA immediately, as the court indicated it was inclined to do.
