8282625: Formatter caches Locale/DecimalFormatSymbols poorly

Reviewed-by: naoto, rriggs, jpai
This commit is contained in:
Jim Laskey 2022-03-22 15:32:46 +00:00
parent fabde3b7b8
commit 557ff4b355
3 changed files with 58 additions and 42 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, 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
@ -188,6 +188,15 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
return dfsyms;
}
/**
* {@return locale used to create this instance}
*
* @since 19
*/
public Locale getLocale() {
return locale;
}
/**
* Gets the character used for zero. Different for Arabic, etc.
*