git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Updated] (ARIES-1797) ensure proxy-impl can work with ASM 6.1 plus


     [ https://issues.apache.org/jira/browse/ARIES-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated ARIES-1797:
----------------------------------------
    Fix Version/s: proxy-impl-1.1.2

> ensure proxy-impl can work with ASM 6.1 plus
> --------------------------------------------
>
>                 Key: ARIES-1797
>                 URL: https://issues.apache.org/jira/browse/ARIES-1797
>             Project: Aries
>          Issue Type: Improvement
>          Components: Proxy
>            Reporter: Freeman Fang
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: proxy-impl-1.1.2
>
>         Attachments: ARIES-1797.patch
>
>
> In asm 6.1, the GeneratorAdapter.case method changed to
> {code:java}
> public void cast(final Type from, final Type to) {
>     if (from != to) {
>       if (from == Type.DOUBLE_TYPE) {
>         if (to == Type.FLOAT_TYPE) {
>           mv.visitInsn(Opcodes.D2F);
>         } else if (to == Type.LONG_TYPE) {
>           mv.visitInsn(Opcodes.D2L);
>         } else {
>           mv.visitInsn(Opcodes.D2I);
>           cast(Type.INT_TYPE, to);
>         }
>       } else if (from == Type.FLOAT_TYPE) {
>         if (to == Type.DOUBLE_TYPE) {
>           mv.visitInsn(Opcodes.F2D);
>         } else if (to == Type.LONG_TYPE) {
>           mv.visitInsn(Opcodes.F2L);
>         } else {
>           mv.visitInsn(Opcodes.F2I);
>           cast(Type.INT_TYPE, to);
>         }
>       } else if (from == Type.LONG_TYPE) {
>         if (to == Type.DOUBLE_TYPE) {
>           mv.visitInsn(Opcodes.L2D);
>         } else if (to == Type.FLOAT_TYPE) {
>           mv.visitInsn(Opcodes.L2F);
>         } else {
>           mv.visitInsn(Opcodes.L2I);
>           cast(Type.INT_TYPE, to);
>         }
>       } else {
>         if (to == Type.BYTE_TYPE) {
>           mv.visitInsn(Opcodes.I2B);
>         } else if (to == Type.CHAR_TYPE) {
>           mv.visitInsn(Opcodes.I2C);
>         } else if (to == Type.DOUBLE_TYPE) {
>           mv.visitInsn(Opcodes.I2D);
>         } else if (to == Type.FLOAT_TYPE) {
>           mv.visitInsn(Opcodes.I2F);
>         } else if (to == Type.LONG_TYPE) {
>           mv.visitInsn(Opcodes.I2L);
>         } else if (to == Type.SHORT_TYPE) {
>           mv.visitInsn(Opcodes.I2S);
>         } else {
>           throw new IllegalArgumentException(); 
>         }          
>       }
>     }
>   }
> {code}
>  
> Compared with previous version, it added a
> {code:java}
> } else {
>           throw new IllegalArgumentException(); 
>         }          
> {code}
> at the end, however, this break the current logic in proxy-impl, which if "cast" not take effect, can still go with "unbox", we should revise proxy-impl a bit to honor the change in ASM 6.1. Ensure proxy-impl can work with ASM 6.1 on the classpath or in the OSGi container



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)