diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2002-11-20 14:55:15 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2002-11-20 14:55:15 +0000 |
commit | c9c1beaa7d7355af7fa87df013eb0e3540bb41c8 (patch) | |
tree | da6d07c1a23a04c6d7d1847c42fa2e43af35022a /stoc/source | |
parent | b18e336e1e6b1554a5dab771dcfe7009d321ccf1 (diff) |
#105140# added -Xcheck:jni for non-pro; fixing java_classpath file read-out assertion
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index ab00f0174..0a944d89c 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -2,9 +2,9 @@ * * $RCSfile: javavm.cxx,v $ * - * $Revision: 1.47 $ + * $Revision: 1.48 $ * - * last change: $Author: jl $ $Date: 2002-11-14 15:52:06 $ + * last change: $Author: dbo $ $Date: 2002-11-20 15:55:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1221,19 +1221,30 @@ static OUString retrieveComponentClassPath( const sal_Char *pVariableName ) sal_Int32 nStart = nIndex; while( nIndex < nSize && p[nIndex] != ' ' ) nIndex ++; OUString relativeUrl( &(p[nStart]), nIndex-nStart, RTL_TEXTENCODING_ASCII_US); - OUString fileurlElement; - OUString systemPathElement; - OSL_VERIFY( osl_File_E_None == - osl_getAbsoluteFileURL( path.pData, relativeUrl.pData , &(fileurlElement.pData) ) ); - OSL_VERIFY( osl_File_E_None == - osl_getSystemPathFromFileURL( fileurlElement.pData, &(systemPathElement.pData) ) ); - if( systemPathElement.getLength() ) + relativeUrl = relativeUrl.trim(); + if (0 < relativeUrl.getLength()) { - if( bPrepend ) - buf.appendAscii( CLASSPATH_DELIMETER ); - else - bPrepend = sal_True; - buf.append( systemPathElement ); + OUString fileurlElement; + OUString systemPathElement; + + OSL_VERIFY( + osl_File_E_None == + osl_getAbsoluteFileURL( + path.pData, relativeUrl.pData, + &fileurlElement.pData ) ); + OSL_VERIFY( + osl_File_E_None == + osl_getSystemPathFromFileURL( + fileurlElement.pData, + &systemPathElement.pData ) ); + if( systemPathElement.getLength() ) + { + if( bPrepend ) + buf.appendAscii( CLASSPATH_DELIMETER ); + else + bPrepend = sal_True; + buf.append( systemPathElement ); + } } } ret = buf.makeStringAndClear(); |