Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18328

NPE in VpvDefaultTemplate

XMLWordPrintable

      Create html file with text

      <!doctype html>
      

      Close editor and open file in JBoss Tools HTML Editor.
      Failure:
      Exception in thread "Thread-17" java.lang.NullPointerException
      at org.jboss.tools.vpe.preview.core.template.VpvDefaultTemplate.create(VpvDefaultTemplate.java:32)
      at org.jboss.tools.vpe.preview.core.transform.VpvDomBuilder.convertNode(VpvDomBuilder.java:84)
      at org.jboss.tools.vpe.preview.core.transform.VpvDomBuilder.buildVisualModel(VpvDomBuilder.java:48)
      at org.jboss.tools.vpe.preview.core.transform.VpvController.getResource(VpvController.java:60)
      at org.jboss.tools.vpe.preview.core.server.VpvSocketProcessor.processRequest(VpvSocketProcessor.java:83)
      at org.jboss.tools.vpe.preview.core.server.VpvSocketProcessor.run(VpvSocketProcessor.java:68)
      at java.lang.Thread.run(Thread.java:722)

      In this case source dom document is not null, but its document element is null. The check (sourceDocument != null) in VpvController passes, and then VpvDomBuilder.buildVisualModel() does not check documentElement for null.

              kmarmaliykov Konstantin Marmalyukov (Inactive)
              scabanovich Viacheslav Kabanovich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: