Skip to content

Commit

Permalink
[GR-21741] Avoids data on posix oses
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteban Ginez committed Apr 7, 2020
1 parent e03b903 commit d999203
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/**
* Specifies the name of the libraries this library depends on.
*
* @since 20.0.1
* @since 20.1.0
*/
String[] dependsOn() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ private static String getSystemTimeZoneID(String javaHome) {
int contentLen = 0;
PinnedObject pinnedContent = null;
try {
TimeZoneSupport timeZoneSupport = ImageSingletons.lookup(TimeZoneSupport.class);
byte[] content = timeZoneSupport.getTzMappingsContent();
if (content != null) {
if (ImageSingletons.contains(TimeZoneSupport.class)) {
byte[] content = ImageSingletons.lookup(TimeZoneSupport.class).getTzMappingsContent();
contentLen = content.length;
pinnedContent = PinnedObject.create(content);
tzMappingsPtr = pinnedContent.addressOfArrayElement(0);
Expand Down Expand Up @@ -168,7 +167,6 @@ private static byte[] cleanCR(byte[] buffer) {
public void afterRegistration(AfterRegistrationAccess access) {

if (OS.getCurrent() != OS.WINDOWS) {
ImageSingletons.add(TimeZoneSupport.class, new TimeZoneSupport(null));
return;
}

Expand Down

0 comments on commit d999203

Please sign in to comment.