diff -r 41af13b70efd -r 62a4355dc9c8 src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java --- a/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java Fri Jan 04 12:30:20 2019 -0500 +++ b/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java Fri Jan 04 10:42:12 2019 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -372,8 +372,10 @@ return match; } else if (grpEntry.longestRewriteMatch > longestRewriteMatch) { rewriteMatch = match; + longestRewriteMatch = grpEntry.longestRewriteMatch; } else if (grpEntry.longestSuffixMatch > longestSuffixMatch) { suffixMatch = match; + longestSuffixMatch = grpEntry.longestSuffixMatch; } break; }