mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8182743: Ineffective use of volatile hurts performance of Charset.atBugLevel()
Reviewed-by: clanger, redestad, plevart, coffeys
This commit is contained in:
parent
7b258a7561
commit
43fc1b68a2
4 changed files with 10 additions and 56 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
|
@ -195,12 +195,10 @@ public abstract class Charset$Coder$ {
|
|||
if (max$ItypesPerOtype$ <= 0.0f)
|
||||
throw new IllegalArgumentException("Non-positive "
|
||||
+ "max$ItypesPerOtype$");
|
||||
if (!Charset.atBugLevel("1.4")) {
|
||||
if (average$ItypesPerOtype$ > max$ItypesPerOtype$)
|
||||
throw new IllegalArgumentException("average$ItypesPerOtype$"
|
||||
+ " exceeds "
|
||||
+ "max$ItypesPerOtype$");
|
||||
}
|
||||
if (average$ItypesPerOtype$ > max$ItypesPerOtype$)
|
||||
throw new IllegalArgumentException("average$ItypesPerOtype$"
|
||||
+ " exceeds "
|
||||
+ "max$ItypesPerOtype$");
|
||||
this.replacement = replacement;
|
||||
this.average$ItypesPerOtype$ = average$ItypesPerOtype$;
|
||||
this.max$ItypesPerOtype$ = max$ItypesPerOtype$;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue