Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


On 29/05/2014 11:41, Lionel Elie Mamane wrote:
On Wed, May 28, 2014 at 03:43:24PM -0700, julien2412 wrote:

I noticed this part:
     113         // this is a special property to find the jdbc driver
     114         if  (   pBegin->Name.compareToAscii( "JavaDriverClass" )
     115             &&  pBegin->Name.compareToAscii( "JavaDriverClassPath" )
     116             &&  pBegin->Name.compareToAscii( "SystemProperties" )
     117             &&  pBegin->Name.compareToAscii( "CharSet" )
etc.
This means:

  if pBegin->Name is neither "JavaDriverClass", nor
  "JavaDriverClassPath", nor "SystemProperties", nor "CharSet"

That could be correct... or not.

That is in function createStringPropertyArray, which is used only in
JConnection.hxx to create the arguments that are passed to the JDBC
driver "connect" method. So, is this a list of properties that
*should* be passed or a list of properties that should *not*? That's
the question.

But as it is, this "if" can never be true since pBegin->Name can't be at the same time = to "JavaDriverClass" and also equal to "CharSet" for example
So either it's :

    114           !pBegin->Name.compareToAscii( "JavaDriverClass" )
    115             &&  !pBegin->Name.compareToAscii( "JavaDriverClassPath" )
    116             &&  !pBegin->Name.compareToAscii( "SystemProperties" )
    117             &&  !pBegin->Name.compareToAscii( "CharSet" )

or

    114          pBegin->Name.compareToAscii( "JavaDriverClass" )
    115             ||  pBegin->Name.compareToAscii( "JavaDriverClassPath" )
    116             ||  pBegin->Name.compareToAscii( "SystemProperties" )
    117             ||  pBegin->Name.compareToAscii( "CharSet" )


Sorry if I'm missing something obvious :-(

Julien

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.