summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-11-20 14:55:15 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-11-20 14:55:15 +0000
commitcc6716249eec219ba1ecefcee06f90916bc331f3 (patch)
treebe9df2f264bbc9b50dc3375fcaaa38307e58cb17 /stoc
parent18cfbee97c098b136c87d47d87c731e964248714 (diff)
#105140# added -Xcheck:jni for non-pro; fixing java_classpath file read-out assertion
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx39
1 files changed, 25 insertions, 14 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 808c24b1ec7a..6ff7e5b819d2 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();