X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FCaseInsensitiveString.java;h=536671db9d7399a16da6027d8866ebb5dbcb5b72;hb=5faac1104c41690e38e259fae5bb700236021360;hp=aa422281fcb5277f319f9aa02a068cf47491a7ed;hpb=cc3a63ccd975af4c3d7d6bd5c0113b55962e39ba;p=jalview.git diff --git a/src/jalview/util/CaseInsensitiveString.java b/src/jalview/util/CaseInsensitiveString.java index aa42228..536671d 100644 --- a/src/jalview/util/CaseInsensitiveString.java +++ b/src/jalview/util/CaseInsensitiveString.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; /** @@ -5,6 +25,8 @@ package jalview.util; * want to preserve case, but do not want to duplicate upper and lower case * variants */ +import java.util.Locale; + public final class CaseInsensitiveString { String value; @@ -51,7 +73,7 @@ public final class CaseInsensitiveString @Override public int hashCode() { - return value == null ? super.hashCode() : value.toUpperCase() - .hashCode(); + return value == null ? super.hashCode() + : value.toUpperCase(Locale.ROOT).hashCode(); } }