⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instantiatingnullhandlertest.java

📁 在Struts2中的jar包xwork的源代码.版本为2.0.7
💻 JAVA
字号:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.xwork2.util;import junit.framework.TestCase;/** * DOCUMENT ME! * * @author $author$ * @version $Revision: 1063 $ */public class InstantiatingNullHandlerTest extends TestCase {    public void testBlank() {    }    /*public void testInheritance() {        Tiger t = new Tiger();        CompoundRoot root = new CompoundRoot();        root.add(t);        Map context = new OgnlContext();        context.put(InstantiatingNullHandler.CREATE_NULL_OBJECTS, Boolean.TRUE);        InstantiatingNullHandler nh = new InstantiatingNullHandler();        Object dogList = nh.nullPropertyValue(context, root, "dogs");        Class clazz = nh.getCollectionType(Tiger.class, "dogs");        assertEquals(Dog.class, clazz);        assertNotNull(dogList);        assertTrue(dogList instanceof List);        Object kittenList = nh.nullPropertyValue(context, root, "kittens");        clazz = nh.getCollectionType(Tiger.class, "kittens");        assertEquals(Cat.class, clazz);        assertNotNull(kittenList);        assertTrue(kittenList instanceof List);    }*/}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -