Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Permalink
Browse files
8257438: Avoid adding duplicate values into extendedKeyCodesSet
Reviewed-by: serb
  • Loading branch information
turbanoff authored and mrserb committed Dec 3, 2020
1 parent 37c7835 commit f83fd4acb4c04285d14eae6b8fee0de58bfcdd45
Showing 1 changed file with 2 additions and 7 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, 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
@@ -44,7 +44,7 @@ public class ExtendedKeyCodes {
// known keyboard layout. For instance, sterling sign is on the primary layer
// of the Mac Italian layout.
private static final HashSet<Integer> extendedKeyCodesSet =
new HashSet<Integer>(501, 1.0f);
new HashSet<Integer>(496, 1.0f);
public static final int getExtendedKeyCodeForChar( int c ) {
int uc = Character.toUpperCase( c );
int lc = Character.toLowerCase( c );
@@ -394,7 +394,6 @@ public static final int getExtendedKeyCodeForChar( int c ) {
extendedKeyCodesSet.add(0x01000000+0x06AF);
extendedKeyCodesSet.add(0x01000000+0x06BE);
extendedKeyCodesSet.add(0x01000000+0x06CC);
extendedKeyCodesSet.add(0x01000000+0x06CC);
extendedKeyCodesSet.add(0x01000000+0x06D2);
extendedKeyCodesSet.add(0x01000000+0x0493);
extendedKeyCodesSet.add(0x01000000+0x0497);
@@ -577,12 +576,8 @@ public static final int getExtendedKeyCodeForChar( int c ) {
extendedKeyCodesSet.add(0x01000000+0x0E59);
extendedKeyCodesSet.add(0x01000000+0x0587);
extendedKeyCodesSet.add(0x01000000+0x0589);
extendedKeyCodesSet.add(0x01000000+0x0589);
extendedKeyCodesSet.add(0x01000000+0x055D);
extendedKeyCodesSet.add(0x01000000+0x055D);
extendedKeyCodesSet.add(0x01000000+0x055B);
extendedKeyCodesSet.add(0x01000000+0x055B);
extendedKeyCodesSet.add(0x01000000+0x055E);
extendedKeyCodesSet.add(0x01000000+0x055E);
extendedKeyCodesSet.add(0x01000000+0x0561);
extendedKeyCodesSet.add(0x01000000+0x0562);

0 comments on commit f83fd4a

Please sign in to comment.