Skip to content

Commit

Permalink
7902681: Asmtools build fails if Default Java File Encoding is set to…
Browse files Browse the repository at this point in the history
… ASCII
  • Loading branch information
lkuskov committed May 28, 2020
1 parent 351e056 commit a76f4d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ Other values for TARGET are:
srcdir="${build.src.classes.dir}"
destdir="${build.classes.dir}"
debug="${javac.debug}"
verbose="${javac.verbose}" deprecation="${javac.deprecation}"
verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
encoding="UTF8"
includeantruntime="false"
classpathref="compileClassPath">
</javac>
<copy todir="${build.classes.dir}">
Expand Down Expand Up @@ -298,6 +301,7 @@ Other values for TARGET are:
destdir="${build.javadoc.dir}"
author="false"
version="false"
Encoding="UTF8"
additionalparam="-breakiterator -Xdoclint:none"
>
<classpath>
Expand Down
8 changes: 4 additions & 4 deletions src/org/openjdk/asmtools/jasm/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ ConstCell parseMethodHandle(SubTag subtag) throws Scanner.SyntaxError, IOExcepti
switch (subtag) {
// If the value of the reference_kind item is
// 1 (REF_getField), 2 (REF_getStatic), 3 (REF_putField) or 4 (REF_putStatic),
// then the constant_pool entry at that index must be a CONSTANT_Fieldref_info structure (§4.4.2)
// then the constant_pool entry at that index must be a CONSTANT_Fieldref_info structure (4.4.2)
// representing a field for which a method handle is to be created. jvms-4.4.8-200-C-A
case REF_GETFIELD:
case REF_GETSTATIC:
Expand All @@ -377,8 +377,8 @@ ConstCell parseMethodHandle(SubTag subtag) throws Scanner.SyntaxError, IOExcepti
break;
// If the value of the reference_kind item is
// 5 (REF_invokeVirtual) or 8 (REF_newInvokeSpecial),
// then the constant_pool entry at that index must be a CONSTANT_Methodref_info structure (§4.4.2)
// representing a class's method or constructor (§2.9.1) for which a method handle is to be created.
// then the constant_pool entry at that index must be a CONSTANT_Methodref_info structure (4.4.2)
// representing a class's method or constructor (2.9.1) for which a method handle is to be created.
// jvms-4.4.8-200-C-B
case REF_INVOKEVIRTUAL:
case REF_NEWINVOKESPECIAL:
Expand All @@ -395,7 +395,7 @@ ConstCell parseMethodHandle(SubTag subtag) throws Scanner.SyntaxError, IOExcepti
// then if the class file version number is less than 52.0, the constant_pool entry at that index must be
// a CONSTANT_Methodref_info structure representing a class's method for which a method handle is to be created;
// if the class file version number is 52.0 or above, the constant_pool entry at that index must be
// either a CONSTANT_Methodref_info structure or a CONSTANT_InterfaceMethodref_info structure (§4.4.2)
// either a CONSTANT_Methodref_info structure or a CONSTANT_InterfaceMethodref_info structure (4.4.2)
// representing a class's or interface's method for which a method handle is to be created.
ConstType ctype01 = ConstType.CONSTANT_METHOD;
ConstType ctype02 = ConstType.CONSTANT_INTERFACEMETHOD;
Expand Down

0 comments on commit a76f4d2

Please sign in to comment.