You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "XueJun (JIRA)" <ji...@apache.org> on 2016/03/26 04:18:25 UTC

[jira] [Created] (GROOVY-7801) Create instance using replacing constructors, get instance class property is null

XueJun created GROOVY-7801:
------------------------------

             Summary: Create instance using replacing constructors, get instance class property is null
                 Key: GROOVY-7801
                 URL: https://issues.apache.org/jira/browse/GROOVY-7801
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.6
         Environment: -- listing properties --
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Program Files (x86)\Java\jdk1.8.0_...
java.vm.version=25.45-b02
java.vm.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.script=
user.country=CN
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=Service Pack 1
program.name=
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\Users\x00302928
java.runtime.version=1.8.0_45-b15
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files (x86)\Java\jdk1.8.0_...
os.arch=x86
java.io.tmpdir=C:\Users\X00302~1\AppData\Local\Temp\
line.separator=

java.vm.specification.vendor=Oracle Corporation
user.variant=
os.name=Windows 7
tools.jar=C:\Program Files (x86)\Java\jdk1.8.0_...
sun.jnu.encoding=GBK
script.name=
java.library.path=C:\Program Files (x86)\Java\jdk1.8.0_...
sun.awt.enableExtraMouseButtons=true
java.specification.name=Java Platform API Specification
java.class.version=52.0
sun.management.compiler=HotSpot Client Compiler
os.version=6.1
user.home=C:\Users\x00302928
user.timezone=GMT+08:00
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.specification.version=1.8
file.encoding=GBK
user.name=x00302928
java.class.path=D:\04.program\groovy-2.4.6\lib\groovy...
java.vm.specification.version=1.8
sun.arch.data.model=32
java.home=C:\Program Files (x86)\Java\jdk1.8.0_...
sun.java.command=org.codehaus.groovy.tools.GroovyStart...
java.specification.vendor=Oracle Corporation
user.language=zh
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode, sharing
java.version=1.8.0_45
java.ext.dirs=C:\Program Files (x86)\Java\jdk1.8.0_...
sun.boot.class.path=C:\Program Files (x86)\Java\jdk1.8.0_...
sun.stderr.encoding=ms936
java.vendor=Oracle Corporation
file.separator=\
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
groovy.full.stacktrace=true
groovy.sanitized.stacktraces=org.codehaus.groovy.runtime.
        ...
groovy.starter.conf=D:\04.program\groovy-2.4.6\conf\groov...
sun.stdout.encoding=ms936
sun.desktop=windows
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+m...
groovy.home=D:\04.program\groovy-2.4.6
            Reporter: XueJun
            Priority: Minor


code as below:
------------------------------
Class.metaClass.make = { Object[] args -> delegate.metaClass.invokeConstructor(*args) }

def hm = HashMap.make()
println "1:" + hm.class
println "2:" + hm.getClass()

Result as below:
------------------------------
1:null
2:class java.util.HashMap



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)