
64 Cal.Rptr.3d 268 (2007)
153 Cal.App.4th 1540
In re ANTONIO P., a Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
Antonio P., Defendant and Appellant.
No. F051743.
Court of Appeal of California, Fifth District.
August 7, 2007.
Lynette Gladd Moore, under appointment by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Michael P. Farrell, Assistant Attorney General, Jesse Witt and David Andrew Eldridge, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
VARTABEDIAN, Acting P.J.
This is an appeal from a judgment committing appellant Antonio P, a minor, to the California Department of Corrections, Juvenile Justice (Juvenile Justice). Appellant contends the court erred in imposing a maximum term of confinement of three years for the felony portion of his adjudication, when the maximum sentence that could be imposed on an adult, after Cunningham v. California (2007) 549 U.S. ___, 127 S.Ct. 856,166 L.Ed.2d 856 (Cunningham ), was the middle term of two years. Because we determine a three-year sentence could have been imposed on an adult, we will affirm the judgment.


*269 Facts and Procedural History
Between March of 2003 and October of 2004, appellant was the subject of an initial and six supplemental juvenile petitions filed under Welfare and Institutions Code section 602. One supplemental petition was filed in October of 2004 and alleged a violation of Penal Code section 487, subdivision (c), theft of property from the person of another, a felony.
Appellant was committed to juvenile hall for short periods and to longer term residential programs on the various petitions; his last confinement before the present confinement was a February 2006 term of 30 days in juvenile hall for a probation violation. (See Welf. & Inst.Code, § 777, subd. (a)(2).)
On May 12, 2006, appellant and another minor confronted a girl on a bus and threatened her because her boyfriend was a member of a different street gang than appellant. Appellant admitted an amended supplemental petition charging violation of Penal Code section 243.3, battery on a transportation passenger, a misdemeanor.
At the dispositional hearing on November 2, 2006, the court found previous orders had not been effective and commitment to a local program would not be effective in appellant's rehabilitation. The court made the necessary statutory finding that it was "fully satisfied that the mental and physical condition and qualifications of the minor are such as to render it probable that he would be benefited by the reformatory, educational, discipline and other treatment provided" by Juvenile Justice. (See Welf. & Inst.Code, § 734.)
The court committed appellant to Juvenile Justice on the felony supplemental petition and six misdemeanor petitions. In setting the maximum period of confinement, the court exercised its discretion pursuant to In re Carlos E. (2005) 127 Cal.App.4th 1529,1542, 26 Cal.Rptr.3d 551, stating: "Based on the numerous attempts to rehabilitate the young man and his continued noncompliance with the rules of the institution, including his most recent stay in Juvenile Hall, the Court does set the maximum period of confinement at four years and four months, less the 612 days already served." The period of confinement was based on the upper term of three years for the felony and consecutive terms for the misdemeanors, calculated in accordance with Penal Code section 1170.1. (See In re Eric J. (1979) 25 Cal.3d 522, 538, 159 Cal.Rptr. 317, 601 P.2d 549.)
Appellant filed a timely notice of appeal.

Discussion
Appellant contends, correctly, that pursuant to Welfare and Institutions Code sections 726 and 731 the maximum term of confinement on a petition alleging a felony is the "maximum period of imprisonment which could be imposed upon an adult convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court." (Welf. & Inst.Code, § 731, subd. (b).) However, appellant incorrectly contends that, in the wake of Cunningham, supra, 549 U.S. ___, 127 S.Ct. 856, the maximum period of imprisonment is the middle term established by former Penal Code section 1170, subdivision (b) (as amended by Stats.1998, ch. 926, § 1), and not the upper term as specified in Welfare and Institutions Code section 726, subdivision (c). Appellant says: "In appellant's case, he admitted only the elements of the offense used to establish the principal term.... Cunningham holds that an adult who admitted those elements should receive the mid term."
Cunningham, however, is somewhat more complex than that.
*270 Under California's former Determinate Sentencing Act, as previously codified at section 1170, subdivision (b) (as amended by Stats.1998, ch. 926, § 1) (DSA), "[w]hen a judgment of imprisonment is to be imposed and the statute specifies three possible terms, the court shall order imposition of the middle term, unless there are circumstances in aggravation or mitigation of the crime." To determine if circumstances justify the imposition of the upper or lower term, the court may consider "the record in the case, the probation officer's report ... and statements in aggravation or mitigation submitted by the prosecution, the defendant, or the victim ... and any further evidence introduced at the sentencing hearing." (Ibid.)
In Cunningham, the United States Supreme Court held that a trial court's imposition of the upper term sentence under the DSA violates a defendant's constitutional right to jury trial, if the court's determination is made in reliance on aggravating factors not found true by a jury or admitted by the defendant. (Cunningham, supra, 549 U.S. at p. ___, 127 S.Ct. at p. 868.) The Cunningham court, however, reaffirmed an exception to the jury-verdict/admission rule when the trial court uses the fact of prior convictions to impose the upper term. (Ibid.) Thus, under Cunningham, the DSA itself is not unconstitutional and there is no constitutional violation when a court uses the aggravating factor of prior convictions to impose an upper term sentence on an adult.[1]
In this case we are not required to reach, and we express no opinion regarding, appellant's basic contention that a juvenile's maximum period of confinement is limited by the same factors considered in Cunningham (See generally In re Jovan B. (1993) 6 Cal.4 th 801; 819, 25 Cal.Rptr.2d 428, 863 P.2d 673.) Even if appellant were correct in this basic premise, his maximum period of confinement established pursuant to Welfare and Institutions Code sections 726 and 731 is not based on impermissible factors under Cunningham; instead, it is based on the recidivist factor deemed constitutionally permissible in Cunningham when applied to an adult offender. Thus, even if Cunningham were applicable, the maximum period of confinement in this case does not exceed the maximum sentence that could be imposed on an adult with a comparable record of prior offenses.

Disposition
The judgment is affirmed.
WE CONCUR: HILL and KANE, JJ.
NOTES
[1]  The Supreme Court recently decided two cases addressing the application of Cunningham under the DSA. (See People v. Black (2007) 41 Cal.4th 799, 62 Cal.Rptr.3d 569, 161 P.3d 1130; People v. Sandoval (2007) 41 Cal.4th 825, 62 Cal.Rptr.3d 588, 161 E.3d 1146.) Those opinions do not change the result in the present case.
