1.1 --- a/src/share/classes/com/sun/tools/doclint/Messages.java Wed Jun 04 20:01:13 2014 +0100 1.2 +++ b/src/share/classes/com/sun/tools/doclint/Messages.java Tue Dec 17 10:55:59 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -42,6 +42,7 @@ 1.11 import com.sun.source.doctree.DocTree; 1.12 import com.sun.source.tree.Tree; 1.13 import com.sun.tools.doclint.Env.AccessKind; 1.14 +import com.sun.tools.javac.util.StringUtils; 1.15 1.16 /** 1.17 * Message reporting for DocLint. 1.18 @@ -67,7 +68,7 @@ 1.19 SYNTAX, 1.20 REFERENCE; 1.21 1.22 - String optName() { return name().toLowerCase(); } 1.23 + String optName() { return StringUtils.toLowerCase(name()); } 1.24 String notOptName() { return "-" + optName(); } 1.25 1.26 static boolean accepts(String opt) { 1.27 @@ -158,7 +159,7 @@ 1.28 1.29 static boolean isValidOptions(String opts) { 1.30 for (String opt: opts.split(",")) { 1.31 - if (!isValidOption(opt.trim().toLowerCase())) 1.32 + if (!isValidOption(StringUtils.toLowerCase(opt.trim()))) 1.33 return false; 1.34 } 1.35 return true; 1.36 @@ -203,7 +204,7 @@ 1.37 setOption(ALL, Env.AccessKind.PRIVATE); 1.38 else { 1.39 for (String opt: opts.split(",")) 1.40 - setOption(opt.trim().toLowerCase()); 1.41 + setOption(StringUtils.toLowerCase(opt.trim())); 1.42 } 1.43 } 1.44 1.45 @@ -215,7 +216,7 @@ 1.46 1.47 int sep = arg.indexOf("/"); 1.48 if (sep > 0) { 1.49 - Env.AccessKind ak = Env.AccessKind.valueOf(arg.substring(sep + 1).toUpperCase()); 1.50 + Env.AccessKind ak = Env.AccessKind.valueOf(StringUtils.toUpperCase(arg.substring(sep + 1))); 1.51 setOption(arg.substring(0, sep), ak); 1.52 } else { 1.53 setOption(arg, null); 1.54 @@ -290,7 +291,7 @@ 1.55 out.println("By diagnostic kind..."); 1.56 Table dkindTable = new Table(); 1.57 for (Diagnostic.Kind k : Diagnostic.Kind.values()) { 1.58 - dkindTable.put(k.toString().toLowerCase(), dkindCounts[k.ordinal()]); 1.59 + dkindTable.put(StringUtils.toLowerCase(k.toString()), dkindCounts[k.ordinal()]); 1.60 } 1.61 dkindTable.print(out); 1.62 out.println();