@@ -1609,7 +1609,7 @@ convertToUTF8(J9PortLibrary *portLibrary, const wchar_t *unicodeString, char *ut
1609
1609
return 0 ;
1610
1610
}
1611
1611
1612
- jobject
1612
+ static jobject
1613
1613
getPlatformPropertyList (JNIEnv * env , const char * strings [], int propIndex )
1614
1614
{
1615
1615
PORT_ACCESS_FROM_ENV (env );
@@ -1623,9 +1623,9 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1623
1623
char userhome [EsMaxPath ];
1624
1624
wchar_t unicodeTemp [EsMaxPath ];
1625
1625
int i = 0 ;
1626
- #if JAVA_SPEC_VERSION < 17
1626
+ #if JAVA_SPEC_VERSION < 11
1627
1627
char userdir [EsMaxPath ];
1628
- #endif /* JAVA_SPEC_VERSION < 17 */
1628
+ #endif /* JAVA_SPEC_VERSION < 11 */
1629
1629
wchar_t unicodeHome [EsMaxPath ];
1630
1630
HANDLE process = 0 ;
1631
1631
HANDLE token = 0 ;
@@ -1634,7 +1634,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1634
1634
1635
1635
/* Hard coded file/path separators and other values */
1636
1636
1637
- #if JAVA_SPEC_VERSION < 17
1637
+ #if JAVA_SPEC_VERSION < 11
1638
1638
strings [propIndex ++ ] = "file.separator" ;
1639
1639
strings [propIndex ++ ] = "\\" ;
1640
1640
@@ -1644,7 +1644,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1644
1644
/* Get the Temp Dir name */
1645
1645
strings [propIndex ++ ] = "java.io.tmpdir" ;
1646
1646
strings [propIndex ++ ] = getTmpDir (env , & tempdir );
1647
- #endif /* JAVA_SPEC_VERSION < 17 */
1647
+ #endif /* JAVA_SPEC_VERSION < 11 */
1648
1648
1649
1649
strings [propIndex ++ ] = "user.home" ;
1650
1650
i = propIndex ;
@@ -1711,7 +1711,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1711
1711
}
1712
1712
}
1713
1713
1714
- #if JAVA_SPEC_VERSION < 17
1714
+ #if JAVA_SPEC_VERSION < 11
1715
1715
/* Get the directory where the executable was started */
1716
1716
strings [propIndex ++ ] = "user.dir" ;
1717
1717
if (0 == GetCurrentDirectoryW (EsMaxPath , unicodeTemp )) {
@@ -1720,13 +1720,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1720
1720
convertToUTF8 (PORTLIB , unicodeTemp , userdir , EsMaxPath );
1721
1721
strings [propIndex ++ ] = userdir ;
1722
1722
}
1723
- #endif /* JAVA_SPEC_VERSION < 17 */
1724
-
1725
- if (JAVA_SPEC_VERSION < 12 ) {
1726
- /* Get the timezone */
1727
- strings [propIndex ++ ] = "user.timezone" ;
1728
- strings [propIndex ++ ] = "" ;
1729
- }
1723
+ #endif /* JAVA_SPEC_VERSION < 11 */
1730
1724
1731
1725
result = createSystemPropertyList (env , strings , propIndex );
1732
1726
j9mem_free_memory (tempdir );
@@ -1736,16 +1730,16 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1736
1730
1737
1731
#else /* defined(WIN32) */
1738
1732
1739
- jobject
1733
+ static jobject
1740
1734
getPlatformPropertyList (JNIEnv * env , const char * strings [], int propIndex )
1741
1735
{
1742
1736
PORT_ACCESS_FROM_ENV (env );
1743
1737
char * charResult = NULL ;
1744
1738
char * envSpace = NULL ;
1745
1739
jobject plist = NULL ;
1746
- #if JAVA_SPEC_VERSION < 17
1740
+ #if JAVA_SPEC_VERSION < 11
1747
1741
char userdir [EsMaxPath ] = {0 };
1748
- #endif /* JAVA_SPEC_VERSION < 17 */
1742
+ #endif /* JAVA_SPEC_VERSION < 11 */
1749
1743
char home [EsMaxPath ] = {0 };
1750
1744
char * homeAlloc = NULL ;
1751
1745
J9VMThread * currentThread = (J9VMThread * )env ;
@@ -1764,7 +1758,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1764
1758
}
1765
1759
#endif /* defined(J9ZOS390) */
1766
1760
1767
- #if JAVA_SPEC_VERSION < 17
1761
+ #if JAVA_SPEC_VERSION < 11
1768
1762
strings [propIndex ++ ] = "file.separator" ;
1769
1763
strings [propIndex ++ ] = "/" ;
1770
1764
@@ -1779,7 +1773,7 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1779
1773
} else {
1780
1774
strings [propIndex ++ ] = charResult ;
1781
1775
}
1782
- #endif /* JAVA_SPEC_VERSION < 17 */
1776
+ #endif /* JAVA_SPEC_VERSION < 11 */
1783
1777
1784
1778
strings [propIndex ++ ] = "user.home" ;
1785
1779
charResult = NULL ;
@@ -1850,17 +1844,11 @@ getPlatformPropertyList(JNIEnv *env, const char *strings[], int propIndex)
1850
1844
propIndex += 1 ;
1851
1845
}
1852
1846
1853
- #if JAVA_SPEC_VERSION < 17
1847
+ #if JAVA_SPEC_VERSION < 11
1854
1848
/* Get the Temp Dir name */
1855
1849
strings [propIndex ++ ] = "java.io.tmpdir" ;
1856
1850
strings [propIndex ++ ] = getTmpDir (env , & envSpace );
1857
- #endif /* JAVA_SPEC_VERSION < 17 */
1858
-
1859
- if (JAVA_SPEC_VERSION < 12 ) {
1860
- /* Get the timezone */
1861
- strings [propIndex ++ ] = "user.timezone" ;
1862
- strings [propIndex ++ ] = "" ;
1863
- }
1851
+ #endif /* JAVA_SPEC_VERSION < 11 */
1864
1852
1865
1853
plist = createSystemPropertyList (env , strings , propIndex );
1866
1854
if (NULL != envSpace ) {
@@ -1888,12 +1876,12 @@ getSystemPropertyList(JNIEnv *env)
1888
1876
int propIndex = 0 ;
1889
1877
jobject propertyList = NULL ;
1890
1878
#define PROPERTY_COUNT 137
1891
- #if JAVA_SPEC_VERSION < 17
1879
+ #if JAVA_SPEC_VERSION < 11
1892
1880
char * propertyKey = NULL ;
1893
1881
const char * language = NULL ;
1894
1882
const char * region = NULL ;
1895
1883
const char * variant = NULL ;
1896
- #endif /* JAVA_SPEC_VERSION < 17 */
1884
+ #endif /* JAVA_SPEC_VERSION < 11 */
1897
1885
const char * strings [PROPERTY_COUNT ] = {0 };
1898
1886
#define USERNAME_LENGTH 128
1899
1887
char username [USERNAME_LENGTH ] = {0 };
@@ -1967,7 +1955,7 @@ getSystemPropertyList(JNIEnv *env)
1967
1955
strings [propIndex ++ ] = "big" ;
1968
1956
#endif /* defined(J9VM_ENV_LITTLE_ENDIAN) */
1969
1957
1970
- #if JAVA_SPEC_VERSION < 17
1958
+ #if JAVA_SPEC_VERSION < 11
1971
1959
strings [propIndex ++ ] = "sun.cpu.endian" ;
1972
1960
#if defined(J9VM_ENV_LITTLE_ENDIAN )
1973
1961
strings [propIndex ++ ] = "little" ;
@@ -1998,7 +1986,11 @@ getSystemPropertyList(JNIEnv *env)
1998
1986
/* Get the variant */
1999
1987
strings [propIndex ++ ] = "user.variant" ;
2000
1988
strings [propIndex ++ ] = variant ;
2001
- #endif /* JAVA_SPEC_VERSION < 17 */
1989
+
1990
+ /* Get the timezone */
1991
+ strings [propIndex ++ ] = "user.timezone" ;
1992
+ strings [propIndex ++ ] = "" ;
1993
+ #endif /* JAVA_SPEC_VERSION < 11 */
2002
1994
2003
1995
/* Get the User name */
2004
1996
strings [propIndex ++ ] = "user.name" ;
0 commit comments