mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8187089: StringConcatFactory.makeConcat & makeConcatWithConstants should throw StringConcatException if parameter slot count is over 200
Reviewed-by: rriggs, shade
This commit is contained in:
parent
18cbe428c1
commit
34c9d598c7
2 changed files with 108 additions and 6 deletions
|
@ -398,8 +398,8 @@ public final class StringConcatFactory {
|
|||
* <p>Then the following linkage invariants must hold:
|
||||
*
|
||||
* <ul>
|
||||
* <li>The parameter count in {@code concatType} is less than or equal to 200</li>
|
||||
*
|
||||
* <li>The number of parameter slots in {@code concatType} is
|
||||
* less than or equal to 200</li>
|
||||
* <li>The return type in {@code concatType} is assignable from {@link java.lang.String}</li>
|
||||
* </ul>
|
||||
*
|
||||
|
@ -487,8 +487,8 @@ public final class StringConcatFactory {
|
|||
* <p>Then the following linkage invariants must hold:
|
||||
*
|
||||
* <ul>
|
||||
* <li>The parameter count in {@code concatType} is less than or equal to
|
||||
* 200</li>
|
||||
* <li>The number of parameter slots in {@code concatType} is less than
|
||||
* or equal to 200</li>
|
||||
*
|
||||
* <li>The parameter count in {@code concatType} equals to number of \1 tags
|
||||
* in {@code recipe}</li>
|
||||
|
@ -613,9 +613,9 @@ public final class StringConcatFactory {
|
|||
concatType.returnType());
|
||||
}
|
||||
|
||||
if (concatType.parameterCount() > MAX_INDY_CONCAT_ARG_SLOTS) {
|
||||
if (concatType.parameterSlotCount() > MAX_INDY_CONCAT_ARG_SLOTS) {
|
||||
throw new StringConcatException("Too many concat argument slots: " +
|
||||
concatType.parameterCount() +
|
||||
concatType.parameterSlotCount() +
|
||||
", can only accept " +
|
||||
MAX_INDY_CONCAT_ARG_SLOTS);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue