zoukankan      html  css  js  c++  java
  • nvelocity的解析Bug

    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版本的

  • 相关阅读:
    Linux目录操作
    图形库
    Mybatis两表连接(一对一)
    ssm图片上传到数据库
    ajax函数实例
    html、css基础
    HDU 1213 How Many Tables
    HTML5简介
    在script中创建标签的三种方式
    html css js jq问题总结
  • 原文地址:https://www.cnblogs.com/chenxianbin89/p/1933641.html
Copyright © 2011-2022 走看看