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

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,6 @@
package java.util.regex; package java.util.regex;
import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.regex.Pattern.CharPredicate; import java.util.regex.Pattern.CharPredicate;
import java.util.regex.Pattern.BmpCharPredicate; import java.util.regex.Pattern.BmpCharPredicate;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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 if (head.study(info)) { // Deterministic
GroupTail temp = (GroupTail) tail; GroupTail temp = (GroupTail) tail;
head = root = new GroupCurly(head.next, curly.cmin, head = root = new GroupCurly(head.next, curly.cmin,
curly.cmax, curly.type, curly.cmax, curly.type,
((GroupTail)tail).localIndex, temp.localIndex,
((GroupTail)tail).groupIndex, temp.groupIndex,
capturingGroup); capturingGroup);
return head; return head;
} else { // Non-deterministic } else { // Non-deterministic
int temp = ((GroupHead) head).localIndex; int temp = ((GroupHead) head).localIndex;