简体   繁体   English

Netbeans 8.0.2可以组织导入,可能是bug?

[英]Netbeans 8.0.2 organize imports, possible bug?

I'm working in Netbeans 8.0.2 under Mac OS and I have a problem in my Organize imports configuration. 我正在Mac OS下的Netbeans 8.0.2中工作,我的Organize导入配置存在问题。 An image tells more than a thousand words, here is my configuration: 一张图片可以说一千多个单词,这是我的配置:

导入配置

And in a class I have the following: 在课堂上,我有以下内容:

类进口

Just to clarify I put the package of the file in the image, classes from ar.edu.unt.sigea. 为了澄清ar.edu.unt.sigea. ,我将文件包放在图像中,即ar.edu.unt.sigea.ar.edu.unt.sigea. are classes from my application. 是我的应用程序中的类。 As you can see, in the automatic import I get a duplicated line (the last static import and the yellow underlined, this last one being recognized as unused import by Netbeans). 如您所见,在自动导入中,我得到一条重复的行(最后一个静态导入和带下划线的黄色下划线,最后一个被Netbeans识别为未使用的导入)。 If I delete manually the last static import (repeated) and save the file, Netbeans put the repeated line again. 如果我手动删除(重复)最后一次静态导入并保存文件,Netbeans将再次放置重复的行。

Am I missing something in the configuration or it's an unresolved bug in Netbeans? 我是否在配置中缺少某些内容,或者它是Netbeans中未解决的错误? Thanks in advance for your answers. 预先感谢您的回答。

This looks like a bug of Netbeans: 这看起来像是Netbeans的错误:
254955: static imports of methods are being duplicated without reason . 254955:方法的静态导入被无故复制

It is not yet fixed in a stable version of Netbeans, but you can apply a patched attached to the bug . 在Netbeans的稳定版本中尚未修复该错误 ,但是您可以在bug上附加补丁。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM