1.1 --- a/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java Thu Nov 17 10:51:17 2011 -0800 1.2 +++ b/src/share/classes/sun/rmi/rmic/iiop/IDLNames.java Wed Mar 28 02:50:50 2012 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1998, 2012, 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 @@ -71,6 +71,34 @@ 1.11 (byte)'F', 1.12 }; 1.13 1.14 + // Legal IDL Identifier characters (1 = legal). Note 1.15 + // that '.' (2E) is marked as legal even though it is 1.16 + // not legal in IDL. This allows us to treat a fully 1.17 + // qualified Java name with '.' package separators 1.18 + // uniformly, and is safe because that is the only 1.19 + // legal use of '.' in a Java name. 1.20 + 1.21 + private static final byte[] IDL_IDENTIFIER_CHARS = { 1.22 + 1.23 + // 0 1 2 3 4 5 6 7 8 9 a b c d e f 1.24 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f 1.25 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 10-1f 1.26 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // 20-2f 1.27 + 1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0, // 30-3f 1.28 + 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 40-4f 1.29 + 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,1, // 50-5f 1.30 + 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 60-6f 1.31 + 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, // 70-7f 1.32 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 80-8f 1.33 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 90-9f 1.34 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // a0-af 1.35 + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // b0-bf 1.36 + 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // c0-cf 1.37 + 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // d0-df 1.38 + 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // e0-ef 1.39 + 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // f0-ff 1.40 + }; 1.41 + 1.42 //_____________________________________________________________________ 1.43 // Public Interfaces 1.44 //_____________________________________________________________________ 1.45 @@ -139,7 +167,7 @@ 1.46 result = replace(result,"x\\U","U"); 1.47 1.48 // Now see if we have any remaining illegal characters (see 1.49 - // RepositoryId.IDL_IDENTIFIER_CHARS array)... 1.50 + // IDL_IDENTIFIER_CHARS array)... 1.51 1.52 int length = result.length(); 1.53 StringBuffer buffer = null; 1.54 @@ -148,7 +176,7 @@ 1.55 1.56 char c = result.charAt(i); 1.57 1.58 - if (c > 255 || RepositoryId.IDL_IDENTIFIER_CHARS[c] == 0) { 1.59 + if (c > 255 || IDL_IDENTIFIER_CHARS[c] == 0) { 1.60 1.61 // We gotta convert. Have we already started? 1.62