ctolkmit / checker-framework

Automatically exported from code.google.com/p/checker-framework
0 stars 0 forks source link

QualifierParameterHierarchy.getTop() does not return the correct top type #387

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Remove 
regex_qual_poly.RegexTypecheckVisitor.checkExceptionParameter(CatchTree)
2.  javacheck -processor 
org.checkerframework.checker.experimental.regex_qual_poly.RegexCheckerAdapter 
UnionTypes.java

UnionTypes.java:8: error: [exception.parameter.invalid] invalid type in catch 
argument.
        } catch (ArrayIndexOutOfBoundsException | StringIndexOutOfBoundsException exc) {
                                                                                  ^
  found   : QualParams(primary=RegexTop(),{})
  required: QualParams(primary=null,{__TOP__=null})

QualifierParameterHierarchy.getTop() returns 
QualParams(primary=null,{__TOP__=null}) when it should return  
QualParams(primary=RegexTop(),{})

Original issue reported on code.google.com by Suzanne....@gmail.com on 5 Jan 2015 at 5:51

GoogleCodeExporter commented 9 years ago
Also a problem for the qual-param-poly TaintingChecker.
Remove: 
org.checkerframework.checker.experimental.tainting_qual_poly.TaintingCheckerAdap
ter.createSourceVisitor().new TypecheckVisitorAdapter() 
{...}.checkExceptionParameter(CatchTree)

javac -processor 
org.checkerframework.checker.experimental.tainting_qual_poly.TaintingCheckerAdap
ter SimpleLog.java
SimpleLog.java:8: error: [exception.parameter.invalid] invalid type in catch 
argument.
    } catch (Exception e) {
                       ^
  found   : QualParams(primary=TAINTED,{})
  required: QualParams(primary=null,{__TOP__=null})
1 error

Original comment by Suzanne....@gmail.com on 5 Jan 2015 at 6:00

GoogleCodeExporter commented 9 years ago
I've fixed the interaction with the __TOP__ qualifier and removed the temporary 
code in the qual checkers.

Original comment by mcart...@cs.washington.edu on 13 Jan 2015 at 5:51

GoogleCodeExporter commented 9 years ago
Fixed in release 1.8.10 of the Checker Framework.

Original comment by mcart...@cs.washington.edu on 30 Jan 2015 at 10:57