奇闻轶事之一

问题描述:

项目(使用jdk1.8)中有个方法用到了

PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz);

但是编译

mvn clean install -Dmaven.test.skip=true

总是失败,报错信息如下:

cannot access com.sun.beans.introspect. PropertyInfo
[ERROR]   class file for com.sun.beans.introspect.PropertyInfo not found

百思不得解。

解法:

PropertyDescriptor pd = new PropertyDescriptor((String)field.getName(), clazz);

解法链接为:https://github.com/vaadin/framework/issues/10737

为什么?--留给以后的自己解答,现在水平不够。卒

猜测:1,可能是jdk1.8的问题,升级到1.9就ok?    2,可能是null 和 (String)null的区别??

发布了29 篇原创文章 · 获赞 2 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/u012803274/article/details/102897939
今日推荐