Skip to content

Commit d03e464

Browse files
committed
Remove obsolete code from getPlatformFileEncoding
There are no callers with codepageProp NULL, and making this call wouldn't do anything anyway. Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
1 parent abf8fa7 commit d03e464

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

runtime/jcl/unix/syshelp.c

-5
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,6 @@ char *getPlatformFileEncoding(JNIEnv * env, char *codepageProp, int propSize, in
252252
PORT_ACCESS_FROM_ENV(env);
253253
#endif /* defined(LINUX) || defined(OSX) */
254254

255-
/* Called with codepageProp == NULL to initialize the locale */
256-
if (NULL == codepageProp) {
257-
return NULL;
258-
}
259-
260255
#if defined(LINUX)
261256
/*[PR 104520] Return EUC_JP when LC_CTYPE is not set, and the LANG environment variable is "ja" */
262257
ctype = setlocale(LC_CTYPE, NULL);

runtime/jcl/win32/syshelp.c

-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ char* getPlatformFileEncoding(JNIEnv *env, char *codepage, int size, int encodin
186186
#endif
187187
int length;
188188

189-
/* Called with codepage == NULL to initialize the locale */
190-
if (!codepage) return NULL;
191-
192189
if (encodingType == 2) {
193190
/* file.encoding */
194191
threadLocale = GetUserDefaultLCID();

0 commit comments

Comments
 (0)