From: Eliot M. <mo...@cs...> - 2011-12-10 17:45:30
|
On 12/10/2011 12:03 PM, Erik Brangs wrote: > You may be right about classes being unproblematic. I added a simple assertion to refine() to check > if there were problems with incorrect refining and tried executing some benchmarks (DaCapo 2006, > Dacapo Bach, scalaBench). > > These did not reveal any problems except for a special case in DaCapo 2006 lusearch. There is a > "refinement" of TypeReference.NULL_TYPE to a class in the method "public final Hits search(Query > query)" in "org.apache.lucene.Searcher". The "refinement" seems to happen because of an unnecessary > checkcast of null. So this makes me wonder if the 'refinement' should be suppressed when the value is statically known to be NULL. After all, the checkcast will throw and exception and the code after it will be dead. On the other hand, if it is statically known to be NULL, why does its type matter much? -- Eliot |