1. <small id='lkFOl'></small><noframes id='lkFOl'>

      <bdo id='lkFOl'></bdo><ul id='lkFOl'></ul>

      <legend id='lkFOl'><style id='lkFOl'><dir id='lkFOl'><q id='lkFOl'></q></dir></style></legend>

    1. <tfoot id='lkFOl'></tfoot>
    2. <i id='lkFOl'><tr id='lkFOl'><dt id='lkFOl'><q id='lkFOl'><span id='lkFOl'><b id='lkFOl'><form id='lkFOl'><ins id='lkFOl'></ins><ul id='lkFOl'></ul><sub id='lkFOl'></sub></form><legend id='lkFOl'></legend><bdo id='lkFOl'><pre id='lkFOl'><center id='lkFOl'></center></pre></bdo></b><th id='lkFOl'></th></span></q></dt></tr></i><div id='lkFOl'><tfoot id='lkFOl'></tfoot><dl id='lkFOl'><fieldset id='lkFOl'></fieldset></dl></div>

      SonarQube“找不到类"在主 AST 扫描期间

      时间:2024-05-10
        <bdo id='8YGNh'></bdo><ul id='8YGNh'></ul>

          <small id='8YGNh'></small><noframes id='8YGNh'>

            <tbody id='8YGNh'></tbody>

            1. <tfoot id='8YGNh'></tfoot>
            2. <legend id='8YGNh'><style id='8YGNh'><dir id='8YGNh'><q id='8YGNh'></q></dir></style></legend>
              <i id='8YGNh'><tr id='8YGNh'><dt id='8YGNh'><q id='8YGNh'><span id='8YGNh'><b id='8YGNh'><form id='8YGNh'><ins id='8YGNh'></ins><ul id='8YGNh'></ul><sub id='8YGNh'></sub></form><legend id='8YGNh'></legend><bdo id='8YGNh'><pre id='8YGNh'><center id='8YGNh'></center></pre></bdo></b><th id='8YGNh'></th></span></q></dt></tr></i><div id='8YGNh'><tfoot id='8YGNh'></tfoot><dl id='8YGNh'><fieldset id='8YGNh'></fieldset></dl></div>
                本文介绍了SonarQube“找不到类"在主 AST 扫描期间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的设置:

                • 声纳库 5.1.1
                • Sonar-Maven 插件 2.6(也尝试过 2.7 和 3.6)
                • JDK 1.7.0_51

                错误示例:

                16:00:54 [INFO] [23:00:54.219] Sensor JavaSquidSensor
                16:00:55 [INFO] [23:00:55.030] Java Main Files AST scan...
                16:00:55 [INFO] [23:00:55.030] 1532 source files to be analyzed
                16:00:58 [ERROR] [23:00:57.927] Class not found: javax.annotation.Nullable
                16:00:58 [ERROR] [23:00:57.928] Class not found: javax.annotation.CheckReturnValue
                16:00:58 [ERROR] [23:00:58.114] Class not found: javax.annotation.Nullable
                

                根据这个 stackoverflow question,javax.annotation 应该是 java 1.7 及更高版本的一部分.此外,我尝试将它放在本地 maven 存储库中,但这没有帮助.

                According to this stackoverflow question, javax.annotation should be part of java 1.7 and up. Furthermore, I've tried putting it in the local maven repository but that didnt help.

                Sonar 在哪里试图找到这个包?有什么帮助吗?!?

                So where is Sonar trying to find this package? Any help?!?

                更新:

                • 我尝试修改 sonar-maven-plugin 以包含对 javax.annotation 的依赖
                • 我已经尝试将依赖项放在我的 maven 的 settings.xml 中
                • 将我的 JDK 升级到 1.8 没有帮助.

                推荐答案

                根据http://docs.oracle.com/javase/7/docs/api/index.html?javax/annotation/package-summary.html 您期望的类不属于JDK 7.

                According to http://docs.oracle.com/javase/7/docs/api/index.html?javax/annotation/package-summary.html the classes you expect are not part of JDK 7.

                您要查找的类是此处启动的 google JSR-305 实现的一部分 https://code.google.com/p/jsr-305/source/browse/trunk/ri/src/main/java/javax/annotation/Nullable.java?r=24 并移至 Findbugs:

                The classes you're looking for are part of google JSR-305 implementation that was initiated here https://code.google.com/p/jsr-305/source/browse/trunk/ri/src/main/java/javax/annotation/Nullable.java?r=24 and which moved to Findbugs:

                <dependency>
                  <groupId>com.google.code.findbugs</groupId>
                  <artifactId>jsr305</artifactId>
                  <version>3.0.0</version>
                </dependency>
                

                根据https://jcp.org/en/jsr/detail?id=305JSR-305 已完成,但处于休眠状态,尚未添加到 JDK 版本中.

                According to https://jcp.org/en/jsr/detail?id=305 the JSR-305 is finished, but is in dormant status and has not been added to a JDK release yet.

                希望对你有帮助.

                这篇关于SonarQube“找不到类"在主 AST 扫描期间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:将 Spock 的测试与声纳集成 下一篇:安全性 - 数组直接存储

                相关文章

                  <tfoot id='cD9kh'></tfoot>

                    <small id='cD9kh'></small><noframes id='cD9kh'>

                    <legend id='cD9kh'><style id='cD9kh'><dir id='cD9kh'><q id='cD9kh'></q></dir></style></legend>
                      <bdo id='cD9kh'></bdo><ul id='cD9kh'></ul>
                  1. <i id='cD9kh'><tr id='cD9kh'><dt id='cD9kh'><q id='cD9kh'><span id='cD9kh'><b id='cD9kh'><form id='cD9kh'><ins id='cD9kh'></ins><ul id='cD9kh'></ul><sub id='cD9kh'></sub></form><legend id='cD9kh'></legend><bdo id='cD9kh'><pre id='cD9kh'><center id='cD9kh'></center></pre></bdo></b><th id='cD9kh'></th></span></q></dt></tr></i><div id='cD9kh'><tfoot id='cD9kh'></tfoot><dl id='cD9kh'><fieldset id='cD9kh'></fieldset></dl></div>