Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1622

session.propertyExists() on non-existing node path throws exception, a regression from MS v2.8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.0.Beta4
    • 3.0.0.Beta3
    • None
    • None

      We have some bootstrap code that sets up sequences (longs stored in properties).

      In MS 2.8 this worked, in MS 3 Beta3 it throws an exception if the node path does not exist.

      Code:

      session.propertyExists("/some/random/nonexisting/path/to/property")
      

      Would return false in MS 2.8, but throws the following exception in MS3 B3:

      java.lang.RuntimeException
      Error obtaining root
      
      javax.jcr.PathNotFoundException
      No node exists at path '/some/random/nonexisting/path/to' in workspace "default"
      
              org.modeshape.jcr.JcrSession.cachedNode(JcrSession.java:509)
              org.modeshape.jcr.JcrSession.cachedNode(JcrSession.java:494)
              org.modeshape.jcr.JcrSession.propertyExists(JcrSession.java:796)
              d.b.t.c.pages.Index.getTestProp(Index.java:63) 
      

              rhauch Randall Hauch (Inactive)
              cpoulsen-1 Chris Poulsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: