mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
null pointer check for src and host encodings
This commit is contained in:
parent
39601be439
commit
bbb239d566
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
String byteStreamHandlerId = getByteStreamHandlerId();
|
String byteStreamHandlerId = getByteStreamHandlerId();
|
||||||
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
||||||
|
|
||||||
if (!isBinary)
|
if (!isBinary && hostEncoding != null)
|
||||||
{
|
{
|
||||||
String tempStr = new String(buffer, 0, bytesRead);
|
String tempStr = new String(buffer, 0, bytesRead);
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
String byteStreamHandlerId = getByteStreamHandlerId();
|
String byteStreamHandlerId = getByteStreamHandlerId();
|
||||||
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
|
||||||
|
|
||||||
if (!isBinary)
|
if (!isBinary && srcEncoding != null && hostEncoding != null)
|
||||||
{
|
{
|
||||||
String tempStr = new String(buffer, 0, bytesRead, srcEncoding);
|
String tempStr = new String(buffer, 0, bytesRead, srcEncoding);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue