defineclass.cc (MAJOR_1_7, MINOR_1_7): New.

2012-04-23  Andrew Haley  <aph@redhat.com>

	* defineclass.cc (MAJOR_1_7,  MINOR_1_7): New.
	(parse): Allow MAJOR_1_7 classfile version.

From-SVN: r186810
This commit is contained in:
Andrew Haley 2012-04-25 10:18:38 +00:00 committed by Andrew Haley
parent 9a7ac8f881
commit 6bdb694e7d
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-04-23 Andrew Haley <aph@redhat.com>
* defineclass.cc (MAJOR_1_7, MINOR_1_7): New.
(parse): Allow MAJOR_1_7 classfile version.
2012-03-22 Release Manager
* GCC 4.7.0 released.

View File

@ -361,6 +361,8 @@ _Jv_DefineClass (jclass klass, jbyteArray data, jint offset, jint length,
#define MINOR_1_5 0
#define MAJOR_1_6 50
#define MINOR_1_6 0
#define MAJOR_1_7 51
#define MINOR_1_7 0
void
_Jv_ClassReader::parse ()
@ -371,8 +373,8 @@ _Jv_ClassReader::parse ()
int minor_version = read2u ();
int major_version = read2u ();
if (major_version < MAJOR_1_1 || major_version > MAJOR_1_6
|| (major_version == MAJOR_1_6 && minor_version > MINOR_1_6))
if (major_version < MAJOR_1_1 || major_version > MAJOR_1_7
|| (major_version == MAJOR_1_7 && minor_version > MINOR_1_7))
throw_class_format_error ("unrecognized class file version");
is_15 = (major_version >= MAJOR_1_5);