commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] [Commented] (BCEL-183) Implement Java 7 field/method name validation rules
Date Wed, 17 Dec 2014 14:01:14 GMT


Emmanuel Bourg commented on BCEL-183:

I'm still reviewing the changes, why was the removal of this chunk necessary?

// Class and interface initialization methods...
if (name.equals(STATIC_INITIALIZER_NAME)){
    if ((obj.getAccessFlags() & (~ACC_STRICT)) > 0){
        addMessage("Class or interface initialization method '"+tostring(obj)+"' has superfluous
access modifier(s) set: everything but ACC_STRICT is ignored.");
    if (obj.isAbstract()){
        throw new ClassConstraintException("Class or interface initialization method '"+tostring(obj)+"'
must not be abstract. This contradicts the Java Language Specification, Second Edition (which
omits this constraint) but is common practice of existing verifiers.");

The block above related to the constructor was moved in the {{if (jc.isClass())}} block which
seems more correct, but I don't understand why this one was removed.

> Implement Java 7 field/method name validation rules
> ---------------------------------------------------
>                 Key: BCEL-183
>                 URL:
>             Project: Commons BCEL
>          Issue Type: Improvement
>          Components: Verifier
>    Affects Versions: 5.2
>            Reporter: Jérôme Leroux
>             Fix For: 6.0
>         Attachments: BCEL-183-2.patch,,, BCEL-183.patch,
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> The JustIce bytecode verifier checks the validity of the field name and the variable
name considering the java langage specification. 
> This check is not specified by the bytecode verifier specification.
> This may lead to bytecode verification errors in pass2 on valid classfiles.

This message was sent by Atlassian JIRA

View raw message