From hibernate-commits at lists.jboss.org Mon Jun 22 17:35:48 2009 Content-Type: multipart/mixed; boundary="===============6175821176319493408==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r16870 - in core/branches/Branch_3_3/core/src/main/java/org/hibernate: cfg and 1 other directory. Date: Mon, 22 Jun 2009 17:22:28 -0400 Message-ID: --===============6175821176319493408== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2009-06-22 17:22:27 -0400 (Mon, 22 Jun 2009) New Revision: 16870 Added: core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environmen= t.java Log: HHH-3978 - Expose Hibernate version via non-compile-time constant expression Added: core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java = (rev 0) +++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java = 2009-06-22 21:22:27 UTC (rev 16870) @@ -0,0 +1,35 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors = as + * indicated by the @author tags or express copyright attribution + * statements applied by the authors. All third-party contributions are + * distributed under license by Red Hat Middleware LLC. + * + * This copyrighted material is made available to anyone wishing to use, m= odify, + * copy, or redistribute it subject to the terms and conditions of the GNU + * Lesser General Public License, as published by the Free Software Founda= tion. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT= ABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public= License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this distribution; if not, write to: + * Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package org.hibernate; + +/** + * Information about the Hibernate version. + * + * @author Steve Ebersole + */ +public class Version { + public static String getVersionString() { + return "3.3.2-SNAPSHOT"; + } +} Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Env= ironment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environme= nt.java 2009-06-22 21:21:42 UTC (rev 16869) +++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environme= nt.java 2009-06-22 21:22:27 UTC (rev 16870) @@ -38,6 +38,7 @@ import org.slf4j.LoggerFactory; = import org.hibernate.HibernateException; +import org.hibernate.Version; import org.hibernate.bytecode.BytecodeProvider; import org.hibernate.util.ConfigHelper; import org.hibernate.util.PropertiesHelper; @@ -176,7 +177,14 @@ */ public final class Environment { = - public static final String VERSION =3D "3.3.1.GA"; + /** + * The Hibernate version. + * = + * @deprecated To be removed in 3.5. Use Version#getVersionString instea= d. See + * Java Language Specification + * for details about compile-time constant expression for the reasons why= this is being removed. + */ + public static final String VERSION =3D Version.getVersionString(); = /** * ConnectionProvider implementor to use when obtaining connecti= ons --===============6175821176319493408==--