Skip to content
Permalink
Browse files
8273430: Suspicious duplicate condition in java.util.regex.Grapheme#i…
…sExcludedSpacingMark

Reviewed-by: naoto
  • Loading branch information
Ian Graves committed Sep 13, 2021
1 parent 5095068 commit 3d9dc8f824abf597d9b28f456cfeb5af927221b8
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 392 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -151,10 +151,10 @@ static int nextBoundary(CharSequence src, int off, int limit) {
// #tr29: SpacingMark exceptions: The following (which have
// General_Category = Spacing_Mark and would otherwise be included)
// are specifically excluded
private static boolean isExcludedSpacingMark(int cp) {
static boolean isExcludedSpacingMark(int cp) {
return cp == 0x102B || cp == 0x102C || cp == 0x1038 ||
cp >= 0x1062 && cp <= 0x1064 ||
cp >= 0x1062 && cp <= 0x106D ||
cp >= 0x1067 && cp <= 0x106D ||
cp == 0x1083 ||
cp >= 0x1087 && cp <= 0x108C ||
cp == 0x108F ||
@@ -164,7 +164,7 @@ private static boolean isExcludedSpacingMark(int cp) {
}

@SuppressWarnings("fallthrough")
private static int getType(int cp) {
static int getType(int cp) {
if (cp < 0x007F) { // ASCII
if (cp < 32) { // Control characters
if (cp == 0x000D)

1 comment on commit 3d9dc8f

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 3d9dc8f Sep 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.