Mon, 04 May 2009 22:14:18 -0700
Merge
1.1 --- a/src/share/classes/com/sun/codemodel/internal/JClassContainer.java Thu Apr 30 15:04:33 2009 -0700 1.2 +++ b/src/share/classes/com/sun/codemodel/internal/JClassContainer.java Mon May 04 22:14:18 2009 -0700 1.3 @@ -145,6 +145,7 @@ 1.4 * newly created Annotation Type Declaration 1.5 * @exception JClassAlreadyExistsException 1.6 * When the specified class/interface was already created. 1.7 + 1.8 */ 1.9 public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException; 1.10 1.11 @@ -156,6 +157,7 @@ 1.12 * newly created Enum 1.13 * @exception JClassAlreadyExistsException 1.14 * When the specified class/interface was already created. 1.15 + 1.16 */ 1.17 public JDefinedClass _enum (String name) throws JClassAlreadyExistsException; 1.18
2.1 --- a/src/share/classes/com/sun/codemodel/internal/JDefinedClass.java Thu Apr 30 15:04:33 2009 -0700 2.2 +++ b/src/share/classes/com/sun/codemodel/internal/JDefinedClass.java Mon May 04 22:14:18 2009 -0700 2.3 @@ -428,6 +428,7 @@ 2.4 * newly created Annotation Type Declaration 2.5 * @exception JClassAlreadyExistsException 2.6 * When the specified class/interface was already created. 2.7 + 2.8 */ 2.9 public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException { 2.10 return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
3.1 --- a/src/share/classes/com/sun/codemodel/internal/JForEach.java Thu Apr 30 15:04:33 2009 -0700 3.2 +++ b/src/share/classes/com/sun/codemodel/internal/JForEach.java Mon May 04 22:14:18 2009 -0700 3.3 @@ -33,17 +33,17 @@ 3.4 */ 3.5 public final class JForEach implements JStatement { 3.6 3.7 - private final JType type; 3.8 - private final String var; 3.9 - private JBlock body = null; // lazily created 3.10 - private final JExpression collection; 3.11 + private final JType type; 3.12 + private final String var; 3.13 + private JBlock body = null; // lazily created 3.14 + private final JExpression collection; 3.15 private final JVar loopVar; 3.16 3.17 - public JForEach(JType vartype, String variable, JExpression collection) { 3.18 + public JForEach(JType vartype, String variable, JExpression collection) { 3.19 3.20 - this.type = vartype; 3.21 - this.var = variable; 3.22 - this.collection = collection; 3.23 + this.type = vartype; 3.24 + this.var = variable; 3.25 + this.collection = collection; 3.26 loopVar = new JVar(JMods.forVar(JMod.NONE), type, var, collection); 3.27 } 3.28 3.29 @@ -51,24 +51,24 @@ 3.30 /** 3.31 * Returns a reference to the loop variable. 3.32 */ 3.33 - public JVar var() { 3.34 - return loopVar; 3.35 - } 3.36 + public JVar var() { 3.37 + return loopVar; 3.38 + } 3.39 3.40 - public JBlock body() { 3.41 - if (body == null) 3.42 - body = new JBlock(); 3.43 - return body; 3.44 - } 3.45 + public JBlock body() { 3.46 + if (body == null) 3.47 + body = new JBlock(); 3.48 + return body; 3.49 + } 3.50 3.51 - public void state(JFormatter f) { 3.52 - f.p("for ("); 3.53 - f.g(type).id(var).p(": ").g(collection); 3.54 - f.p(')'); 3.55 - if (body != null) 3.56 - f.g(body).nl(); 3.57 - else 3.58 - f.p(';').nl(); 3.59 - } 3.60 + public void state(JFormatter f) { 3.61 + f.p("for ("); 3.62 + f.g(type).id(var).p(": ").g(collection); 3.63 + f.p(')'); 3.64 + if (body != null) 3.65 + f.g(body).nl(); 3.66 + else 3.67 + f.p(';').nl(); 3.68 + } 3.69 3.70 }
4.1 --- a/src/share/classes/com/sun/codemodel/internal/JMethod.java Thu Apr 30 15:04:33 2009 -0700 4.2 +++ b/src/share/classes/com/sun/codemodel/internal/JMethod.java Mon May 04 22:14:18 2009 -0700 4.3 @@ -38,49 +38,49 @@ 4.4 */ 4.5 public class JMethod extends JGenerifiableImpl implements JDeclaration, JAnnotatable { 4.6 4.7 - /** 4.8 - * Modifiers for this method 4.9 - */ 4.10 - private JMods mods; 4.11 + /** 4.12 + * Modifiers for this method 4.13 + */ 4.14 + private JMods mods; 4.15 4.16 - /** 4.17 - * Return type for this method 4.18 - */ 4.19 - private JType type = null; 4.20 + /** 4.21 + * Return type for this method 4.22 + */ 4.23 + private JType type = null; 4.24 4.25 - /** 4.26 - * Name of this method 4.27 - */ 4.28 - private String name = null; 4.29 + /** 4.30 + * Name of this method 4.31 + */ 4.32 + private String name = null; 4.33 4.34 - /** 4.35 - * List of parameters for this method's declaration 4.36 - */ 4.37 - private final List<JVar> params = new ArrayList<JVar>(); 4.38 + /** 4.39 + * List of parameters for this method's declaration 4.40 + */ 4.41 + private final List<JVar> params = new ArrayList<JVar>(); 4.42 4.43 - /** 4.44 - * Set of exceptions that this method may throw. 4.45 + /** 4.46 + * Set of exceptions that this method may throw. 4.47 * A set instance lazily created. 4.48 - */ 4.49 - private Set<JClass> _throws; 4.50 + */ 4.51 + private Set<JClass> _throws; 4.52 4.53 - /** 4.54 - * JBlock of statements that makes up the body this method 4.55 - */ 4.56 - private JBlock body = null; 4.57 + /** 4.58 + * JBlock of statements that makes up the body this method 4.59 + */ 4.60 + private JBlock body = null; 4.61 4.62 - private JDefinedClass outer; 4.63 + private JDefinedClass outer; 4.64 4.65 - /** 4.66 - * javadoc comments for this JMethod 4.67 - */ 4.68 - private JDocComment jdoc = null; 4.69 + /** 4.70 + * javadoc comments for this JMethod 4.71 + */ 4.72 + private JDocComment jdoc = null; 4.73 4.74 - /** 4.75 - * Variable parameter for this method's varargs declaration 4.76 - * introduced in J2SE 1.5 4.77 - */ 4.78 - private JVar varParam = null; 4.79 + /** 4.80 + * Variable parameter for this method's varargs declaration 4.81 + * introduced in J2SE 1.5 4.82 + */ 4.83 + private JVar varParam = null; 4.84 4.85 /** 4.86 * Annotations on this variable. Lazily created. 4.87 @@ -88,9 +88,9 @@ 4.88 private List<JAnnotationUse> annotations = null; 4.89 4.90 4.91 - private boolean isConstructor() { 4.92 - return type == null; 4.93 - } 4.94 + private boolean isConstructor() { 4.95 + return type == null; 4.96 + } 4.97 4.98 /** To set the default value for the 4.99 * annotation member 4.100 @@ -98,40 +98,40 @@ 4.101 private JExpression defaultValue = null; 4.102 4.103 4.104 - /** 4.105 - * JMethod constructor 4.106 - * 4.107 - * @param mods 4.108 - * Modifiers for this method's declaration 4.109 - * 4.110 - * @param type 4.111 - * Return type for the method 4.112 - * 4.113 - * @param name 4.114 - * Name of this method 4.115 - */ 4.116 - JMethod(JDefinedClass outer, int mods, JType type, String name) { 4.117 - this.mods = JMods.forMethod(mods); 4.118 - this.type = type; 4.119 - this.name = name; 4.120 - this.outer = outer; 4.121 - } 4.122 + /** 4.123 + * JMethod constructor 4.124 + * 4.125 + * @param mods 4.126 + * Modifiers for this method's declaration 4.127 + * 4.128 + * @param type 4.129 + * Return type for the method 4.130 + * 4.131 + * @param name 4.132 + * Name of this method 4.133 + */ 4.134 + JMethod(JDefinedClass outer, int mods, JType type, String name) { 4.135 + this.mods = JMods.forMethod(mods); 4.136 + this.type = type; 4.137 + this.name = name; 4.138 + this.outer = outer; 4.139 + } 4.140 4.141 - /** 4.142 - * Constructor constructor 4.143 - * 4.144 - * @param mods 4.145 - * Modifiers for this constructor's declaration 4.146 - * 4.147 - * @param _class 4.148 - * JClass containing this constructor 4.149 - */ 4.150 - JMethod(int mods, JDefinedClass _class) { 4.151 - this.mods = JMods.forMethod(mods); 4.152 - this.type = null; 4.153 - this.name = _class.name(); 4.154 - this.outer = _class; 4.155 - } 4.156 + /** 4.157 + * Constructor constructor 4.158 + * 4.159 + * @param mods 4.160 + * Modifiers for this constructor's declaration 4.161 + * 4.162 + * @param _class 4.163 + * JClass containing this constructor 4.164 + */ 4.165 + JMethod(int mods, JDefinedClass _class) { 4.166 + this.mods = JMods.forMethod(mods); 4.167 + this.type = null; 4.168 + this.name = _class.name(); 4.169 + this.outer = _class; 4.170 + } 4.171 4.172 private Set<JClass> getThrows() { 4.173 if(_throws==null) 4.174 @@ -139,56 +139,56 @@ 4.175 return _throws; 4.176 } 4.177 4.178 - /** 4.179 - * Add an exception to the list of exceptions that this 4.180 - * method may throw. 4.181 - * 4.182 - * @param exception 4.183 - * Name of an exception that this method may throw 4.184 - */ 4.185 - public JMethod _throws(JClass exception) { 4.186 + /** 4.187 + * Add an exception to the list of exceptions that this 4.188 + * method may throw. 4.189 + * 4.190 + * @param exception 4.191 + * Name of an exception that this method may throw 4.192 + */ 4.193 + public JMethod _throws(JClass exception) { 4.194 getThrows().add(exception); 4.195 - return this; 4.196 - } 4.197 + return this; 4.198 + } 4.199 4.200 - public JMethod _throws(Class exception) { 4.201 - return _throws(outer.owner().ref(exception)); 4.202 - } 4.203 + public JMethod _throws(Class exception) { 4.204 + return _throws(outer.owner().ref(exception)); 4.205 + } 4.206 4.207 - /** 4.208 - * Add the specified variable to the list of parameters 4.209 - * for this method signature. 4.210 - * 4.211 - * @param type 4.212 - * JType of the parameter being added 4.213 - * 4.214 - * @param name 4.215 - * Name of the parameter being added 4.216 - * 4.217 - * @return New parameter variable 4.218 - */ 4.219 - public JVar param(int mods, JType type, String name) { 4.220 - JVar v = new JVar(JMods.forVar(mods), type, name, null); 4.221 - params.add(v); 4.222 - return v; 4.223 - } 4.224 + /** 4.225 + * Add the specified variable to the list of parameters 4.226 + * for this method signature. 4.227 + * 4.228 + * @param type 4.229 + * JType of the parameter being added 4.230 + * 4.231 + * @param name 4.232 + * Name of the parameter being added 4.233 + * 4.234 + * @return New parameter variable 4.235 + */ 4.236 + public JVar param(int mods, JType type, String name) { 4.237 + JVar v = new JVar(JMods.forVar(mods), type, name, null); 4.238 + params.add(v); 4.239 + return v; 4.240 + } 4.241 4.242 - public JVar param(JType type, String name) { 4.243 - return param(JMod.NONE, type, name); 4.244 - } 4.245 + public JVar param(JType type, String name) { 4.246 + return param(JMod.NONE, type, name); 4.247 + } 4.248 4.249 - public JVar param(int mods, Class type, String name) { 4.250 - return param(mods, outer.owner()._ref(type), name); 4.251 - } 4.252 + public JVar param(int mods, Class type, String name) { 4.253 + return param(mods, outer.owner()._ref(type), name); 4.254 + } 4.255 4.256 - public JVar param(Class type, String name) { 4.257 - return param(outer.owner()._ref(type), name); 4.258 - } 4.259 + public JVar param(Class type, String name) { 4.260 + return param(outer.owner()._ref(type), name); 4.261 + } 4.262 4.263 - /** 4.264 - * @see #varParam(JType, String) 4.265 - */ 4.266 - public JVar varParam(Class type, String name) { 4.267 + /** 4.268 + * @see #varParam(JType, String) 4.269 + */ 4.270 + public JVar varParam(Class type, String name) { 4.271 return varParam(outer.owner()._ref(type),name); 4.272 } 4.273 4.274 @@ -210,25 +210,25 @@ 4.275 * method signature. 4.276 */ 4.277 public JVar varParam(JType type, String name) { 4.278 - if (!hasVarArgs()) { 4.279 + if (!hasVarArgs()) { 4.280 4.281 varParam = 4.282 - new JVar( 4.283 - JMods.forVar(JMod.NONE), 4.284 - type.array(), 4.285 - name, 4.286 - null); 4.287 - return varParam; 4.288 - } else { 4.289 - throw new IllegalStateException( 4.290 - "Cannot have two varargs in a method,\n" 4.291 - + "Check if varParam method of JMethod is" 4.292 - + " invoked more than once"); 4.293 + new JVar( 4.294 + JMods.forVar(JMod.NONE), 4.295 + type.array(), 4.296 + name, 4.297 + null); 4.298 + return varParam; 4.299 + } else { 4.300 + throw new IllegalStateException( 4.301 + "Cannot have two varargs in a method,\n" 4.302 + + "Check if varParam method of JMethod is" 4.303 + + " invoked more than once"); 4.304 + 4.305 + } 4.306 4.307 } 4.308 4.309 - } 4.310 - 4.311 /** 4.312 * Adds an annotation to this variable. 4.313 * @param clazz 4.314 @@ -256,17 +256,17 @@ 4.315 return TypedAnnotationWriter.create(clazz,this); 4.316 } 4.317 4.318 - /** 4.319 - * Check if there are any varargs declared 4.320 - * for this method signature. 4.321 - */ 4.322 - public boolean hasVarArgs() { 4.323 - return this.varParam!=null; 4.324 - } 4.325 + /** 4.326 + * Check if there are any varargs declared 4.327 + * for this method signature. 4.328 + */ 4.329 + public boolean hasVarArgs() { 4.330 + return this.varParam!=null; 4.331 + } 4.332 4.333 - public String name() { 4.334 - return name; 4.335 - } 4.336 + public String name() { 4.337 + return name; 4.338 + } 4.339 4.340 /** 4.341 * Changes the name of the method. 4.342 @@ -276,11 +276,11 @@ 4.343 } 4.344 4.345 /** 4.346 - * Returns the return type. 4.347 - */ 4.348 - public JType type() { 4.349 - return type; 4.350 - } 4.351 + * Returns the return type. 4.352 + */ 4.353 + public JType type() { 4.354 + return type; 4.355 + } 4.356 4.357 /** 4.358 * Overrides the return type. 4.359 @@ -290,72 +290,72 @@ 4.360 } 4.361 4.362 /** 4.363 - * Returns all the parameter types in an array. 4.364 - * @return 4.365 - * If there's no parameter, an empty array will be returned. 4.366 - */ 4.367 - public JType[] listParamTypes() { 4.368 - JType[] r = new JType[params.size()]; 4.369 - for (int i = 0; i < r.length; i++) 4.370 - r[i] = params.get(i).type(); 4.371 - return r; 4.372 - } 4.373 + * Returns all the parameter types in an array. 4.374 + * @return 4.375 + * If there's no parameter, an empty array will be returned. 4.376 + */ 4.377 + public JType[] listParamTypes() { 4.378 + JType[] r = new JType[params.size()]; 4.379 + for (int i = 0; i < r.length; i++) 4.380 + r[i] = params.get(i).type(); 4.381 + return r; 4.382 + } 4.383 4.384 - /** 4.385 - * Returns the varags parameter type. 4.386 - * @return 4.387 - * If there's no vararg parameter type, null will be returned. 4.388 - */ 4.389 - public JType listVarParamType() { 4.390 - if (varParam != null) 4.391 - return varParam.type(); 4.392 - else 4.393 - return null; 4.394 - } 4.395 + /** 4.396 + * Returns the varags parameter type. 4.397 + * @return 4.398 + * If there's no vararg parameter type, null will be returned. 4.399 + */ 4.400 + public JType listVarParamType() { 4.401 + if (varParam != null) 4.402 + return varParam.type(); 4.403 + else 4.404 + return null; 4.405 + } 4.406 4.407 - /** 4.408 - * Returns all the parameters in an array. 4.409 - * @return 4.410 - * If there's no parameter, an empty array will be returned. 4.411 - */ 4.412 - public JVar[] listParams() { 4.413 - return params.toArray(new JVar[params.size()]); 4.414 - } 4.415 + /** 4.416 + * Returns all the parameters in an array. 4.417 + * @return 4.418 + * If there's no parameter, an empty array will be returned. 4.419 + */ 4.420 + public JVar[] listParams() { 4.421 + return params.toArray(new JVar[params.size()]); 4.422 + } 4.423 4.424 - /** 4.425 - * Returns the variable parameter 4.426 - * @return 4.427 - * If there's no parameter, null will be returned. 4.428 - */ 4.429 - public JVar listVarParam() { 4.430 - return varParam; 4.431 - } 4.432 + /** 4.433 + * Returns the variable parameter 4.434 + * @return 4.435 + * If there's no parameter, null will be returned. 4.436 + */ 4.437 + public JVar listVarParam() { 4.438 + return varParam; 4.439 + } 4.440 4.441 - /** 4.442 - * Returns true if the method has the specified signature. 4.443 - */ 4.444 - public boolean hasSignature(JType[] argTypes) { 4.445 - JVar[] p = listParams(); 4.446 - if (p.length != argTypes.length) 4.447 - return false; 4.448 + /** 4.449 + * Returns true if the method has the specified signature. 4.450 + */ 4.451 + public boolean hasSignature(JType[] argTypes) { 4.452 + JVar[] p = listParams(); 4.453 + if (p.length != argTypes.length) 4.454 + return false; 4.455 4.456 - for (int i = 0; i < p.length; i++) 4.457 - if (!p[i].type().equals(argTypes[i])) 4.458 - return false; 4.459 + for (int i = 0; i < p.length; i++) 4.460 + if (!p[i].type().equals(argTypes[i])) 4.461 + return false; 4.462 4.463 - return true; 4.464 - } 4.465 + return true; 4.466 + } 4.467 4.468 - /** 4.469 - * Get the block that makes up body of this method 4.470 - * 4.471 - * @return Body of method 4.472 - */ 4.473 - public JBlock body() { 4.474 - if (body == null) 4.475 - body = new JBlock(); 4.476 - return body; 4.477 - } 4.478 + /** 4.479 + * Get the block that makes up body of this method 4.480 + * 4.481 + * @return Body of method 4.482 + */ 4.483 + public JBlock body() { 4.484 + if (body == null) 4.485 + body = new JBlock(); 4.486 + return body; 4.487 + } 4.488 4.489 /** 4.490 * Specify the default value for this annotation member 4.491 @@ -367,37 +367,37 @@ 4.492 this.defaultValue = value; 4.493 } 4.494 4.495 - /** 4.496 - * Creates, if necessary, and returns the class javadoc for this 4.497 - * JDefinedClass 4.498 - * 4.499 - * @return JDocComment containing javadocs for this class 4.500 - */ 4.501 - public JDocComment javadoc() { 4.502 - if (jdoc == null) 4.503 - jdoc = new JDocComment(owner()); 4.504 - return jdoc; 4.505 - } 4.506 + /** 4.507 + * Creates, if necessary, and returns the class javadoc for this 4.508 + * JDefinedClass 4.509 + * 4.510 + * @return JDocComment containing javadocs for this class 4.511 + */ 4.512 + public JDocComment javadoc() { 4.513 + if (jdoc == null) 4.514 + jdoc = new JDocComment(owner()); 4.515 + return jdoc; 4.516 + } 4.517 4.518 - public void declare(JFormatter f) { 4.519 - if (jdoc != null) 4.520 - f.g(jdoc); 4.521 + public void declare(JFormatter f) { 4.522 + if (jdoc != null) 4.523 + f.g(jdoc); 4.524 4.525 if (annotations != null){ 4.526 for (JAnnotationUse a : annotations) 4.527 f.g(a).nl(); 4.528 } 4.529 4.530 - // declare the generics parameters 4.531 - super.declare(f); 4.532 + // declare the generics parameters 4.533 + super.declare(f); 4.534 4.535 - f.g(mods); 4.536 - if (!isConstructor()) 4.537 - f.g(type); 4.538 - f.id(name).p('(').i(); 4.539 + f.g(mods); 4.540 + if (!isConstructor()) 4.541 + f.g(type); 4.542 + f.id(name).p('(').i(); 4.543 // when parameters are printed in new lines, we want them to be indented. 4.544 // there's a good chance no newlines happen, too, but just in case it does. 4.545 - boolean first = true; 4.546 + boolean first = true; 4.547 for (JVar var : params) { 4.548 if (!first) 4.549 f.p(','); 4.550 @@ -406,33 +406,33 @@ 4.551 f.b(var); 4.552 first = false; 4.553 } 4.554 - if (hasVarArgs()) { 4.555 - if (!first) 4.556 - f.p(','); 4.557 - f.g(varParam.type().elementType()); 4.558 - f.p("... "); 4.559 - f.id(varParam.name()); 4.560 - } 4.561 + if (hasVarArgs()) { 4.562 + if (!first) 4.563 + f.p(','); 4.564 + f.g(varParam.type().elementType()); 4.565 + f.p("... "); 4.566 + f.id(varParam.name()); 4.567 + } 4.568 4.569 - f.o().p(')'); 4.570 - if (_throws!=null && !_throws.isEmpty()) { 4.571 - f.nl().i().p("throws").g(_throws).nl().o(); 4.572 - } 4.573 + f.o().p(')'); 4.574 + if (_throws!=null && !_throws.isEmpty()) { 4.575 + f.nl().i().p("throws").g(_throws).nl().o(); 4.576 + } 4.577 4.578 if (defaultValue != null) { 4.579 f.p("default "); 4.580 f.g(defaultValue); 4.581 } 4.582 - if (body != null) { 4.583 - f.s(body); 4.584 - } else if ( 4.585 - !outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract() && !mods.isNative()) { 4.586 - // Print an empty body for non-native, non-abstract methods 4.587 - f.s(new JBlock()); 4.588 - } else { 4.589 - f.p(';').nl(); 4.590 + if (body != null) { 4.591 + f.s(body); 4.592 + } else if ( 4.593 + !outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract() && !mods.isNative()) { 4.594 + // Print an empty body for non-native, non-abstract methods 4.595 + f.s(new JBlock()); 4.596 + } else { 4.597 + f.p(';').nl(); 4.598 + } 4.599 } 4.600 - } 4.601 4.602 /** 4.603 * @return 4.604 @@ -447,10 +447,10 @@ 4.605 * @deprecated use {@link #mods()} 4.606 */ 4.607 public JMods getMods() { 4.608 - return mods; 4.609 - } 4.610 + return mods; 4.611 + } 4.612 4.613 - protected JCodeModel owner() { 4.614 - return outer.owner(); 4.615 - } 4.616 + protected JCodeModel owner() { 4.617 + return outer.owner(); 4.618 + } 4.619 }
5.1 --- a/src/share/classes/com/sun/codemodel/internal/JMods.java Thu Apr 30 15:04:33 2009 -0700 5.2 +++ b/src/share/classes/com/sun/codemodel/internal/JMods.java Mon May 04 22:14:18 2009 -0700 5.3 @@ -41,17 +41,17 @@ 5.4 = JMod.FINAL; 5.5 5.6 private static int FIELD 5.7 - = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED 5.8 - | JMod.STATIC | JMod.FINAL 5.9 - | JMod.TRANSIENT | JMod.VOLATILE); 5.10 + = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED 5.11 + | JMod.STATIC | JMod.FINAL 5.12 + | JMod.TRANSIENT | JMod.VOLATILE); 5.13 5.14 private static int METHOD 5.15 - = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED | JMod.FINAL 5.16 - | JMod.ABSTRACT | JMod.STATIC | JMod.NATIVE | JMod.SYNCHRONIZED); 5.17 + = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED | JMod.FINAL 5.18 + | JMod.ABSTRACT | JMod.STATIC | JMod.NATIVE | JMod.SYNCHRONIZED); 5.19 5.20 private static int CLASS 5.21 - = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED 5.22 - | JMod.STATIC | JMod.FINAL | JMod.ABSTRACT ); 5.23 + = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED 5.24 + | JMod.STATIC | JMod.FINAL | JMod.ABSTRACT ); 5.25 5.26 private static int INTERFACE = JMod.PUBLIC; 5.27
6.1 --- a/src/share/classes/com/sun/codemodel/internal/util/SingleByteEncoder.java Thu Apr 30 15:04:33 2009 -0700 6.2 +++ b/src/share/classes/com/sun/codemodel/internal/util/SingleByteEncoder.java Mon May 04 22:14:18 2009 -0700 6.3 @@ -24,7 +24,7 @@ 6.4 */ 6.5 6.6 /* 6.7 - * @(#)SingleByteEncoder.java 1.14 03/01/23 6.8 + * @(#)SingleByteEncoder.java 1.14 03/01/23 6.9 */ 6.10 6.11 package com.sun.codemodel.internal.util; 6.12 @@ -51,109 +51,109 @@ 6.13 private final Surrogate.Parser sgp = new Surrogate.Parser(); 6.14 6.15 protected SingleByteEncoder(Charset cs, 6.16 - short[] index1, String index2, 6.17 - int mask1, int mask2, int shift) 6.18 + short[] index1, String index2, 6.19 + int mask1, int mask2, int shift) 6.20 { 6.21 - super(cs, 1.0f, 1.0f); 6.22 - this.index1 = index1; 6.23 - this.index2 = index2; 6.24 - this.mask1 = mask1; 6.25 - this.mask2 = mask2; 6.26 - this.shift = shift; 6.27 + super(cs, 1.0f, 1.0f); 6.28 + this.index1 = index1; 6.29 + this.index2 = index2; 6.30 + this.mask1 = mask1; 6.31 + this.mask2 = mask2; 6.32 + this.shift = shift; 6.33 } 6.34 6.35 public boolean canEncode(char c) { 6.36 - char testEncode; 6.37 - testEncode = index2.charAt(index1[(c & mask1) >> shift] 6.38 - + (c & mask2)); 6.39 - if (testEncode == '\u0000') 6.40 - return false; 6.41 - else 6.42 - return true; 6.43 + char testEncode; 6.44 + testEncode = index2.charAt(index1[(c & mask1) >> shift] 6.45 + + (c & mask2)); 6.46 + if (testEncode == '\u0000') 6.47 + return false; 6.48 + else 6.49 + return true; 6.50 } 6.51 6.52 private CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) { 6.53 - char[] sa = src.array(); 6.54 - int sp = src.arrayOffset() + src.position(); 6.55 - int sl = src.arrayOffset() + src.limit(); 6.56 - sp = (sp <= sl ? sp : sl); 6.57 - byte[] da = dst.array(); 6.58 - int dp = dst.arrayOffset() + dst.position(); 6.59 - int dl = dst.arrayOffset() + dst.limit(); 6.60 - dp = (dp <= dl ? dp : dl); 6.61 + char[] sa = src.array(); 6.62 + int sp = src.arrayOffset() + src.position(); 6.63 + int sl = src.arrayOffset() + src.limit(); 6.64 + sp = (sp <= sl ? sp : sl); 6.65 + byte[] da = dst.array(); 6.66 + int dp = dst.arrayOffset() + dst.position(); 6.67 + int dl = dst.arrayOffset() + dst.limit(); 6.68 + dp = (dp <= dl ? dp : dl); 6.69 6.70 - try { 6.71 - while (sp < sl) { 6.72 - char c = sa[sp]; 6.73 - if (Surrogate.is(c)) { 6.74 - if (sgp.parse(c, sa, sp, sl) < 0) 6.75 - return sgp.error(); 6.76 - return sgp.unmappableResult(); 6.77 - } 6.78 - if (c >= '\uFFFE') 6.79 - return CoderResult.unmappableForLength(1); 6.80 - if (dl - dp < 1) 6.81 - return CoderResult.OVERFLOW; 6.82 + try { 6.83 + while (sp < sl) { 6.84 + char c = sa[sp]; 6.85 + if (Surrogate.is(c)) { 6.86 + if (sgp.parse(c, sa, sp, sl) < 0) 6.87 + return sgp.error(); 6.88 + return sgp.unmappableResult(); 6.89 + } 6.90 + if (c >= '\uFFFE') 6.91 + return CoderResult.unmappableForLength(1); 6.92 + if (dl - dp < 1) 6.93 + return CoderResult.OVERFLOW; 6.94 6.95 - char e = index2.charAt(index1[(c & mask1) >> shift] 6.96 - + (c & mask2)); 6.97 + char e = index2.charAt(index1[(c & mask1) >> shift] 6.98 + + (c & mask2)); 6.99 6.100 - // If output byte is zero because input char is zero 6.101 - // then character is mappable, o.w. fail 6.102 - if (e == '\u0000' && c != '\u0000') 6.103 - return CoderResult.unmappableForLength(1); 6.104 + // If output byte is zero because input char is zero 6.105 + // then character is mappable, o.w. fail 6.106 + if (e == '\u0000' && c != '\u0000') 6.107 + return CoderResult.unmappableForLength(1); 6.108 6.109 - sp++; 6.110 - da[dp++] = (byte)e; 6.111 - } 6.112 - return CoderResult.UNDERFLOW; 6.113 - } finally { 6.114 - src.position(sp - src.arrayOffset()); 6.115 - dst.position(dp - dst.arrayOffset()); 6.116 - } 6.117 + sp++; 6.118 + da[dp++] = (byte)e; 6.119 + } 6.120 + return CoderResult.UNDERFLOW; 6.121 + } finally { 6.122 + src.position(sp - src.arrayOffset()); 6.123 + dst.position(dp - dst.arrayOffset()); 6.124 + } 6.125 } 6.126 6.127 private CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) { 6.128 - int mark = src.position(); 6.129 - try { 6.130 - while (src.hasRemaining()) { 6.131 - char c = src.get(); 6.132 - if (Surrogate.is(c)) { 6.133 - if (sgp.parse(c, src) < 0) 6.134 - return sgp.error(); 6.135 - return sgp.unmappableResult(); 6.136 - } 6.137 - if (c >= '\uFFFE') 6.138 - return CoderResult.unmappableForLength(1); 6.139 - if (!dst.hasRemaining()) 6.140 - return CoderResult.OVERFLOW; 6.141 + int mark = src.position(); 6.142 + try { 6.143 + while (src.hasRemaining()) { 6.144 + char c = src.get(); 6.145 + if (Surrogate.is(c)) { 6.146 + if (sgp.parse(c, src) < 0) 6.147 + return sgp.error(); 6.148 + return sgp.unmappableResult(); 6.149 + } 6.150 + if (c >= '\uFFFE') 6.151 + return CoderResult.unmappableForLength(1); 6.152 + if (!dst.hasRemaining()) 6.153 + return CoderResult.OVERFLOW; 6.154 6.155 - char e = index2.charAt(index1[(c & mask1) >> shift] 6.156 - + (c & mask2)); 6.157 + char e = index2.charAt(index1[(c & mask1) >> shift] 6.158 + + (c & mask2)); 6.159 6.160 - // If output byte is zero because input char is zero 6.161 - // then character is mappable, o.w. fail 6.162 - if (e == '\u0000' && c != '\u0000') 6.163 - return CoderResult.unmappableForLength(1); 6.164 + // If output byte is zero because input char is zero 6.165 + // then character is mappable, o.w. fail 6.166 + if (e == '\u0000' && c != '\u0000') 6.167 + return CoderResult.unmappableForLength(1); 6.168 6.169 - mark++; 6.170 - dst.put((byte)e); 6.171 - } 6.172 - return CoderResult.UNDERFLOW; 6.173 - } finally { 6.174 - src.position(mark); 6.175 - } 6.176 + mark++; 6.177 + dst.put((byte)e); 6.178 + } 6.179 + return CoderResult.UNDERFLOW; 6.180 + } finally { 6.181 + src.position(mark); 6.182 + } 6.183 } 6.184 6.185 protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) { 6.186 - if (true && src.hasArray() && dst.hasArray()) 6.187 - return encodeArrayLoop(src, dst); 6.188 - else 6.189 - return encodeBufferLoop(src, dst); 6.190 + if (true && src.hasArray() && dst.hasArray()) 6.191 + return encodeArrayLoop(src, dst); 6.192 + else 6.193 + return encodeBufferLoop(src, dst); 6.194 } 6.195 6.196 public byte encode(char inputChar) { 6.197 - return (byte)index2.charAt(index1[(inputChar & mask1) >> shift] + 6.198 - (inputChar & mask2)); 6.199 + return (byte)index2.charAt(index1[(inputChar & mask1) >> shift] + 6.200 + (inputChar & mask2)); 6.201 } 6.202 }
7.1 --- a/src/share/classes/com/sun/codemodel/internal/util/Surrogate.java Thu Apr 30 15:04:33 2009 -0700 7.2 +++ b/src/share/classes/com/sun/codemodel/internal/util/Surrogate.java Mon May 04 22:14:18 2009 -0700 7.3 @@ -112,7 +112,7 @@ 7.4 7.5 public Parser() { } 7.6 7.7 - private int character; // UCS-4 7.8 + private int character; // UCS-4 7.9 private CoderResult error = CoderResult.UNDERFLOW; 7.10 private boolean isPair; 7.11
8.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java Thu Apr 30 15:04:33 2009 -0700 8.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java Mon May 04 22:14:18 2009 -0700 8.3 @@ -55,12 +55,19 @@ 8.4 */ 8.5 public class HttpSOAPConnection extends SOAPConnection { 8.6 8.7 - protected static Logger log = 8.8 + public static final String vmVendor = System.getProperty("java.vendor.url"); 8.9 + private static final String sunVmVendor = "http://java.sun.com/"; 8.10 + private static final String ibmVmVendor = "http://www.ibm.com/"; 8.11 + private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false; 8.12 + private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false; 8.13 + private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint"; 8.14 + 8.15 + protected static final Logger log = 8.16 Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN, 8.17 "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings"); 8.18 8.19 - public static String defaultProxyHost = null; 8.20 - public static int defaultProxyPort = -1; 8.21 + public static final String defaultProxyHost = null; 8.22 + public static final int defaultProxyPort = -1; 8.23 8.24 MessageFactory messageFactory = null; 8.25 8.26 @@ -72,6 +79,9 @@ 8.27 8.28 try { 8.29 messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL); 8.30 + } catch (NoSuchMethodError ex) { 8.31 + //fallback to default SOAP 1.1 in this case for backward compatibility 8.32 + messageFactory = MessageFactory.newInstance(); 8.33 } catch (Exception ex) { 8.34 log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex); 8.35 throw new SOAPExceptionImpl("Unable to create message factory", ex); 8.36 @@ -96,13 +106,18 @@ 8.37 } 8.38 8.39 Class urlEndpointClass = null; 8.40 + ClassLoader loader = Thread.currentThread().getContextClassLoader(); 8.41 8.42 try { 8.43 - urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); 8.44 - } catch (Exception ex) { 8.45 - //Do nothing. URLEndpoint is available only when JAXM is there. 8.46 - log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM"); 8.47 - } 8.48 + if (loader != null) { 8.49 + urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT); 8.50 + } else { 8.51 + urlEndpointClass = Class.forName(JAXM_URLENDPOINT); 8.52 + } 8.53 + } catch (ClassNotFoundException ex) { 8.54 + //Do nothing. URLEndpoint is available only when JAXM is there. 8.55 + log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM"); 8.56 + } 8.57 8.58 if (urlEndpointClass != null) { 8.59 if (urlEndpointClass.isInstance(endPoint)) { 8.60 @@ -639,10 +654,23 @@ 8.61 8.62 return ret; 8.63 } 8.64 + //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; 8.65 + //private static String SSL_PROVIDER = 8.66 + // "com.sun.net.ssl.internal.ssl.Provider"; 8.67 + private static final String SSL_PKG; 8.68 + private static final String SSL_PROVIDER; 8.69 8.70 - private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; 8.71 - private static String SSL_PROVIDER = 8.72 - "com.sun.net.ssl.internal.ssl.Provider"; 8.73 + 8.74 + static { 8.75 + if (isIBMVM) { 8.76 + SSL_PKG ="com.ibm.net.ssl.internal.www.protocol"; 8.77 + SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider"; 8.78 + } else { 8.79 + //if not IBM VM default to Sun. 8.80 + SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; 8.81 + SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider"; 8.82 + } 8.83 + } 8.84 private void initHttps() { 8.85 //if(!setHttps) { 8.86 String pkgs = System.getProperty("java.protocol.handler.pkgs");
9.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java Thu Apr 30 15:04:33 2009 -0700 9.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java Mon May 04 22:14:18 2009 -0700 9.3 @@ -70,7 +70,7 @@ 9.4 */ 9.5 public class AttachmentPartImpl extends AttachmentPart { 9.6 9.7 - protected static Logger log = 9.8 + protected static final Logger log = 9.9 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 9.10 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 9.11
10.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java Thu Apr 30 15:04:33 2009 -0700 10.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java Mon May 04 22:14:18 2009 -0700 10.3 @@ -23,9 +23,9 @@ 10.4 * have any questions. 10.5 */ 10.6 /* 10.7 - * $Id: EnvelopeFactory.java,v 1.24 2006/01/27 12:49:26 vj135062 Exp $ 10.8 - * $Revision: 1.24 $ 10.9 - * $Date: 2006/01/27 12:49:26 $ 10.10 + * 10.11 + * 10.12 + * 10.13 */ 10.14 10.15 10.16 @@ -55,7 +55,7 @@ 10.17 */ 10.18 public class EnvelopeFactory { 10.19 10.20 - protected static Logger 10.21 + protected static final Logger 10.22 log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 10.23 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 10.24
11.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java Thu Apr 30 15:04:33 2009 -0700 11.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java Mon May 04 22:14:18 2009 -0700 11.3 @@ -49,7 +49,7 @@ 11.4 public class ImageDataContentHandler extends Component 11.5 implements DataContentHandler { 11.6 11.7 - protected static Logger log = 11.8 + protected static final Logger log = 11.9 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 11.10 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 11.11
12.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java Thu Apr 30 15:04:33 2009 -0700 12.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java Mon May 04 22:14:18 2009 -0700 12.3 @@ -23,9 +23,9 @@ 12.4 * have any questions. 12.5 */ 12.6 /* 12.7 - * $Id: MessageFactoryImpl.java,v 1.23 2006/01/27 12:49:27 vj135062 Exp $ 12.8 - * $Revision: 1.23 $ 12.9 - * $Date: 2006/01/27 12:49:27 $ 12.10 + * 12.11 + * 12.12 + * 12.13 */ 12.14 12.15 12.16 @@ -54,15 +54,15 @@ 12.17 */ 12.18 public class MessageFactoryImpl extends MessageFactory { 12.19 12.20 - protected static Logger log = 12.21 + protected static final Logger log = 12.22 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 12.23 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 12.24 12.25 - protected static OutputStream listener; 12.26 + protected OutputStream listener; 12.27 12.28 protected boolean lazyAttachments = false; 12.29 12.30 - public static OutputStream listen(OutputStream newListener) { 12.31 + public OutputStream listen(OutputStream newListener) { 12.32 OutputStream oldListener = listener; 12.33 listener = newListener; 12.34 return oldListener;
13.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java Thu Apr 30 15:04:33 2009 -0700 13.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java Mon May 04 22:14:18 2009 -0700 13.3 @@ -23,9 +23,9 @@ 13.4 * have any questions. 13.5 */ 13.6 /* 13.7 - * $Id: MessageImpl.java,v 1.5 2006/12/12 10:16:33 kumarjayanti Exp $ 13.8 - * $Revision: 1.5 $ 13.9 - * $Date: 2006/12/12 10:16:33 $ 13.10 + * 13.11 + * 13.12 + * 13.13 */ 13.14 13.15 13.16 @@ -69,7 +69,7 @@ 13.17 public static final String CONTENT_ID = "Content-ID"; 13.18 public static final String CONTENT_LOCATION = "Content-Location"; 13.19 13.20 - protected static Logger log = 13.21 + protected static final Logger log = 13.22 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 13.23 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 13.24
14.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java Thu Apr 30 15:04:33 2009 -0700 14.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java Mon May 04 22:14:18 2009 -0700 14.3 @@ -37,7 +37,7 @@ 14.4 14.5 public class SAAJMetaFactoryImpl extends SAAJMetaFactory { 14.6 14.7 - protected static Logger log = 14.8 + protected static final Logger log = 14.9 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 14.10 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 14.11
15.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java Thu Apr 30 15:04:33 2009 -0700 15.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java Mon May 04 22:14:18 2009 -0700 15.3 @@ -23,7 +23,7 @@ 15.4 * have any questions. 15.5 */ 15.6 /* 15.7 - * $Id: SOAPDocumentImpl.java,v 1.15 2006/01/27 12:49:29 vj135062 Exp $ 15.8 + * 15.9 */ 15.10 15.11 15.12 @@ -45,7 +45,7 @@ 15.13 15.14 public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { 15.15 15.16 - protected static Logger log = 15.17 + protected static final Logger log = 15.18 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 15.19 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 15.20
16.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java Thu Apr 30 15:04:33 2009 -0700 16.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java Mon May 04 22:14:18 2009 -0700 16.3 @@ -23,9 +23,9 @@ 16.4 * have any questions. 16.5 */ 16.6 /* 16.7 - * $Id: SOAPFactoryImpl.java,v 1.21 2006/01/27 12:49:29 vj135062 Exp $ 16.8 - * $Revision: 1.21 $ 16.9 - * $Date: 2006/01/27 12:49:29 $ 16.10 + * 16.11 + * 16.12 + * 16.13 */ 16.14 16.15 16.16 @@ -50,7 +50,7 @@ 16.17 16.18 public abstract class SOAPFactoryImpl extends SOAPFactory { 16.19 16.20 - protected static Logger 16.21 + protected static final Logger 16.22 log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 16.23 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 16.24
17.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java Thu Apr 30 15:04:33 2009 -0700 17.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java Mon May 04 22:14:18 2009 -0700 17.3 @@ -23,9 +23,9 @@ 17.4 * have any questions. 17.5 */ 17.6 /* 17.7 - * $Id: SOAPPartImpl.java,v 1.1.1.1 2006/01/27 13:10:55 kumarjayanti Exp $ 17.8 - * $Revision: 1.1.1.1 $ 17.9 - * $Date: 2006/01/27 13:10:55 $ 17.10 + * 17.11 + * 17.12 + * 17.13 */ 17.14 17.15 17.16 @@ -59,7 +59,7 @@ 17.17 * @author Anil Vijendran (anil@sun.com) 17.18 */ 17.19 public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { 17.20 - protected static Logger log = 17.21 + protected static final Logger log = 17.22 Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, 17.23 "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); 17.24
18.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java Thu Apr 30 15:04:33 2009 -0700 18.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java Mon May 04 22:14:18 2009 -0700 18.3 @@ -23,9 +23,9 @@ 18.4 * have any questions. 18.5 */ 18.6 /* 18.7 - * $Id: CDATAImpl.java,v 1.19 2006/01/27 12:49:34 vj135062 Exp $ 18.8 - * $Revision: 1.19 $ 18.9 - * $Date: 2006/01/27 12:49:34 $ 18.10 + * 18.11 + * 18.12 + * 18.13 */ 18.14 18.15 18.16 @@ -43,7 +43,7 @@ 18.17 extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl 18.18 implements javax.xml.soap.Text { 18.19 18.20 - protected static Logger log = 18.21 + protected static final Logger log = 18.22 Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, 18.23 "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); 18.24
19.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java Thu Apr 30 15:04:33 2009 -0700 19.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java Mon May 04 22:14:18 2009 -0700 19.3 @@ -23,9 +23,9 @@ 19.4 * have any questions. 19.5 */ 19.6 /* 19.7 - * $Id: CommentImpl.java,v 1.17 2006/01/27 12:49:34 vj135062 Exp $ 19.8 - * $Revision: 1.17 $ 19.9 - * $Date: 2006/01/27 12:49:34 $ 19.10 + * 19.11 + * 19.12 + * 19.13 */ 19.14 19.15 19.16 @@ -47,7 +47,7 @@ 19.17 extends com.sun.org.apache.xerces.internal.dom.CommentImpl 19.18 implements javax.xml.soap.Text, org.w3c.dom.Comment { 19.19 19.20 - protected static Logger log = 19.21 + protected static final Logger log = 19.22 Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, 19.23 "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); 19.24 protected static ResourceBundle rb =
20.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java Thu Apr 30 15:04:33 2009 -0700 20.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java Mon May 04 22:14:18 2009 -0700 20.3 @@ -23,9 +23,9 @@ 20.4 * have any questions. 20.5 */ 20.6 /* 20.7 - * $Id: ElementImpl.java,v 1.6 2006/11/16 16:01:14 kumarjayanti Exp $ 20.8 - * $Revision: 1.6 $ 20.9 - * $Date: 2006/11/16 16:01:14 $ 20.10 + * 20.11 + * 20.12 + * 20.13 */ 20.14 20.15 20.16 @@ -60,7 +60,7 @@ 20.17 20.18 protected QName elementQName; 20.19 20.20 - protected static Logger log = 20.21 + protected static final Logger log = 20.22 Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, 20.23 "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); 20.24
21.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java Thu Apr 30 15:04:33 2009 -0700 21.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java Mon May 04 22:14:18 2009 -0700 21.3 @@ -23,9 +23,9 @@ 21.4 * have any questions. 21.5 */ 21.6 /* 21.7 - * $Id: TextImpl.java,v 1.19 2006/01/27 12:49:36 vj135062 Exp $ 21.8 - * $Revision: 1.19 $ 21.9 - * $Date: 2006/01/27 12:49:36 $ 21.10 + * 21.11 + * 21.12 + * 21.13 */ 21.14 21.15 21.16 @@ -43,7 +43,7 @@ 21.17 extends com.sun.org.apache.xerces.internal.dom.TextImpl 21.18 implements javax.xml.soap.Text, org.w3c.dom.Text { 21.19 21.20 - protected static Logger log = 21.21 + protected static final Logger log = 21.22 Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, 21.23 "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); 21.24
22.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java Thu Apr 30 15:04:33 2009 -0700 22.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java Mon May 04 22:14:18 2009 -0700 22.3 @@ -23,9 +23,9 @@ 22.4 * have any questions. 22.5 */ 22.6 /* 22.7 - * $Id: NameImpl.java,v 1.48 2006/01/27 12:49:38 vj135062 Exp $ 22.8 - * $Revision: 1.48 $ 22.9 - * $Date: 2006/01/27 12:49:38 $ 22.10 + * 22.11 + * 22.12 + * 22.13 */ 22.14 22.15 22.16 @@ -63,7 +63,7 @@ 22.17 protected String prefix = ""; 22.18 private String qualifiedName = null; 22.19 22.20 - protected static Logger log = 22.21 + protected static final Logger log = 22.22 Logger.getLogger(LogDomainConstants.NAMING_DOMAIN, 22.23 "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings"); 22.24
23.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java Thu Apr 30 15:04:33 2009 -0700 23.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java Mon May 04 22:14:18 2009 -0700 23.3 @@ -23,7 +23,7 @@ 23.4 * have any questions. 23.5 */ 23.6 /* 23.7 - * $Id: Fault1_1Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $ 23.8 + * 23.9 */ 23.10 23.11 23.12 @@ -57,7 +57,7 @@ 23.13 23.14 public class Fault1_1Impl extends FaultImpl { 23.15 23.16 - protected static Logger log = 23.17 + protected static final Logger log = 23.18 Logger.getLogger( 23.19 LogDomainConstants.SOAP_VER1_1_DOMAIN, 23.20 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
24.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java Thu Apr 30 15:04:33 2009 -0700 24.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java Mon May 04 22:14:18 2009 -0700 24.3 @@ -23,7 +23,7 @@ 24.4 * have any questions. 24.5 */ 24.6 /* 24.7 - * $Id: Header1_1Impl.java,v 1.29 2006/01/27 12:49:41 vj135062 Exp $ 24.8 + * 24.9 */ 24.10 24.11 24.12 @@ -50,7 +50,7 @@ 24.13 24.14 public class Header1_1Impl extends HeaderImpl { 24.15 24.16 - protected static Logger log = 24.17 + protected static final Logger log = 24.18 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN, 24.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings"); 24.20
25.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java Thu Apr 30 15:04:33 2009 -0700 25.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java Mon May 04 22:14:18 2009 -0700 25.3 @@ -23,7 +23,7 @@ 25.4 * have any questions. 25.5 */ 25.6 /* 25.7 - * $Id: HeaderElement1_1Impl.java,v 1.29 2006/01/27 12:49:41 vj135062 Exp $ 25.8 + * 25.9 */ 25.10 25.11 25.12 @@ -49,7 +49,7 @@ 25.13 25.14 public class HeaderElement1_1Impl extends HeaderElementImpl { 25.15 25.16 - protected static Logger log = 25.17 + protected static final Logger log = 25.18 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN, 25.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings"); 25.20
26.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java Thu Apr 30 15:04:33 2009 -0700 26.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java Mon May 04 22:14:18 2009 -0700 26.3 @@ -23,7 +23,7 @@ 26.4 * have any questions. 26.5 */ 26.6 /* 26.7 - * $Id: Message1_1Impl.java,v 1.24 2006/01/27 12:49:41 vj135062 Exp $ 26.8 + * 26.9 */ 26.10 26.11 26.12 @@ -48,7 +48,7 @@ 26.13 26.14 public class Message1_1Impl extends MessageImpl implements SOAPConstants { 26.15 26.16 - protected static Logger log = 26.17 + protected static final Logger log = 26.18 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN, 26.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings"); 26.20
27.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java Thu Apr 30 15:04:33 2009 -0700 27.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java Mon May 04 22:14:18 2009 -0700 27.3 @@ -23,7 +23,7 @@ 27.4 * have any questions. 27.5 */ 27.6 /* 27.7 - * $Id: SOAPPart1_1Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $ 27.8 + * 27.9 */ 27.10 27.11 27.12 @@ -48,7 +48,7 @@ 27.13 27.14 public class SOAPPart1_1Impl extends SOAPPartImpl implements SOAPConstants { 27.15 27.16 - protected static Logger log = 27.17 + protected static final Logger log = 27.18 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN, 27.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings"); 27.20
28.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 28.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java Mon May 04 22:14:18 2009 -0700 28.3 @@ -23,7 +23,7 @@ 28.4 * have any questions. 28.5 */ 28.6 /* 28.7 - * $Id: Body1_2Impl.java,v 1.32 2006/01/27 12:49:44 vj135062 Exp $ 28.8 + * 28.9 */ 28.10 28.11 28.12 @@ -50,7 +50,7 @@ 28.13 28.14 public class Body1_2Impl extends BodyImpl { 28.15 28.16 - protected static Logger log = 28.17 + protected static final Logger log = 28.18 Logger.getLogger(Body1_2Impl.class.getName(), 28.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); 28.20
29.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 29.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java Mon May 04 22:14:18 2009 -0700 29.3 @@ -23,7 +23,7 @@ 29.4 * have any questions. 29.5 */ 29.6 /* 29.7 - * $Id: Detail1_2Impl.java,v 1.24 2006/01/27 12:49:45 vj135062 Exp $ 29.8 + * 29.9 */ 29.10 29.11 29.12 @@ -47,7 +47,7 @@ 29.13 29.14 public class Detail1_2Impl extends DetailImpl { 29.15 29.16 - protected static Logger log = 29.17 + protected static final Logger log = 29.18 Logger.getLogger(Detail1_2Impl.class.getName(), 29.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); 29.20
30.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 30.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java Mon May 04 22:14:18 2009 -0700 30.3 @@ -23,7 +23,7 @@ 30.4 * have any questions. 30.5 */ 30.6 /* 30.7 - * $Id: Envelope1_2Impl.java,v 1.26 2006/01/27 12:49:47 vj135062 Exp $ 30.8 + * 30.9 */ 30.10 30.11 30.12 @@ -47,7 +47,7 @@ 30.13 30.14 public class Envelope1_2Impl extends EnvelopeImpl { 30.15 30.16 - protected static Logger log = 30.17 + protected static final Logger log = 30.18 Logger.getLogger(Envelope1_2Impl.class.getName(), 30.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); 30.20
31.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 31.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java Mon May 04 22:14:18 2009 -0700 31.3 @@ -23,7 +23,7 @@ 31.4 * have any questions. 31.5 */ 31.6 /* 31.7 - * $Id: Fault1_2Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $ 31.8 + * 31.9 */ 31.10 31.11 31.12 @@ -51,7 +51,7 @@ 31.13 31.14 public class Fault1_2Impl extends FaultImpl { 31.15 31.16 - protected static Logger log = 31.17 + protected static final Logger log = 31.18 Logger.getLogger( 31.19 LogDomainConstants.SOAP_VER1_2_DOMAIN, 31.20 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
32.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 32.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java Mon May 04 22:14:18 2009 -0700 32.3 @@ -23,7 +23,7 @@ 32.4 * have any questions. 32.5 */ 32.6 /* 32.7 - * $Id: Header1_2Impl.java,v 1.36 2006/01/27 12:49:48 vj135062 Exp $ 32.8 + * 32.9 */ 32.10 32.11 32.12 @@ -53,7 +53,7 @@ 32.13 32.14 public class Header1_2Impl extends HeaderImpl { 32.15 32.16 - protected static Logger log = 32.17 + protected static final Logger log = 32.18 Logger.getLogger( 32.19 LogDomainConstants.SOAP_VER1_2_DOMAIN, 32.20 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
33.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 33.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java Mon May 04 22:14:18 2009 -0700 33.3 @@ -23,7 +23,7 @@ 33.4 * have any questions. 33.5 */ 33.6 /* 33.7 - * $Id: HeaderElement1_2Impl.java,v 1.29 2006/01/27 12:49:48 vj135062 Exp $ 33.8 + * 33.9 */ 33.10 33.11 33.12 @@ -47,7 +47,7 @@ 33.13 33.14 public class HeaderElement1_2Impl extends HeaderElementImpl { 33.15 33.16 - private static Logger log = 33.17 + private static final Logger log = 33.18 Logger.getLogger(HeaderElement1_2Impl.class.getName(), 33.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); 33.20
34.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java Thu Apr 30 15:04:33 2009 -0700 34.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java Mon May 04 22:14:18 2009 -0700 34.3 @@ -23,7 +23,7 @@ 34.4 * have any questions. 34.5 */ 34.6 /* 34.7 - * $Id: SOAPPart1_2Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $ 34.8 + * 34.9 */ 34.10 34.11 34.12 @@ -47,7 +47,7 @@ 34.13 34.14 public class SOAPPart1_2Impl extends SOAPPartImpl implements SOAPConstants{ 34.15 34.16 - protected static Logger log = 34.17 + protected static final Logger log = 34.18 Logger.getLogger(SOAPPart1_2Impl.class.getName(), 34.19 "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings"); 34.20
35.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java Thu Apr 30 15:04:33 2009 -0700 35.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java Mon May 04 22:14:18 2009 -0700 35.3 @@ -45,12 +45,12 @@ 35.4 * because they are not legal in SOAP. If the user of this class sets a 35.5 * LexicalHandler, then it forwards events to that handler. 35.6 * 35.7 - * $Id: RejectDoctypeSaxFilter.java,v 1.13 2006/01/27 12:49:52 vj135062 Exp $ 35.8 + * 35.9 * @author Edwin Goei 35.10 */ 35.11 35.12 public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, LexicalHandler{ 35.13 - protected static Logger log = 35.14 + protected static final Logger log = 35.15 Logger.getLogger(LogDomainConstants.UTIL_DOMAIN, 35.16 "com.sun.xml.internal.messaging.saaj.util.LocalStrings"); 35.17
36.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java Thu Apr 30 15:04:33 2009 -0700 36.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java Mon May 04 22:14:18 2009 -0700 36.3 @@ -62,20 +62,22 @@ 36.4 public class EfficientStreamingTransformer 36.5 extends javax.xml.transform.Transformer { 36.6 36.7 - static final String version; 36.8 - static final String vendor; 36.9 + //static final String version; 36.10 + //static final String vendor; 36.11 36.12 - protected static TransformerFactory transformerFactory = TransformerFactory.newInstance(); 36.13 + protected static final TransformerFactory transformerFactory = TransformerFactory.newInstance(); 36.14 36.15 - static { 36.16 - version = System.getProperty("java.vm.version"); 36.17 - vendor = System.getProperty("java.vm.vendor"); 36.18 - if (vendor.startsWith("Sun") && 36.19 - (version.startsWith("1.4") || version.startsWith("1.3"))) { 36.20 - transformerFactory = 36.21 - new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl(); 36.22 - } 36.23 - } 36.24 + //removing support for Java 1.4 and 1.3 : CR6658158 36.25 + /*static { 36.26 + version = System.getProperty("java.vm.version"); 36.27 + vendor = System.getProperty("java.vm.vendor"); 36.28 + if (vendor.startsWith("Sun") && 36.29 + (version.startsWith("1.4") || version.startsWith("1.3"))) { 36.30 + transformerFactory = 36.31 + new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl(); 36.32 + } 36.33 +} 36.34 +*/ 36.35 36.36 /** 36.37 * TransformerFactory instance.
37.1 --- a/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java Thu Apr 30 15:04:33 2009 -0700 37.2 +++ b/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java Mon May 04 22:14:18 2009 -0700 37.3 @@ -25,6 +25,9 @@ 37.4 37.5 package com.sun.xml.internal.txw2; 37.6 37.7 +import java.util.AbstractList; 37.8 +import java.util.Collections; 37.9 +import java.util.List; 37.10 import javax.xml.namespace.QName; 37.11 37.12 /** 37.13 @@ -53,50 +56,60 @@ 37.14 */ 37.15 void print(DT dt, NamespaceResolver resolver, StringBuilder buf); 37.16 37.17 + static final List<DatatypeWriter<?>> BUILTIN = Collections.unmodifiableList(new AbstractList() { 37.18 37.19 - static final DatatypeWriter<?>[] BUILDIN = new DatatypeWriter<?>[] { 37.20 - new DatatypeWriter<String>() { 37.21 - public Class<String> getType() { 37.22 - return String.class; 37.23 + private DatatypeWriter<?>[] BUILTIN_ARRAY = new DatatypeWriter<?>[] { 37.24 + new DatatypeWriter<String>() { 37.25 + public Class<String> getType() { 37.26 + return String.class; 37.27 + } 37.28 + public void print(String s, NamespaceResolver resolver, StringBuilder buf) { 37.29 + buf.append(s); 37.30 + } 37.31 + }, 37.32 + new DatatypeWriter<Integer>() { 37.33 + public Class<Integer> getType() { 37.34 + return Integer.class; 37.35 + } 37.36 + public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) { 37.37 + buf.append(i); 37.38 + } 37.39 + }, 37.40 + new DatatypeWriter<Float>() { 37.41 + public Class<Float> getType() { 37.42 + return Float.class; 37.43 + } 37.44 + public void print(Float f, NamespaceResolver resolver, StringBuilder buf) { 37.45 + buf.append(f); 37.46 + } 37.47 + }, 37.48 + new DatatypeWriter<Double>() { 37.49 + public Class<Double> getType() { 37.50 + return Double.class; 37.51 + } 37.52 + public void print(Double d, NamespaceResolver resolver, StringBuilder buf) { 37.53 + buf.append(d); 37.54 + } 37.55 + }, 37.56 + new DatatypeWriter<QName>() { 37.57 + public Class<QName> getType() { 37.58 + return QName.class; 37.59 + } 37.60 + public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) { 37.61 + String p = resolver.getPrefix(qn.getNamespaceURI()); 37.62 + if(p.length()!=0) 37.63 + buf.append(p).append(':'); 37.64 + buf.append(qn.getLocalPart()); 37.65 + } 37.66 } 37.67 - public void print(String s, NamespaceResolver resolver, StringBuilder buf) { 37.68 - buf.append(s); 37.69 - } 37.70 - }, 37.71 - new DatatypeWriter<Integer>() { 37.72 - public Class<Integer> getType() { 37.73 - return Integer.class; 37.74 - } 37.75 - public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) { 37.76 - buf.append(i); 37.77 - } 37.78 - }, 37.79 - new DatatypeWriter<Float>() { 37.80 - public Class<Float> getType() { 37.81 - return Float.class; 37.82 - } 37.83 - public void print(Float f, NamespaceResolver resolver, StringBuilder buf) { 37.84 - buf.append(f); 37.85 - } 37.86 - }, 37.87 - new DatatypeWriter<Double>() { 37.88 - public Class<Double> getType() { 37.89 - return Double.class; 37.90 - } 37.91 - public void print(Double d, NamespaceResolver resolver, StringBuilder buf) { 37.92 - buf.append(d); 37.93 - } 37.94 - }, 37.95 - new DatatypeWriter<QName>() { 37.96 - public Class<QName> getType() { 37.97 - return QName.class; 37.98 - } 37.99 - public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) { 37.100 - String p = resolver.getPrefix(qn.getNamespaceURI()); 37.101 - if(p.length()!=0) 37.102 - buf.append(p).append(':'); 37.103 - buf.append(qn.getLocalPart()); 37.104 - } 37.105 + }; 37.106 + 37.107 + public DatatypeWriter<?> get(int n) { 37.108 + return BUILTIN_ARRAY[n]; 37.109 } 37.110 - }; 37.111 + 37.112 + public int size() { 37.113 + return BUILTIN_ARRAY.length; 37.114 + } 37.115 + }); 37.116 }
38.1 --- a/src/share/classes/com/sun/xml/internal/txw2/Document.java Thu Apr 30 15:04:33 2009 -0700 38.2 +++ b/src/share/classes/com/sun/xml/internal/txw2/Document.java Mon May 04 22:14:18 2009 -0700 38.3 @@ -76,7 +76,7 @@ 38.4 38.5 Document(XmlSerializer out) { 38.6 this.out = out; 38.7 - for( DatatypeWriter dw : DatatypeWriter.BUILDIN ) 38.8 + for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) 38.9 datatypeWriters.put(dw.getType(),dw); 38.10 } 38.11