8328700: Unused import and variable should be deleted in regex package

Reviewed-by: redestad, rriggs, bpb, naoto, iris
This commit is contained in:
Raffaello Giulietti 2024-03-25 08:47:14 +00:00
parent cf9b5a71bd
commit 19a0151a52
2 changed files with 6 additions and 7 deletions
src/java.base/share/classes/java/util/regex

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -25,7 +25,6 @@
package java.util.regex;
import java.util.HashMap;
import java.util.Locale;
import java.util.regex.Pattern.CharPredicate;
import java.util.regex.Pattern.BmpCharPredicate;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -3272,10 +3272,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
if (head.study(info)) { // Deterministic
GroupTail temp = (GroupTail) tail;
head = root = new GroupCurly(head.next, curly.cmin,
curly.cmax, curly.type,
((GroupTail)tail).localIndex,
((GroupTail)tail).groupIndex,
capturingGroup);
curly.cmax, curly.type,
temp.localIndex,
temp.groupIndex,
capturingGroup);
return head;
} else { // Non-deterministic
int temp = ((GroupHead) head).localIndex;