<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undocumented behavior of com.sun.star.sdb.DatabaseContext implementation of com.sun.star.uno.XNamingService"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=131710">bug 131710</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>UNCONFIRMED
           </td>
           <td>NEW
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Keywords</td>
           <td>
                
           </td>
           <td>difficultyMedium, easyHack, skillCpp
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Ever confirmed</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undocumented behavior of com.sun.star.sdb.DatabaseContext implementation of com.sun.star.uno.XNamingService"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=131710#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undocumented behavior of com.sun.star.sdb.DatabaseContext implementation of com.sun.star.uno.XNamingService"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=131710">bug 131710</a>
              from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
        <pre>FTR: the definition of the interface behavior is given in
udkapi/com/sun/star/uno/XNamingService.idl [1].

The implementation of DatabaseContext's registerObject is in
dbaccess/source/core/dataaccess/databasecontext.cxx. After initial argument
checks, it calls registerDatabaseLocation, which in turn calls
DatabaseRegistrations::registerDatabaseLocation, and the latter calls
impl_checkValidName_throw_must_not_exist.

So to conform to the documented behavior, DatabaseContext::registerObject
should ensure to de-register existing registration for the name before trying
to register.

Similar for revokeObject.

[1]
<a href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1uno_1_1XNamingService.html">https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1uno_1_1XNamingService.html</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>