nvelocity的一个解析Bug,看来源代码发现

 

 


代码
namespace NVelocity.App
{
    
using System;
    
using System.Collections.Generic;
    
using System.Reflection;

    
public class FieldMethodizer
    {
 .......................

     
private void Inspect(Type type)
        {
            FieldInfo[] fields 
= type.GetFields();
            
for (int i = 0; i < fields.Length; i++)
            {
                
if (fields[i].IsPublic && fields[i].IsStatic)
                {
                    
this.fieldHash[fields[i].Name] = fields[i];
                    
this.classHash[fields[i].Name] = type;
                }
            }
        }
    }
}


居然只反射 Field 忘了 Property 昏。。 代码是1.1版本的