glassfish
  1. glassfish
  2. GLASSFISH-15315

Findbugs error: NS_DANGEROUS_NON_SHORT_CIRCUIT in DeploymentImpl.java:279

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1_b33
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None

      Description

      sivakumart: web/weld-integration/src/main/java/org/glassfish/weld/DeploymentImpl.java:279: NS_DANGEROUS_NON_SHORT_CIRCUIT: Potentially dangerous use of non-short-circuit logic in org.glassfish.weld.DeploymentImpl.loadBeanDeploymentArchive(Class)

        Activity

        Hide
        Sivakumar Thyagarajan added a comment -

        Proposed fix (will commit after approval)

        Index: src/main/java/org/glassfish/weld/DeploymentImpl.java
        ===================================================================
        — src/main/java/org/glassfish/weld/DeploymentImpl.java (revision 43979)
        +++ src/main/java/org/glassfish/weld/DeploymentImpl.java (working copy)
        @@ -276,7 +276,7 @@
        return bda;
        }

        • if (bda.getBeanDeploymentArchives() != null & bda.getBeanDeploymentArchives().size() > 0) {
          + if (bda.getBeanDeploymentArchives() != null && bda.getBeanDeploymentArchives().size() > 0) {
          Collection<BeanDeploymentArchive> subBdas = bda.getBeanDeploymentArchives();
          Iterator<BeanDeploymentArchive> subBdaIter = subBdas.iterator();
          while(subBdaIter.hasNext()){
        Show
        Sivakumar Thyagarajan added a comment - Proposed fix (will commit after approval) Index: src/main/java/org/glassfish/weld/DeploymentImpl.java =================================================================== — src/main/java/org/glassfish/weld/DeploymentImpl.java (revision 43979) +++ src/main/java/org/glassfish/weld/DeploymentImpl.java (working copy) @@ -276,7 +276,7 @@ return bda; } if (bda.getBeanDeploymentArchives() != null & bda.getBeanDeploymentArchives().size() > 0) { + if (bda.getBeanDeploymentArchives() != null && bda.getBeanDeploymentArchives().size() > 0) { Collection<BeanDeploymentArchive> subBdas = bda.getBeanDeploymentArchives(); Iterator<BeanDeploymentArchive> subBdaIter = subBdas.iterator(); while(subBdaIter.hasNext()){
        Hide
        Sivakumar Thyagarajan added a comment -

        Fixed as part of commit:

        [15:45:24] [siva@spiff ../workspaces/trunk-gfv3/v3] $ svn commit .
        Sending osgi-javaee/osgi-cdi/src/main/java/org/glassfish/osgicdi/impl/OSGiServiceFactory.java
        Sending web/weld-integration/src/main/java/org/glassfish/weld/DeploymentImpl.java
        Transmitting file data ..
        Committed revision 44059.

        Show
        Sivakumar Thyagarajan added a comment - Fixed as part of commit: [15:45:24] [siva@spiff ../workspaces/trunk-gfv3/v3] $ svn commit . Sending osgi-javaee/osgi-cdi/src/main/java/org/glassfish/osgicdi/impl/OSGiServiceFactory.java Sending web/weld-integration/src/main/java/org/glassfish/weld/DeploymentImpl.java Transmitting file data .. Committed revision 44059.

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            Sivakumar Thyagarajan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: