Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4366

NullPointerException in View.getViewId()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Discovery Impl 1.0.12
    • Discovery Impl 1.1.0
    • Extensions
    • None

    Description

      View.getView() can result in a NPE - triggered eg when log level is set to DEBUG as is happening below:

      java.lang.NullPointerException: null
              at org.apache.sling.discovery.impl.common.View.getViewId(View.java:88)
              at org.apache.sling.discovery.impl.cluster.voting.VotingView.toString(VotingView.java:151)
              at java.lang.String.valueOf(String.java:2826)
              at java.lang.StringBuilder.append(StringBuilder.java:115)
              at org.apache.sling.discovery.impl.cluster.voting.VotingHelper.getWinningVoting(VotingHelper.java:164)
              at org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.doCheckView(HeartbeatHandler.java:455)
              at org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.checkView(HeartbeatHandler.java:425)
              at org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.run(HeartbeatHandler.java:216)
              at org.apache.sling.discovery.impl.setup.Instance.runHeartbeatOnce(Instance.java:516)
              at org.apache.sling.discovery.impl.cluster.ClusterTest.runHeartbeatOnceWith(ClusterTest.java:538)
              at org.apache.sling.discovery.impl.cluster.ClusterTest.testConnectorSwitching4139(ClusterTest.java:303)
      

      Attachments

        Activity

          People

            stefanegli Stefan Egli
            stefanegli Stefan Egli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: