commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WEAVER-11) bytecode generated with java 7 or 8 is different and can break on earlier versions
Date Wed, 11 May 2016 22:36:12 GMT

    [ https://issues.apache.org/jira/browse/WEAVER-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280931#comment-15280931
] 

Matt Benson commented on WEAVER-11:
-----------------------------------

[~rmannibucau] could you provide more info? I have built with Java 8 and I get, e.g.:
{code}
> javap -p bval-core/target/classes/org/apache/bval/util/FieldAccess.class 
Compiled from "FieldAccess.java"
public class org.apache.bval.util.FieldAccess extends org.apache.bval.util.AccessStrategy
{
  private final java.lang.reflect.Field field;
  public org.apache.bval.util.FieldAccess(java.lang.reflect.Field);
  public java.lang.Object get(java.lang.Object);
  private static boolean org_apache_bval_util_reflection_Reflection$$setAccessible(java.lang.reflect.AccessibleObject,
boolean);
  static boolean __privileged_access$0(java.lang.reflect.AccessibleObject, boolean);
  private static boolean __privileged_org_apache_bval_util_reflection_Reflection$$setAccessible(java.lang.reflect.AccessibleObject,
boolean);
  public java.lang.annotation.ElementType getElementType();
  public java.lang.reflect.Type getJavaType();
  public java.lang.String getPropertyName();
  public java.lang.String toString();
  public boolean equals(java.lang.Object);
  public int hashCode();
}
{code}

> bytecode generated with java 7 or 8 is different and can break on earlier versions
> ----------------------------------------------------------------------------------
>
>                 Key: WEAVER-11
>                 URL: https://issues.apache.org/jira/browse/WEAVER-11
>             Project: Commons Weaver
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>
> Encountered on bval where building with java 8 makes the bytecode java 8 compliant and
breaks under java 7.
> See org.apache.bval.util.reflection.Reflection#setAccessible where  Utf8            
  java/lang/reflect/Executable is injected with java 8 and Executable is a java 8 class only.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message