<i18n dev> RFR: 8134505: Cleanup of "TimeZone_md.c"

Langer, Christoph christoph.langer at sap.com
Wed Aug 26 14:34:02 UTC 2015


Hi,

when working on TimeZone_md.c lately, I found it worthwhile to do some cleanup on it. Please review my changes.
Bug: https://bugs.openjdk.java.net/browse/JDK-8134505
Webrev: http://cr.openjdk.java.net/~goetz/webrevs/8134505-timeZone/webrev.01/

I basically did the following things:
- clean up some typos and comment errors
- added #include "TimeZone_md.h"
- split up the platform specific define sections into an #ifdef <platform1> #elif <platform2> #elif ... #endif construct
- moved some AIX coding from the #ifdef block at the bottom of the file into the first AIX specific block
- AIX function "mapPlatformToJavaTimezone": use a dynamic malloced buffer instead of a fixed length buffer
- refactor function "findJavaTZ_md" to make it more straightforward and to avoid unnecessary mallocs and don't forget necessary frees

I'm also wondering if the "if (tz == NULL || *tz == '\0') {" of line 770 could be used for all platforms instead of Solaris and AIX only. The other platforms will only do a check if TZ is NULL but not if it is an empty string.

Thanks and best regards
Christoph



More information about the i18n-dev mailing list