mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8181157: CLDR Timezone name fallback implementation
Reviewed-by: sherman, scolebourne
This commit is contained in:
parent
3105e04e1b
commit
fafd844bc6
22 changed files with 639 additions and 155 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -79,15 +79,16 @@ public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
|
|||
*/
|
||||
@Override
|
||||
public Object handleGetObject(String key) {
|
||||
String[] contents = (String[]) super.handleGetObject(key);
|
||||
if (Objects.isNull(contents)) {
|
||||
return null;
|
||||
Object val = super.handleGetObject(key);
|
||||
if (val instanceof String[]) {
|
||||
String[] contents = (String[]) val;
|
||||
int clen = contents.length;
|
||||
String[] tmpobj = new String[7];
|
||||
tmpobj[0] = key;
|
||||
System.arraycopy(contents, 0, tmpobj, 1, clen);
|
||||
return tmpobj;
|
||||
}
|
||||
int clen = contents.length;
|
||||
String[] tmpobj = new String[7];
|
||||
tmpobj[0] = key;
|
||||
System.arraycopy(contents, 0, tmpobj, 1, clen);
|
||||
return tmpobj;
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue