From 95f53ce57bb36019087a774f46bfeadc843d4d68 Mon Sep 17 00:00:00 2001 From: Abhijit Saha Date: Mon, 22 Jun 2009 13:56:30 -0700 Subject: [PATCH 01/51] 6845701: Xerces2 Java XML library infinite loop with malformed XML input Reviewed-by: hawtin --- .../com/sun/org/apache/xerces/internal/impl/XMLScanner.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java index e7071fde4f1..513dec48f04 100644 --- a/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java +++ b/jaxp/src/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java @@ -1027,6 +1027,9 @@ public abstract class XMLScanner int c = fEntityScanner.peekChar(); if (XMLChar.isMarkup(c) || c == ']') { fStringBuffer.append((char)fEntityScanner.scanChar()); + } else if (c != -1 && isInvalidLiteral(c)) { + reportFatalError("InvalidCharInSystemID", + new Object[] {Integer.toString(c, 16)}); } } while (fEntityScanner.scanLiteral(quote, ident) != quote); fStringBuffer.append(ident); From 2655dbfaac691060df7b4a05f2e1ffbc52cd70ab Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 28 Jul 2009 10:36:25 -0700 Subject: [PATCH 02/51] 6855990: javap InstructionDetailWriter should support new 308 annotations attribute Reviewed-by: mcimadamore --- .../tools/classfile/ExtendedAnnotation.java | 6 - .../com/sun/tools/javap/AnnotationWriter.java | 220 ++++++++++++++++-- .../com/sun/tools/javap/CodeWriter.java | 7 + .../tools/javap/InstructionDetailWriter.java | 3 +- .../sun/tools/javap/TypeAnnotationWriter.java | 126 ++++++++++ .../tools/javap/typeAnnotations/T6855990.java | 51 ++++ 6 files changed, 384 insertions(+), 29 deletions(-) create mode 100644 langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java create mode 100644 langtools/test/tools/javap/typeAnnotations/T6855990.java diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java index 85e49d6c926..bb7b017dfc2 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java @@ -260,9 +260,6 @@ public class ExtendedAnnotation { // For generic/array types. public List location = new ArrayList(); - // Tree position. - public int pos = -1; - // For typecasts, type tests, new (and locals, as start_pc). public int offset = -1; @@ -391,9 +388,6 @@ public class ExtendedAnnotation { sb.append(")"); } - sb.append(", pos = "); - sb.append(pos); - sb.append(']'); return sb.toString(); } diff --git a/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java b/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java index 1424255df5a..029026c47f5 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java @@ -32,6 +32,10 @@ import com.sun.tools.classfile.Annotation.Array_element_value; import com.sun.tools.classfile.Annotation.Class_element_value; import com.sun.tools.classfile.Annotation.Enum_element_value; import com.sun.tools.classfile.Annotation.Primitive_element_value; +import com.sun.tools.classfile.ConstantPool; +import com.sun.tools.classfile.ConstantPoolException; +import com.sun.tools.classfile.Descriptor; +import com.sun.tools.classfile.Descriptor.InvalidDescriptor; /** * A writer for writing annotations as text. @@ -51,71 +55,243 @@ public class AnnotationWriter extends BasicWriter { protected AnnotationWriter(Context context) { super(context); + classWriter = ClassWriter.instance(context); + constantWriter = ConstantWriter.instance(context); } public void write(Annotation annot) { - print("#" + annot.type_index + "("); + write(annot, false); + } + + public void write(Annotation annot, boolean resolveIndices) { + writeDescriptor(annot.type_index, resolveIndices); + boolean showParens = annot.num_element_value_pairs > 0 || !resolveIndices; + if (showParens) + print("("); for (int i = 0; i < annot.num_element_value_pairs; i++) { if (i > 0) print(","); - write(annot.element_value_pairs[i]); + write(annot.element_value_pairs[i], resolveIndices); } - print(")"); + if (showParens) + print(")"); } public void write(ExtendedAnnotation annot) { - write(annot.annotation); - print('@'); - print(annot.position.toString()); + write(annot, true, false); + } + + public void write(ExtendedAnnotation annot, boolean showOffsets, boolean resolveIndices) { + write(annot.annotation, resolveIndices); + print(": "); + write(annot.position, showOffsets); + } + + public void write(ExtendedAnnotation.Position pos, boolean showOffsets) { + print(pos.type); + + switch (pos.type) { + // type case + case TYPECAST: + case TYPECAST_GENERIC_OR_ARRAY: + // object creation + case INSTANCEOF: + case INSTANCEOF_GENERIC_OR_ARRAY: + // new expression + case NEW: + case NEW_GENERIC_OR_ARRAY: + case NEW_TYPE_ARGUMENT: + case NEW_TYPE_ARGUMENT_GENERIC_OR_ARRAY: + if (showOffsets) { + print(", offset="); + print(pos.offset); + } + break; + // local variable + case LOCAL_VARIABLE: + case LOCAL_VARIABLE_GENERIC_OR_ARRAY: + print(", {"); + for (int i = 0; i < pos.lvarOffset.length; ++i) { + if (i != 0) print("; "); + if (showOffsets) { + print(", start_pc="); + print(pos.lvarOffset[i]); + } + print(", length="); + print(pos.lvarLength[i]); + print(", index="); + print(pos.lvarIndex[i]); + } + print("}"); + break; + // method receiver + case METHOD_RECEIVER: + // Do nothing + break; + // type parameters + case CLASS_TYPE_PARAMETER: + case METHOD_TYPE_PARAMETER: + print(", param_index="); + print(pos.parameter_index); + break; + // type parameters bound + case CLASS_TYPE_PARAMETER_BOUND: + case CLASS_TYPE_PARAMETER_BOUND_GENERIC_OR_ARRAY: + case METHOD_TYPE_PARAMETER_BOUND: + case METHOD_TYPE_PARAMETER_BOUND_GENERIC_OR_ARRAY: + print(", param_index="); + print(pos.parameter_index); + print(", bound_index="); + print(pos.bound_index); + break; + // wildcard + case WILDCARD_BOUND: + case WILDCARD_BOUND_GENERIC_OR_ARRAY: + print(", wild_card="); + print(pos.wildcard_position); + break; + // Class extends and implements clauses + case CLASS_EXTENDS: + case CLASS_EXTENDS_GENERIC_OR_ARRAY: + print(", type_index="); + print(pos.type_index); + break; + // throws + case THROWS: + print(", type_index="); + print(pos.type_index); + break; + case CLASS_LITERAL: + if (showOffsets) { + print(", offset="); + print(pos.offset); + } + break; + // method parameter: not specified + case METHOD_PARAMETER_GENERIC_OR_ARRAY: + print(", param_index="); + print(pos.parameter_index); + break; + // method type argument: wasn't specified + case METHOD_TYPE_ARGUMENT: + case METHOD_TYPE_ARGUMENT_GENERIC_OR_ARRAY: + if (showOffsets) { + print(", offset="); + print(pos.offset); + } + print(", type_index="); + print(pos.type_index); + break; + // We don't need to worry abut these + case METHOD_RETURN_GENERIC_OR_ARRAY: + case FIELD_GENERIC_OR_ARRAY: + break; + case UNKNOWN: + break; + default: + throw new AssertionError("unknown type: " + pos.type); + } + + // Append location data for generics/arrays. + if (pos.type.hasLocation()) { + print(", location="); + print(pos.location); + } } public void write(Annotation.element_value_pair pair) { - print("#" + pair.element_name_index + ":"); - write(pair.value); + write(pair, false); + } + + public void write(Annotation.element_value_pair pair, boolean resolveIndices) { + writeIndex(pair.element_name_index, resolveIndices); + print("="); + write(pair.value, resolveIndices); } public void write(Annotation.element_value value) { - ev_writer.write(value); + write(value, false); + } + + public void write(Annotation.element_value value, boolean resolveIndices) { + ev_writer.write(value, resolveIndices); + } + + private void writeDescriptor(int index, boolean resolveIndices) { + if (resolveIndices) { + try { + ConstantPool constant_pool = classWriter.getClassFile().constant_pool; + Descriptor d = new Descriptor(index); + print(d.getFieldType(constant_pool)); + return; + } catch (ConstantPoolException ignore) { + } catch (InvalidDescriptor ignore) { + } + } + + print("#" + index); + } + + private void writeIndex(int index, boolean resolveIndices) { + if (resolveIndices) { + print(constantWriter.stringValue(index)); + } else + print("#" + index); } element_value_Writer ev_writer = new element_value_Writer(); - class element_value_Writer implements Annotation.element_value.Visitor { - public void write(Annotation.element_value value) { - value.accept(this, null); + class element_value_Writer implements Annotation.element_value.Visitor { + public void write(Annotation.element_value value, boolean resolveIndices) { + value.accept(this, resolveIndices); } - public Void visitPrimitive(Primitive_element_value ev, Void p) { - print(((char) ev.tag) + "#" + ev.const_value_index); + public Void visitPrimitive(Primitive_element_value ev, Boolean resolveIndices) { + if (resolveIndices) + writeIndex(ev.const_value_index, resolveIndices); + else + print(((char) ev.tag) + "#" + ev.const_value_index); return null; } - public Void visitEnum(Enum_element_value ev, Void p) { - print(((char) ev.tag) + "#" + ev.type_name_index + ".#" + ev.const_name_index); + public Void visitEnum(Enum_element_value ev, Boolean resolveIndices) { + if (resolveIndices) { + writeIndex(ev.type_name_index, resolveIndices); + print("."); + writeIndex(ev.const_name_index, resolveIndices); + } else + print(((char) ev.tag) + "#" + ev.type_name_index + ".#" + ev.const_name_index); return null; } - public Void visitClass(Class_element_value ev, Void p) { - print(((char) ev.tag) + "#" + ev.class_info_index); + public Void visitClass(Class_element_value ev, Boolean resolveIndices) { + if (resolveIndices) { + writeIndex(ev.class_info_index, resolveIndices); + print(".class"); + } else + print(((char) ev.tag) + "#" + ev.class_info_index); return null; } - public Void visitAnnotation(Annotation_element_value ev, Void p) { + public Void visitAnnotation(Annotation_element_value ev, Boolean resolveIndices) { print((char) ev.tag); - AnnotationWriter.this.write(ev.annotation_value); + AnnotationWriter.this.write(ev.annotation_value, resolveIndices); return null; } - public Void visitArray(Array_element_value ev, Void p) { + public Void visitArray(Array_element_value ev, Boolean resolveIndices) { print("["); for (int i = 0; i < ev.num_values; i++) { if (i > 0) print(","); - write(ev.values[i]); + write(ev.values[i], resolveIndices); } print("]"); return null; } } + + private ClassWriter classWriter; + private ConstantWriter constantWriter; } diff --git a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java index 631e1685acc..975e3621536 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java @@ -64,6 +64,7 @@ class CodeWriter extends BasicWriter { stackMapWriter = StackMapWriter.instance(context); localVariableTableWriter = LocalVariableTableWriter.instance(context); localVariableTypeTableWriter = LocalVariableTypeTableWriter.instance(context); + typeAnnotationWriter = TypeAnnotationWriter.instance(context); options = Options.instance(context); } @@ -253,6 +254,11 @@ class CodeWriter extends BasicWriter { detailWriters.add(tryBlockWriter); } + if (options.details.contains(InstructionDetailWriter.Kind.TYPE_ANNOS)) { + typeAnnotationWriter.reset(attr); + detailWriters.add(typeAnnotationWriter); + } + return detailWriters; } @@ -261,6 +267,7 @@ class CodeWriter extends BasicWriter { private ConstantWriter constantWriter; private LocalVariableTableWriter localVariableTableWriter; private LocalVariableTypeTableWriter localVariableTypeTableWriter; + private TypeAnnotationWriter typeAnnotationWriter; private SourceWriter sourceWriter; private StackMapWriter stackMapWriter; private TryBlockWriter tryBlockWriter; diff --git a/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java index 81b31755865..02492b1ee6e 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java @@ -42,7 +42,8 @@ public abstract class InstructionDetailWriter extends BasicWriter { LOCAL_VAR_TYPES("localVariableTypes"), SOURCE("source"), STACKMAPS("stackMaps"), - TRY_BLOCKS("tryBlocks"); + TRY_BLOCKS("tryBlocks"), + TYPE_ANNOS("typeAnnotations"); Kind(String option) { this.option = option; } diff --git a/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java b/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java new file mode 100644 index 00000000000..3e7aef8bf35 --- /dev/null +++ b/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java @@ -0,0 +1,126 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.tools.javap; + +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.Code_attribute; +import com.sun.tools.classfile.ExtendedAnnotation; +import com.sun.tools.classfile.ExtendedAnnotation.Position; +import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.Method; +import com.sun.tools.classfile.RuntimeInvisibleTypeAnnotations_attribute; +import com.sun.tools.classfile.RuntimeTypeAnnotations_attribute; +import com.sun.tools.classfile.RuntimeVisibleTypeAnnotations_attribute; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Annotate instructions with details about type annotations. + * + *

This is NOT part of any API supported by Sun Microsystems. If + * you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + */ +public class TypeAnnotationWriter extends InstructionDetailWriter { + public enum NoteKind { VISIBLE, INVISIBLE }; + public static class Note { + Note(NoteKind kind, ExtendedAnnotation anno) { + this.kind = kind; + this.anno = anno; + } + public final NoteKind kind; + public final ExtendedAnnotation anno; + } + + static TypeAnnotationWriter instance(Context context) { + TypeAnnotationWriter instance = context.get(TypeAnnotationWriter.class); + if (instance == null) + instance = new TypeAnnotationWriter(context); + return instance; + } + + protected TypeAnnotationWriter(Context context) { + super(context); + context.put(TypeAnnotationWriter.class, this); + annotationWriter = AnnotationWriter.instance(context); + classWriter = ClassWriter.instance(context); + } + + public void reset(Code_attribute attr) { + Method m = classWriter.getMethod(); + pcMap = new HashMap>(); + check(NoteKind.VISIBLE, (RuntimeVisibleTypeAnnotations_attribute) m.attributes.get(Attribute.RuntimeVisibleTypeAnnotations)); + check(NoteKind.INVISIBLE, (RuntimeInvisibleTypeAnnotations_attribute) m.attributes.get(Attribute.RuntimeInvisibleTypeAnnotations)); + } + + private void check(NoteKind kind, RuntimeTypeAnnotations_attribute attr) { + if (attr == null) + return; + + for (ExtendedAnnotation anno: attr.annotations) { + Position p = anno.position; + Note note = null; + if (p.offset != -1) + addNote(p.offset, note = new Note(kind, anno)); + if (p.lvarOffset != null) { + for (int i = 0; i < p.lvarOffset.length; i++) { + if (note == null) + note = new Note(kind, anno); + addNote(p.lvarOffset[i], note); + } + } + } + } + + private void addNote(int pc, Note note) { + List list = pcMap.get(pc); + if (list == null) + pcMap.put(pc, list = new ArrayList()); + list.add(note); + } + + @Override + void writeDetails(Instruction instr) { + String indent = space(2); // get from Options? + int pc = instr.getPC(); + List notes = pcMap.get(pc); + if (notes != null) { + for (Note n: notes) { + print(indent); + print("@"); + annotationWriter.write(n.anno, false, true); + print(", "); + println(n.kind.toString().toLowerCase()); + } + } + } + + private AnnotationWriter annotationWriter; + private ClassWriter classWriter; + private Map> pcMap; +} diff --git a/langtools/test/tools/javap/typeAnnotations/T6855990.java b/langtools/test/tools/javap/typeAnnotations/T6855990.java new file mode 100644 index 00000000000..f5baa3dc6f0 --- /dev/null +++ b/langtools/test/tools/javap/typeAnnotations/T6855990.java @@ -0,0 +1,51 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; + +/* + * @test + * @bug 6855990 + * @summary InstructionDetailWriter should support new 308 annotations attribute + */ + +public class T6855990 { + public static void main(String[] args) throws Exception { + new T6855990().run(); + } + + public void run() throws Exception { + @Simple String[] args = { "-c", "-XDdetails:typeAnnotations", "T6855990" }; + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + int rc = com.sun.tools.javap.Main.run(args, pw); + pw.close(); + String out = sw.toString(); + System.out.println(out); + if (out.indexOf("@Simple: LOCAL_VARIABLE") == -1) + throw new Exception("expected output not found"); + } +} + +@interface Simple { } + From 66637352acdec40561df47c94bef2883136a1380 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 28 Jul 2009 11:00:05 -0700 Subject: [PATCH 03/51] 6734068: Some variable length attributes set their size incorrectly Reviewed-by: mcimadamore --- .../com/sun/tools/classfile/CharacterRangeTable_attribute.java | 2 +- .../com/sun/tools/classfile/LineNumberTable_attribute.java | 2 +- .../com/sun/tools/classfile/LocalVariableTable_attribute.java | 2 +- .../sun/tools/classfile/LocalVariableTypeTable_attribute.java | 2 +- .../com/sun/tools/classfile/ModuleExportTable_attribute.java | 2 +- .../com/sun/tools/classfile/ModuleMemberTable_attribute.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java index 8a668660cc5..1ecfd82e575 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java @@ -58,7 +58,7 @@ public class CharacterRangeTable_attribute extends Attribute { } public CharacterRangeTable_attribute(int name_index, Entry[] character_range_table) { - super(name_index, character_range_table.length * Entry.length()); + super(name_index, 2 + character_range_table.length * Entry.length()); this.character_range_table = character_range_table; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java index 999e89ac507..a26d9c7f86d 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java @@ -50,7 +50,7 @@ public class LineNumberTable_attribute extends Attribute { } public LineNumberTable_attribute(int name_index, Entry[] line_number_table) { - super(name_index, line_number_table.length * Entry.length()); + super(name_index, 2 + line_number_table.length * Entry.length()); this.line_number_table_length = line_number_table.length; this.line_number_table = line_number_table; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java index 0975132c373..c33edfbfd5f 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java @@ -50,7 +50,7 @@ public class LocalVariableTable_attribute extends Attribute { } public LocalVariableTable_attribute(int name_index, Entry[] local_variable_table) { - super(name_index, local_variable_table.length * Entry.length()); + super(name_index, 2 + local_variable_table.length * Entry.length()); this.local_variable_table_length = local_variable_table.length; this.local_variable_table = local_variable_table; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java index 0cf4588411a..d98d5b5c02f 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java @@ -50,7 +50,7 @@ public class LocalVariableTypeTable_attribute extends Attribute { } public LocalVariableTypeTable_attribute(int name_index, Entry[] local_variable_table) { - super(name_index, local_variable_table.length * Entry.length()); + super(name_index, 2 + local_variable_table.length * Entry.length()); this.local_variable_table_length = local_variable_table.length; this.local_variable_table = local_variable_table; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java index 5bb0679f117..74cc3b395c6 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java @@ -50,7 +50,7 @@ public class ModuleExportTable_attribute extends Attribute { } public ModuleExportTable_attribute(int name_index, int[] export_type_table) { - super(name_index, 2 * export_type_table.length); + super(name_index, 2 + 2 * export_type_table.length); this.export_type_table = export_type_table; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java index eb679cc9ed4..c5eaf78eff5 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java @@ -49,7 +49,7 @@ public class ModuleMemberTable_attribute extends Attribute { } public ModuleMemberTable_attribute(int name_index, int[] package_member_table) { - super(name_index, 2 * package_member_table.length); + super(name_index, 2 + 2 * package_member_table.length); this.package_member_table = package_member_table; } From 54b80cfe2a0d5ae8c6e6d1a010faf7ebbf99f764 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 29 Jul 2009 13:26:26 -0700 Subject: [PATCH 04/51] 4777949: Javap Rewrite : Warn javap usage on package classes with simple name Reviewed-by: mcimadamore --- .../com/sun/tools/javap/JavapFileManager.java | 4 +- .../com/sun/tools/javap/JavapTask.java | 75 ++++++++---- .../tools/javap/resources/javap.properties | 9 ++ langtools/test/tools/javap/T4777949.java | 111 ++++++++++++++++++ 4 files changed, 174 insertions(+), 25 deletions(-) create mode 100644 langtools/test/tools/javap/T4777949.java diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java index 85c40921e85..80625b9570b 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java @@ -41,13 +41,13 @@ import com.sun.tools.javac.util.Context; * This code and its internal interfaces are subject to change or * deletion without notice. */ -class JavapFileManager extends JavacFileManager { +public class JavapFileManager extends JavacFileManager { private JavapFileManager(Context context, Charset charset) { super(context, true, charset); setIgnoreSymbolFile(true); } - static JavapFileManager create(final DiagnosticListener dl, PrintWriter log, Options options) { + public static JavapFileManager create(final DiagnosticListener dl, PrintWriter log) { Context javac_context = new Context(); if (dl != null) diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java index 285f1b48347..faf526419b7 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java @@ -316,17 +316,17 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { Iterable classes) { this(out, fileManager, diagnosticListener); - try { - handleOptions(options, false); - } catch (BadArgs e) { - throw new IllegalArgumentException(e.getMessage()); - } - this.classes = new ArrayList(); for (String classname: classes) { classname.getClass(); // null-check this.classes.add(classname); } + + try { + handleOptions(options, false); + } catch (BadArgs e) { + throw new IllegalArgumentException(e.getMessage()); + } } public void setLocale(Locale locale) { @@ -372,10 +372,18 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { final PrintWriter pw = getPrintWriterForWriter(w); return new DiagnosticListener () { public void report(Diagnostic diagnostic) { - if (diagnostic.getKind() == Diagnostic.Kind.ERROR) { + switch (diagnostic.getKind()) { + case ERROR: pw.print(getMessage("err.prefix")); - pw.print(" "); + break; + case WARNING: + pw.print(getMessage("warn.prefix")); + break; + case NOTE: + pw.print(getMessage("note.prefix")); + break; } + pw.print(" "); pw.println(diagnostic.getMessage(null)); } }; @@ -405,7 +413,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { boolean ok = run(); return ok ? EXIT_OK : EXIT_ERROR; } catch (BadArgs e) { - diagnosticListener.report(createDiagnostic(e.key, e.args)); + reportError(e.key, e.args); if (e.showUsage) { log.println(getMessage("main.usage.summary", progname)); } @@ -419,7 +427,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { e_args[0] = e.getCause(); System.arraycopy(e.args, 0, e_args, 1, e.args.length); } - diagnosticListener.report(createDiagnostic("err.internal.error", e_args)); + reportError("err.internal.error", e_args); return EXIT_ABNORMAL; } finally { log.flush(); @@ -531,7 +539,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; fo = sfm.getJavaFileObjects(className).iterator().next(); } else { - diagnosticListener.report(createDiagnostic("err.not.standard.file.manager", className)); + reportError("err.not.standard.file.manager", className); ok = false; continue; } @@ -547,38 +555,42 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { } } if (fo == null) { - diagnosticListener.report(createDiagnostic("err.class.not.found", className)); + reportError("err.class.not.found", className); ok = false; continue; } } attributeFactory.setCompat(options.compat); attributeFactory.setJSR277(options.jsr277); - - write(read(fo)); - + ClassFileInfo cfInfo = read(fo); + if (!className.endsWith(".class")) { + String cfName = cfInfo.cf.getName(); + if (!cfName.replaceAll("[/$]", ".").equals(className.replaceAll("[/$]", "."))) + reportWarning("warn.unexpected.class", className, cfName.replace('/', '.')); + } + write(cfInfo); } catch (ConstantPoolException e) { - diagnosticListener.report(createDiagnostic("err.bad.constant.pool", className, e.getLocalizedMessage())); + reportError("err.bad.constant.pool", className, e.getLocalizedMessage()); ok = false; } catch (EOFException e) { - diagnosticListener.report(createDiagnostic("err.end.of.file", className)); + reportError("err.end.of.file", className); ok = false; } catch (FileNotFoundException e) { - diagnosticListener.report(createDiagnostic("err.file.not.found", e.getLocalizedMessage())); + reportError("err.file.not.found", e.getLocalizedMessage()); ok = false; } catch (IOException e) { //e.printStackTrace(); Object msg = e.getLocalizedMessage(); if (msg == null) msg = e; - diagnosticListener.report(createDiagnostic("err.ioerror", className, msg)); + reportError("err.ioerror", className, msg); ok = false; } catch (Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); pw.close(); - diagnosticListener.report(createDiagnostic("err.crash", t.toString(), sw.toString())); + reportError("err.crash", t.toString(), sw.toString()); ok = false; } } @@ -684,7 +696,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { } private JavaFileManager getDefaultFileManager(final DiagnosticListener dl, PrintWriter log) { - return JavapFileManager.create(dl, log, options); + return JavapFileManager.create(dl, log); } private JavaFileObject getClassFileObject(String className) throws IOException { @@ -738,10 +750,23 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { } } - private Diagnostic createDiagnostic(final String key, final Object... args) { + private void reportError(String key, Object... args) { + diagnosticListener.report(createDiagnostic(Diagnostic.Kind.ERROR, key, args)); + } + + private void reportNote(String key, Object... args) { + diagnosticListener.report(createDiagnostic(Diagnostic.Kind.NOTE, key, args)); + } + + private void reportWarning(String key, Object... args) { + diagnosticListener.report(createDiagnostic(Diagnostic.Kind.WARNING, key, args)); + } + + private Diagnostic createDiagnostic( + final Diagnostic.Kind kind, final String key, final Object... args) { return new Diagnostic() { public Kind getKind() { - return Diagnostic.Kind.ERROR; + return kind; } public JavaFileObject getSource() { @@ -776,6 +801,10 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { return JavapTask.this.getMessage(locale, key, args); } + public String toString() { + return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]"; + } + }; } diff --git a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties index 06d00b7f3dc..87b9a332886 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties +++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties @@ -24,6 +24,15 @@ main.usage.summary=\ Usage: {0} \n\ use -help for a list of possible options +warn.prefix=Warning: +warn.unexpected.class=Binary file {0} contains {1} + +note.prefix=Note: + +main.usage.summary=\ +Usage: {0} \n\ +use -help for a list of possible options + main.usage=\ Usage: {0} \n\ where possible options include: diff --git a/langtools/test/tools/javap/T4777949.java b/langtools/test/tools/javap/T4777949.java new file mode 100644 index 00000000000..612b1d23806 --- /dev/null +++ b/langtools/test/tools/javap/T4777949.java @@ -0,0 +1,111 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; +import java.util.*; +import javax.tools.*; +import com.sun.tools.javap.*; + +/* + * @test + * @bug 4777949 + * @summary Warn javap usage on package with simple name + */ +public class T4777949 { + public static void main(String... args) throws Exception { + new T4777949().run(); + } + + void run() throws Exception { + File javaFile = writeTestFile(); + File classFile = compileTestFile(javaFile); + + test(".", "p.q.r.Test", false); + test("p", "q.r.Test", true); + test("p/q", "r.Test", true); + test("p/q/r", "Test", true); + test(".", "p.q.r.Test.Inner", false); + test(".", "p.q.r.Test$Inner", false); + test("p", "q.r.Test.Inner", true); + test("p", "q.r.Test$Inner", true); + + if (errors > 0) + throw new Exception(errors + " errors found"); + } + + void test(String classPath, String className, boolean expectWarnings) { + List> diags = + javap(Arrays.asList("-classpath", classPath), Arrays.asList(className)); + boolean foundWarnings = false; + for (Diagnostic d: diags) { + if (d.getKind() == Diagnostic.Kind.WARNING) + foundWarnings = true; + } + } + + + File writeTestFile() throws IOException { + File f = new File("Test.java"); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); + out.println("package p.q.r;"); + out.println("class Test { class Inner { } }"); + out.close(); + return f; + } + + File compileTestFile(File f) { + int rc = com.sun.tools.javac.Main.compile(new String[] { "-d", ".", f.getPath() }); + if (rc != 0) + throw new Error("compilation failed. rc=" + rc); + String path = f.getPath(); + return new File(path.substring(0, path.length() - 5) + ".class"); + } + + List> javap(List args, List classes) { + DiagnosticCollector dc = new DiagnosticCollector(); + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + JavaFileManager fm = JavapFileManager.create(dc, pw); + JavapTask t = new JavapTask(pw, fm, dc, args, classes); + boolean ok = t.run(); + + List> diags = dc.getDiagnostics(); + + if (!ok) + error("javap failed unexpectedly"); + + System.err.println("args=" + args + " classes=" + classes + "\n" + + diags + "\n" + + sw); + + return diags; + } + + void error(String msg) { + System.err.println("error: " + msg); + errors++; + } + + int errors; +} + From a74a7d0f30ff32e71b97981aa5997e728f4f775a Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Thu, 30 Jul 2009 14:45:04 +0900 Subject: [PATCH 05/51] 6866243: Javadoc for java.lang.Character still refers to Unicode 4 instead of 5 Reviewed-by: okutsu --- jdk/src/share/classes/java/lang/Character.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/lang/Character.java b/jdk/src/share/classes/java/lang/Character.java index 9b9c938fa1e..19790de3ae8 100644 --- a/jdk/src/share/classes/java/lang/Character.java +++ b/jdk/src/share/classes/java/lang/Character.java @@ -38,7 +38,7 @@ import java.util.Locale; * a character's category (lowercase letter, digit, etc.) and for converting * characters from uppercase to lowercase and vice versa. *

- * Character information is based on the Unicode Standard, version 4.0. + * Character information is based on the Unicode Standard, version 5.1.0. *

* The methods and data of class Character are defined by * the information in the UnicodeData file that is part of the From 59b2cbc44834ebd1fd07e6833e464c262ae554cb Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 30 Jul 2009 10:29:53 +0100 Subject: [PATCH 06/51] 6827648: Extremely slow compilation time for visitor pattern code + generics Javac unnecessarily recomputates type-substitutions multiple times Reviewed-by: jjg --- .../com/sun/tools/javac/code/Symbol.java | 18 ++------ .../com/sun/tools/javac/code/Types.java | 46 +++++++++++++++++-- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java index da1567aa5bb..ab1f995a089 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java @@ -1197,21 +1197,9 @@ public abstract class Symbol implements Element { * as possible implementations. */ public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult) { - for (Type t = origin.type; t.tag == CLASS || t.tag == TYPEVAR; t = types.supertype(t)) { - while (t.tag == TYPEVAR) - t = t.getUpperBound(); - TypeSymbol c = t.tsym; - for (Scope.Entry e = c.members().lookup(name); - e.scope != null; - e = e.next()) { - if (e.sym.kind == MTH) { - MethodSymbol m = (MethodSymbol) e.sym; - if (m.overrides(this, origin, types, checkResult) && - (m.flags() & SYNTHETIC) == 0) - return m; - } - } - } + MethodSymbol res = types.implementation(this, origin, types, checkResult); + if (res != null) + return res; // if origin is derived from a raw type, we might have missed // an implementation because we do not know enough about instantiations. // in this case continue with the supertype as origin. diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java index 9a6e5725c74..ca89b426ce7 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java @@ -25,10 +25,9 @@ package com.sun.tools.javac.code; +import java.lang.ref.SoftReference; import java.util.*; -import com.sun.tools.javac.api.Messages; - import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.List; @@ -1442,7 +1441,7 @@ public class Types { return (sym.flags() & STATIC) != 0 ? sym.type : memberType.visit(t, sym); - } + } // where private SimpleVisitor memberType = new SimpleVisitor() { @@ -1552,7 +1551,7 @@ public class Types { return t; /* fast special case */ else return erasure.visit(t, recurse); - } + } // where private SimpleVisitor erasure = new SimpleVisitor() { public Type visitType(Type t, Boolean recurse) { @@ -1946,6 +1945,45 @@ public class Types { hasSameArgs(t, erasure(s)) || hasSameArgs(erasure(t), s); } + private WeakHashMap>> implCache_check = + new WeakHashMap>>(); + + private WeakHashMap>> implCache_nocheck = + new WeakHashMap>>(); + + public MethodSymbol implementation(MethodSymbol ms, TypeSymbol origin, Types types, boolean checkResult) { + Map>> implCache = checkResult ? + implCache_check : implCache_nocheck; + SoftReference> ref_cache = implCache.get(ms); + Map cache = ref_cache != null ? ref_cache.get() : null; + if (cache == null) { + cache = new HashMap(); + implCache.put(ms, new SoftReference>(cache)); + } + MethodSymbol impl = cache.get(origin); + if (impl == null) { + for (Type t = origin.type; t.tag == CLASS || t.tag == TYPEVAR; t = types.supertype(t)) { + while (t.tag == TYPEVAR) + t = t.getUpperBound(); + TypeSymbol c = t.tsym; + for (Scope.Entry e = c.members().lookup(ms.name); + e.scope != null; + e = e.next()) { + if (e.sym.kind == Kinds.MTH) { + MethodSymbol m = (MethodSymbol) e.sym; + if (m.overrides(ms, origin, types, checkResult) && + (m.flags() & SYNTHETIC) == 0) { + impl = m; + cache.put(origin, m); + return impl; + } + } + } + } + } + return impl; + } + /** * Does t have the same arguments as s? It is assumed that both * types are (possibly polymorphic) method types. Monomorphic From 25497fcea7156654d2c59a49b313d5aec0790076 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 30 Jul 2009 10:30:10 +0100 Subject: [PATCH 07/51] 6862608: rich diagnostic sometimes contain wrong type variable numbering The rich formatter generates worng numbers for type-variables in where clauses Reviewed-by: jjg --- .../tools/javac/resources/compiler.properties | 2 +- .../javac/util/RichDiagnosticFormatter.java | 59 +++++++++---------- .../javac/Diagnostics/6862608/T6862608a.java | 44 ++++++++++++++ .../javac/Diagnostics/6862608/T6862608a.out | 3 + .../javac/Diagnostics/6862608/T6862608b.java | 38 ++++++++++++ .../javac/Diagnostics/6862608/T6862608b.out | 3 + 6 files changed, 118 insertions(+), 31 deletions(-) create mode 100644 langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java create mode 100644 langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out create mode 100644 langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java create mode 100644 langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties index 3365ae06635..b972332b014 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1003,7 +1003,7 @@ compiler.misc.inferred.do.not.conform.to.bounds=\ inferred: {0}\n\ bound(s): {1} compiler.misc.inferred.do.not.conform.to.params=\ - actual arguments do not conforms to inferred formal arguments\n\ + actual arguments do not conform to inferred formal arguments\n\ required: {0}\n\ found: {1} diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 0996c42f715..58812a781d7 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -208,6 +208,32 @@ public class RichDiagnosticFormatter extends } return clauses.reverse(); } + + private int indexOf(Type type, WhereClauseKind kind) { + int index = 1; + for (Type t : whereClauses.get(kind).keySet()) { + if (t.tsym == type.tsym) { + return index; + } + if (kind != WhereClauseKind.TYPEVAR || + t.toString().equals(type.toString())) { + index++; + } + } + return -1; + } + + private boolean unique(TypeVar typevar) { + int found = 0; + for (Type t : whereClauses.get(WhereClauseKind.TYPEVAR).keySet()) { + if (t.toString().equals(typevar.toString())) { + found++; + } + } + if (found < 1) + throw new AssertionError("Missing type variable in where clause " + typevar); + return found == 1; + } //where /** * This enum defines all posssible kinds of where clauses that can be @@ -366,33 +392,6 @@ public class RichDiagnosticFormatter extends } } - private int indexOf(Type type, WhereClauseKind kind) { - int index = 0; - boolean found = false; - for (Type t : whereClauses.get(kind).keySet()) { - if (t == type) { - found = true; - break; - } - index++; - } - if (!found) - throw new AssertionError("Missing symbol in where clause " + type); - return index + 1; - } - - private boolean unique(TypeVar typevar) { - int found = 0; - for (Type t : whereClauses.get(WhereClauseKind.TYPEVAR).keySet()) { - if (t.toString().equals(typevar.toString())) { - found++; - } - } - if (found < 1) - throw new AssertionError("Missing type variable in where clause " + typevar); - return found == 1; - } - @Override protected String printMethodArgs(List args, boolean varArgs, Locale locale) { return super.printMethodArgs(args, varArgs, locale); @@ -492,7 +491,7 @@ public class RichDiagnosticFormatter extends @Override public Void visitCapturedType(CapturedType t, Void ignored) { - if (!whereClauses.get(WhereClauseKind.CAPTURED).containsKey(t)) { + if (indexOf(t, WhereClauseKind.CAPTURED) == -1) { String suffix = t.lower == syms.botType ? ".1" : ""; JCDiagnostic d = diags.fragment("where.captured"+ suffix, t, t.bound, t.lower, t.wildcard); whereClauses.get(WhereClauseKind.CAPTURED).put(t, d); @@ -506,7 +505,7 @@ public class RichDiagnosticFormatter extends @Override public Void visitClassType(ClassType t, Void ignored) { if (t.isCompound()) { - if (!whereClauses.get(WhereClauseKind.INTERSECTION).containsKey(t)) { + if (indexOf(t, WhereClauseKind.INTERSECTION) == -1) { Type supertype = types.supertype(t); List interfaces = types.interfaces(t); JCDiagnostic d = diags.fragment("where.intersection", t, interfaces.prepend(supertype)); @@ -524,7 +523,7 @@ public class RichDiagnosticFormatter extends @Override public Void visitTypeVar(TypeVar t, Void ignored) { - if (!whereClauses.get(WhereClauseKind.TYPEVAR).containsKey(t)) { + if (indexOf(t, WhereClauseKind.TYPEVAR) == -1) { Type bound = t.bound; while ((bound instanceof ErrorType)) bound = ((ErrorType)bound).getOriginalType(); diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java new file mode 100644 index 00000000000..df3c9b0c910 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.java @@ -0,0 +1,44 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6862608 + * @summary rich diagnostic sometimes contain wrong type variable numbering + * @author mcimadamore + * @compile/fail/ref=T6862608a.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T6862608a.java + */ + + +import java.util.*; + +class T6862608a { + + Comparator compound(Iterable> it) { + return null; + } + + public void test(List> x) { + Comparator c3 = compound(x); + } +} diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out new file mode 100644 index 00000000000..181b78b7698 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out @@ -0,0 +1,3 @@ +T6862608a.java:42:41: compiler.err.invalid.inferred.types: T, (compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable>, java.util.List>) +- compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, java.lang.Object, kindname.method, compound(java.lang.Iterable>))} +1 error diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java new file mode 100644 index 00000000000..db5a5ac3354 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.java @@ -0,0 +1,38 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6862608 + * @summary rich diagnostic sometimes contain wrong type variable numbering + * @author mcimadamore + * @compile/fail/ref=T6862608b.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T6862608b.java + */ + +class T66862608b { + void foo(T t) { + test(t); + } + + void test(T t) {} +} diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out new file mode 100644 index 00000000000..34ac1a61cb4 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out @@ -0,0 +1,3 @@ +T6862608b.java:34:7: compiler.err.cant.apply.symbol: kindname.method, test, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T66862608b, null +- compiler.misc.where.description.typevar.1: compiler.misc.type.var: T, 1,compiler.misc.type.var: T, 2,compiler.misc.type.var: S, 1,compiler.misc.type.var: S, 2,{(compiler.misc.where.typevar: compiler.misc.type.var: T, 1, java.lang.String, kindname.class, T66862608b),(compiler.misc.where.typevar: compiler.misc.type.var: T, 2, compiler.misc.type.var: S, 1, kindname.method, foo(compiler.misc.type.var: T, 2)),(compiler.misc.where.typevar: compiler.misc.type.var: S, 1, java.lang.Object, kindname.method, foo(compiler.misc.type.var: T, 2)),(compiler.misc.where.typevar: compiler.misc.type.var: S, 2, java.lang.Object, kindname.class, T66862608b)} +1 error From fe1aaa815421a0d0aea129dc136a3a14fda3ba03 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 30 Jul 2009 10:30:24 +0100 Subject: [PATCH 08/51] 6864382: NPE in the rich formatter when processing an unattributed type-variable Unattributed type variable should not be accessed by the rich formatter when emitting where clauses Reviewed-by: jjg --- .../javac/util/RichDiagnosticFormatter.java | 8 ++++- .../javac/Diagnostics/6864382/T6864382.java | 32 +++++++++++++++++++ .../javac/Diagnostics/6864382/T6864382.out | 2 ++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/Diagnostics/6864382/T6864382.java create mode 100644 langtools/test/tools/javac/Diagnostics/6864382/T6864382.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 58812a781d7..2275ba935b4 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -524,10 +524,16 @@ public class RichDiagnosticFormatter extends @Override public Void visitTypeVar(TypeVar t, Void ignored) { if (indexOf(t, WhereClauseKind.TYPEVAR) == -1) { + //access the bound type and skip error types Type bound = t.bound; while ((bound instanceof ErrorType)) bound = ((ErrorType)bound).getOriginalType(); - List bounds = types.getBounds(t); + //retrieve the bound list - if the type variable + //has not been attributed the bound is not set + List bounds = bound != null ? + types.getBounds(t) : + List.nil(); + nameSimplifier.addUsage(t.tsym); boolean boundErroneous = bounds.head == null || diff --git a/langtools/test/tools/javac/Diagnostics/6864382/T6864382.java b/langtools/test/tools/javac/Diagnostics/6864382/T6864382.java new file mode 100644 index 00000000000..f6ab5d891a1 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6864382/T6864382.java @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6864382 + * @summary NullPointerException when compiling a negative java source + * @author mcimadamore + * @compile/fail/ref=T6864382.out -XDrawDiagnostics T6864382.java + */ + +class T6864382 extends T {} diff --git a/langtools/test/tools/javac/Diagnostics/6864382/T6864382.out b/langtools/test/tools/javac/Diagnostics/6864382/T6864382.out new file mode 100644 index 00000000000..40013de7081 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6864382/T6864382.out @@ -0,0 +1,2 @@ +T6864382.java:32:27: compiler.err.type.found.req: (compiler.misc.type.parameter: T), (compiler.misc.type.req.class) +1 error From 638db1aabb648e996d40e600337611deede22257 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Thu, 30 Jul 2009 10:30:34 +0100 Subject: [PATCH 09/51] 6861837: JCK compilation failures Type-annotations processing is accessing type info before they are available in MemberEnter Reviewed-by: jjg --- .../com/sun/tools/javac/comp/MemberEnter.java | 9 -------- .../com/sun/tools/javac/comp/TransTypes.java | 17 +++++++++++++++ .../javac/typeAnnotations/InnerClass.java | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java index 5c0245a0a98..39dd35902a5 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java @@ -1040,15 +1040,6 @@ public class MemberEnter extends JCTree.Visitor implements Completer { JavaFileObject prev = log.useSource(env.toplevel.sourcefile); try { enterTypeAnnotations(annotations); - - // enrich type parameter symbols... easier for annotation processors - if (tree instanceof JCTypeParameter) { - JCTypeParameter typeparam = (JCTypeParameter)tree; - ListBuffer buf = ListBuffer.lb(); - for (JCTypeAnnotation anno : annotations) - buf.add(anno.attribute_field); - typeparam.type.tsym.attributes_field = buf.toList(); - } } finally { log.useSource(prev); } diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java index 18dcceb56df..26269e81558 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java @@ -817,6 +817,23 @@ public class TransTypes extends TreeTranslator { pop(); } + private boolean inClass = false; + + @Override + public void visitClassDef(JCClassDecl tree) { + if (!inClass) { + // Do not recurse into nested and inner classes since + // TransTypes.visitClassDef makes an invocation for each class + // separately. + inClass = true; + try { + super.visitClassDef(tree); + } finally { + inClass = false; + } + } + } + private TypeAnnotationPosition resolveFrame(JCTree tree, JCTree frame, List path, TypeAnnotationPosition p) { switch (frame.getKind()) { diff --git a/langtools/test/tools/javac/typeAnnotations/InnerClass.java b/langtools/test/tools/javac/typeAnnotations/InnerClass.java index fd14cea782a..dba8202be90 100644 --- a/langtools/test/tools/javac/typeAnnotations/InnerClass.java +++ b/langtools/test/tools/javac/typeAnnotations/InnerClass.java @@ -30,9 +30,30 @@ */ class InnerClass { + + InnerClass() {} + InnerClass(Object o) {} + private void a() { new Object() { public void method() { } }; } + + Object f1 = new InnerClass() { + void method() { } + }; + + Object f2 = new InnerClass() { + <@A R> void method() { } + }; + + Object f3 = new InnerClass(null) { + void method() { } + }; + + Object f4 = new InnerClass(null) { + <@A R> void method() { } + }; + @interface A { } } From 219445d03ac4dbda971d80fa68871b7be91fd623 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 30 Jul 2009 07:48:24 -0700 Subject: [PATCH 10/51] 6866657: add byteLength method to primary classfile types Reviewed-by: mchung --- .../com/sun/tools/classfile/AccessFlags.java | 4 + .../com/sun/tools/classfile/Attribute.java | 4 + .../com/sun/tools/classfile/Attributes.java | 7 ++ .../com/sun/tools/classfile/ClassFile.java | 32 ++++++++ .../com/sun/tools/classfile/ConstantPool.java | 60 ++++++++++++++ .../com/sun/tools/classfile/Field.java | 4 + .../com/sun/tools/classfile/Method.java | 4 + langtools/test/tools/javap/T6866657.java | 82 +++++++++++++++++++ 8 files changed, 197 insertions(+) create mode 100644 langtools/test/tools/javap/T6866657.java diff --git a/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java b/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java index 2cfc363d995..a8b51bf9546 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java @@ -76,6 +76,10 @@ public class AccessFlags { return (flags & mask) != 0; } + public int byteLength() { + return 2; + } + private static final int[] classModifiers = { ACC_PUBLIC, ACC_FINAL, ACC_ABSTRACT, ACC_MODULE }; diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java index ccb50b58675..326de77a7c9 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java @@ -166,6 +166,10 @@ public abstract class Attribute { public abstract R accept(Attribute.Visitor visitor, D data); + public int byteLength() { + return 6 + attribute_length; + } + public final int attribute_name_index; public final int attribute_length; diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java index d3ea27f7337..6f61a1d6e75 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java @@ -95,6 +95,13 @@ public class Attributes implements Iterable { return attrs.length; } + public int byteLength() { + int length = 2; + for (Attribute a: attrs) + length += a.byteLength(); + return length; + } + public final Attribute[] attrs; public final Map map; } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java index 4be151d31f6..8efe7ebe912 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java @@ -139,6 +139,38 @@ public class ClassFile { return access_flags.is(ACC_INTERFACE); } + public int byteLength() { + return 4 + // magic + 2 + // minor + 2 + // major + constant_pool.byteLength() + + 2 + // access flags + 2 + // this_class + 2 + // super_class + byteLength(interfaces) + + byteLength(fields) + + byteLength(methods) + + attributes.byteLength(); + } + + private int byteLength(int[] indices) { + return 2 + 2 * indices.length; + } + + private int byteLength(Field[] fields) { + int length = 2; + for (Field f: fields) + length += f.byteLength(); + return length; + } + + private int byteLength(Method[] methods) { + int length = 2; + for (Method m: methods) + length += m.byteLength(); + return length; + } + public final int magic; public final int minor_version; public final int major_version; diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java index 2f1dc357e64..ba53f2d2a24 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java @@ -25,7 +25,9 @@ package com.sun.tools.classfile; +import java.io.DataOutputStream; import java.io.IOException; +import java.io.OutputStream; import java.util.Iterator; /** @@ -179,6 +181,16 @@ public class ConstantPool { return pool.length; } + public int byteLength() { + int length = 2; + for (int i = 1; i < size(); ) { + CPInfo cpInfo = pool[i]; + length += cpInfo.byteLength(); + i += cpInfo.size(); + } + return length; + } + public CPInfo get(int index) throws InvalidIndex { if (index <= 0 || index >= pool.length) throw new InvalidIndex(index); @@ -291,6 +303,8 @@ public class ConstantPool { return 1; } + public abstract int byteLength(); + public abstract R accept(Visitor visitor, D data); protected final ConstantPool cp; @@ -315,6 +329,10 @@ public class ConstantPool { return tag; } + public int byteLength() { + return 5; + } + public CONSTANT_Class_info getClassInfo() throws ConstantPoolException { return cp.getClassInfo(class_index); } @@ -347,6 +365,10 @@ public class ConstantPool { return CONSTANT_Class; } + public int byteLength() { + return 3; + } + public String getName() throws ConstantPoolException { return cp.getUTF8Value(name_index); } @@ -390,6 +412,10 @@ public class ConstantPool { return CONSTANT_Double; } + public int byteLength() { + return 9; + } + @Override public int size() { return 2; @@ -439,6 +465,10 @@ public class ConstantPool { return CONSTANT_Float; } + public int byteLength() { + return 5; + } + @Override public String toString() { return "CONSTANT_Float_info[value: " + value + "]"; @@ -464,6 +494,10 @@ public class ConstantPool { return CONSTANT_Integer; } + public int byteLength() { + return 5; + } + @Override public String toString() { return "CONSTANT_Integer_info[value: " + value + "]"; @@ -513,6 +547,10 @@ public class ConstantPool { return 2; } + public int byteLength() { + return 9; + } + @Override public String toString() { return "CONSTANT_Long_info[value: " + value + "]"; @@ -561,6 +599,10 @@ public class ConstantPool { return CONSTANT_NameAndType; } + public int byteLength() { + return 5; + } + public String getName() throws ConstantPoolException { return cp.getUTF8Value(name_index); } @@ -597,6 +639,10 @@ public class ConstantPool { return CONSTANT_String; } + public int byteLength() { + return 3; + } + public String getString() throws ConstantPoolException { return cp.getUTF8Value(string_index); } @@ -626,6 +672,20 @@ public class ConstantPool { return CONSTANT_Utf8; } + public int byteLength() { + class SizeOutputStream extends OutputStream { + @Override + public void write(int b) throws IOException { + size++; + } + int size; + } + SizeOutputStream sizeOut = new SizeOutputStream(); + DataOutputStream out = new DataOutputStream(sizeOut); + try { out.writeUTF(value); } catch (IOException ignore) { } + return 1 + sizeOut.size; + } + @Override public String toString() { if (value.length() < 32 && isPrintableAscii(value)) diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Field.java b/langtools/src/share/classes/com/sun/tools/classfile/Field.java index a98f73fda3a..87ecea98cdb 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/Field.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/Field.java @@ -50,6 +50,10 @@ public class Field { this.attributes = attributes; } + public int byteLength() { + return 6 + attributes.byteLength(); + } + public String getName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(name_index); } diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Method.java b/langtools/src/share/classes/com/sun/tools/classfile/Method.java index 4018bdc2588..4ad92d586a7 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/Method.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/Method.java @@ -50,6 +50,10 @@ public class Method { this.attributes = attributes; } + public int byteLength() { + return 6 + attributes.byteLength(); + } + public String getName(ConstantPool constant_pool) throws ConstantPoolException { return constant_pool.getUTF8Value(name_index); } diff --git a/langtools/test/tools/javap/T6866657.java b/langtools/test/tools/javap/T6866657.java new file mode 100644 index 00000000000..5a4f7f5e391 --- /dev/null +++ b/langtools/test/tools/javap/T6866657.java @@ -0,0 +1,82 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + + +/* + * @test + * @bug 6866657 + * @summary add byteLength() method to primary classfile types + */ + +import java.io.*; +import java.util.*; +import javax.tools.*; +import com.sun.tools.javap.*; + +public class T6866657 +{ + public static void main(String... args) { + new T6866657().run(); + } + + void run() { + verify("java.lang.Object"); + verify("java.lang.String"); + verify("java.util.List"); + verify("java.util.ArrayList"); + if (errors > 0) + throw new Error(errors + " found."); + } + + void verify(String className) { + try { + PrintWriter log = new PrintWriter(System.out); + JavaFileManager fileManager = JavapFileManager.create(null, log); + JavaFileObject fo = fileManager.getJavaFileForInput(StandardLocation.PLATFORM_CLASS_PATH, className, JavaFileObject.Kind.CLASS); + if (fo == null) { + error("Can't find " + className); + } else { + JavapTask t = new JavapTask(log, fileManager, null); + t.handleOptions(new String[] { "-sysinfo", className }); + JavapTask.ClassFileInfo cfInfo = t.read(fo); + expectEqual(cfInfo.cf.byteLength(), cfInfo.size); + } + } catch (Exception e) { + e.printStackTrace(); + error("Exception: " + e); + } + } + + void expectEqual(int found, int expected) { + if (found != expected) + error("bad value found: " + found + " expected: " + expected); + } + + void error(String msg) { + System.err.println(msg); + errors++; + } + + int errors; +} + From 24bbb68d3861cbe9fcc66998634607b8cbffcbd2 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 30 Jul 2009 09:18:55 -0700 Subject: [PATCH 11/51] 4880672: javap does not output inner interfaces of an interface Reviewed-by: mcimadamore --- .../com/sun/tools/javap/JavapTask.java | 116 ++++++++++++------ .../classes/com/sun/tools/javap/Options.java | 1 + .../tools/javap/resources/javap.properties | 1 + langtools/test/tools/javap/T4880672.java | 86 +++++++++++++ 4 files changed, 169 insertions(+), 35 deletions(-) create mode 100644 langtools/test/tools/javap/T4880672.java diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java index faf526419b7..f86534f923c 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java @@ -289,6 +289,12 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { void process(JavapTask task, String opt, String arg) { task.options.showConstants = true; } + }, + + new Option(false, "-XDinner") { + void process(JavapTask task, String opt, String arg) { + task.options.showInnerClasses = true; + } } }; @@ -529,46 +535,15 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { SourceWriter sourceWriter = SourceWriter.instance(context); sourceWriter.setFileManager(fileManager); + attributeFactory.setCompat(options.compat); + attributeFactory.setJSR277(options.jsr277); + boolean ok = true; for (String className: classes) { JavaFileObject fo; try { - if (className.endsWith(".class")) { - if (fileManager instanceof StandardJavaFileManager) { - StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; - fo = sfm.getJavaFileObjects(className).iterator().next(); - } else { - reportError("err.not.standard.file.manager", className); - ok = false; - continue; - } - } else { - fo = getClassFileObject(className); - if (fo == null) { - // see if it is an inner class, by replacing dots to $, starting from the right - String cn = className; - int lastDot; - while (fo == null && (lastDot = cn.lastIndexOf(".")) != -1) { - cn = cn.substring(0, lastDot) + "$" + cn.substring(lastDot + 1); - fo = getClassFileObject(cn); - } - } - if (fo == null) { - reportError("err.class.not.found", className); - ok = false; - continue; - } - } - attributeFactory.setCompat(options.compat); - attributeFactory.setJSR277(options.jsr277); - ClassFileInfo cfInfo = read(fo); - if (!className.endsWith(".class")) { - String cfName = cfInfo.cf.getName(); - if (!cfName.replaceAll("[/$]", ".").equals(className.replaceAll("[/$]", "."))) - reportWarning("warn.unexpected.class", className, cfName.replace('/', '.')); - } - write(cfInfo); + writeClass(classWriter, className); } catch (ConstantPoolException e) { reportError("err.bad.constant.pool", className, e.getLocalizedMessage()); ok = false; @@ -598,6 +573,76 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { return ok; } + protected boolean writeClass(ClassWriter classWriter, String className) + throws IOException, ConstantPoolException { + JavaFileObject fo; + if (className.endsWith(".class")) { + if (fileManager instanceof StandardJavaFileManager) { + StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; + fo = sfm.getJavaFileObjects(className).iterator().next(); + } else { + reportError("err.not.standard.file.manager", className); + return false; + } + } else { + fo = getClassFileObject(className); + if (fo == null) { + // see if it is an inner class, by replacing dots to $, starting from the right + String cn = className; + int lastDot; + while (fo == null && (lastDot = cn.lastIndexOf(".")) != -1) { + cn = cn.substring(0, lastDot) + "$" + cn.substring(lastDot + 1); + fo = getClassFileObject(cn); + } + } + if (fo == null) { + reportError("err.class.not.found", className); + return false; + } + } + + ClassFileInfo cfInfo = read(fo); + if (!className.endsWith(".class")) { + String cfName = cfInfo.cf.getName(); + if (!cfName.replaceAll("[/$]", ".").equals(className.replaceAll("[/$]", "."))) + reportWarning("warn.unexpected.class", className, cfName.replace('/', '.')); + } + write(cfInfo); + + if (options.showInnerClasses) { + ClassFile cf = cfInfo.cf; + Attribute a = cf.getAttribute(Attribute.InnerClasses); + if (a instanceof InnerClasses_attribute) { + InnerClasses_attribute inners = (InnerClasses_attribute) a; + try { + boolean ok = true; + for (int i = 0; i < inners.classes.length; i++) { + int outerIndex = inners.classes[i].outer_class_info_index; + ConstantPool.CONSTANT_Class_info outerClassInfo = cf.constant_pool.getClassInfo(outerIndex); + String outerClassName = outerClassInfo.getName(); + if (outerClassName.equals(cf.getName())) { + int innerIndex = inners.classes[i].inner_class_info_index; + ConstantPool.CONSTANT_Class_info innerClassInfo = cf.constant_pool.getClassInfo(innerIndex); + String innerClassName = innerClassInfo.getName(); + classWriter.println("// inner class " + innerClassName.replaceAll("[/$]", ".")); + classWriter.println(); + ok = ok & writeClass(classWriter, innerClassName); + } + } + return ok; + } catch (ConstantPoolException e) { + reportError("err.bad.innerclasses.attribute", className); + return false; + } + } else if (a != null) { + reportError("err.bad.innerclasses.attribute", className); + return false; + } + } + + return true; + } + public static class ClassFileInfo { ClassFileInfo(JavaFileObject fo, ClassFile cf, byte[] digest, int size) { this.fo = fo; @@ -801,6 +846,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { return JavapTask.this.getMessage(locale, key, args); } + @Override public String toString() { return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]"; } diff --git a/langtools/src/share/classes/com/sun/tools/javap/Options.java b/langtools/src/share/classes/com/sun/tools/javap/Options.java index 70f76060ebc..e6b37345582 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/Options.java +++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java @@ -85,6 +85,7 @@ public class Options { public boolean showAllAttrs; public boolean showConstants; public boolean sysInfo; + public boolean showInnerClasses; public boolean compat; // bug-for-bug compatibility mode with old javap public boolean jsr277; diff --git a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties index 87b9a332886..4a13d601970 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties +++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties @@ -18,6 +18,7 @@ err.unknown.option=unknown option: {0} err.verify.not.supported=-verify not supported err.no.SourceFile.attribute=no SourceFile attribute err.source.file.not.found=source file not found +err.bad.innerclasses.attribute=bad InnerClasses attribute for {0} warn.Xold.not.supported=-Xold is no longer available main.usage.summary=\ diff --git a/langtools/test/tools/javap/T4880672.java b/langtools/test/tools/javap/T4880672.java new file mode 100644 index 00000000000..b58182eb63c --- /dev/null +++ b/langtools/test/tools/javap/T4880672.java @@ -0,0 +1,86 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + + +/* + * @test + * @bug 4880672 + * @summary javap does not output inner interfaces of an interface + */ + +import java.io.*; +import java.util.*; + +public class T4880672 +{ + public static void main(String... args) { + new T4880672().run(); + } + + void run() { + verify("java.util.Map", "public interface java.util.Map$Entry"); + verify("T4880672", "class T4880672$A$B extends java.lang.Object"); + verify("C", ""); // must not give error if no InnerClasses attribute + if (errors > 0) + throw new Error(errors + " found."); + } + + void verify(String className, String... expects) { + String output = javap(className); + for (String expect: expects) { + if (output.indexOf(expect)< 0) + error(expect + " not found"); + } + } + + void error(String msg) { + System.err.println(msg); + errors++; + } + + int errors; + + String javap(String className) { + String testClasses = System.getProperty("test.classes", "."); + StringWriter sw = new StringWriter(); + PrintWriter out = new PrintWriter(sw); + String[] args = { "-XDinner", "-classpath", testClasses, className }; + int rc = com.sun.tools.javap.Main.run(args, out); + out.close(); + String output = sw.toString(); + System.out.println("class " + className); + System.out.println(output); + if (rc != 0) + throw new Error("javap failed. rc=" + rc); + if (output.indexOf("Error:") != -1) + throw new Error("javap reported error."); + return output; + } + + class A { + class B { } + } +} + +class C { } + From 099a44dbf827aa02d0260fae016f84b82da91c66 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 31 Jul 2009 16:27:35 +0400 Subject: [PATCH 12/51] 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java Reviewed-by: peterz --- .../swing/JInternalFrame/Test6325652.java | 105 +++++++++++++ .../swing/JInternalFrame/Test6505027.java | 113 ++++++-------- .../swing/JInternalFrame/Test6802868.java | 114 +++++++------- .../javax/swing/JScrollPane/Test6526631.java | 21 ++- jdk/test/javax/swing/SwingTest.java | 142 ++++++++---------- 5 files changed, 274 insertions(+), 221 deletions(-) create mode 100644 jdk/test/javax/swing/JInternalFrame/Test6325652.java diff --git a/jdk/test/javax/swing/JInternalFrame/Test6325652.java b/jdk/test/javax/swing/JInternalFrame/Test6325652.java new file mode 100644 index 00000000000..d9fea4487cb --- /dev/null +++ b/jdk/test/javax/swing/JInternalFrame/Test6325652.java @@ -0,0 +1,105 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6325652 + * @summary Tests keyboard shortcuts + * @author Sergey Malenkov + * @library .. + */ + +import java.awt.AWTException; +import java.awt.Robot; +import java.awt.event.KeyEvent; +import java.beans.PropertyVetoException; +import javax.swing.JDesktopPane; +import javax.swing.JFrame; +import javax.swing.JInternalFrame; +import javax.swing.JTextArea; + +public class Test6325652 { + + private static final int WIDTH = 300; + private static final int HEIGHT = 300; + + public static void main(String[] args) throws Throwable { + SwingTest.start(Test6325652.class); + } + + private static Robot robot; + private JInternalFrame internal; + + public Test6325652(JFrame frame) { + JDesktopPane desktop = new JDesktopPane(); + desktop.add(create(0)); + desktop.add(this.internal = create(1)); + frame.add(desktop); + } + + public void select() throws PropertyVetoException { + this.internal.setSelected(true); + } + + public static void stepFirst() throws AWTException { + robot = new Robot(); // initialize shared static field first time + click(KeyEvent.VK_CONTROL, KeyEvent.VK_F9); // iconify internal frame + } + + public void stepFirstValidate() { + if (!this.internal.isIcon()) { + throw new Error("frame should be an icon"); + } + } + + public static void stepSecond() { + click(KeyEvent.VK_CONTROL, KeyEvent.VK_F6); // navigate to the icon + click(KeyEvent.VK_CONTROL, KeyEvent.VK_F5); // restore the icon + } + + public void stepSecondValidate() { + if (this.internal.isIcon()) { + throw new Error("frame should not be an icon"); + } + } + + private static void click(int... keys) { + for (int key : keys) { + robot.keyPress(key); + } + for (int key : keys) { + robot.keyRelease(key); + } + } + + private static JInternalFrame create(int index) { + String text = "test" + index; // NON-NLS: frame identification + index = index * 3 + 1; + + JInternalFrame internal = new JInternalFrame(text, true, true, true, true); + internal.getContentPane().add(new JTextArea(text)); + internal.setBounds(10 * index, 10 * index, WIDTH, HEIGHT); + internal.setVisible(true); + return internal; + } +} diff --git a/jdk/test/javax/swing/JInternalFrame/Test6505027.java b/jdk/test/javax/swing/JInternalFrame/Test6505027.java index 218769003cb..42923ec5e0c 100644 --- a/jdk/test/javax/swing/JInternalFrame/Test6505027.java +++ b/jdk/test/javax/swing/JInternalFrame/Test6505027.java @@ -26,6 +26,7 @@ * @bug 6505027 * @summary Tests focus problem inside internal frame * @author Sergey Malenkov + * @library .. */ import java.awt.AWTException; @@ -45,11 +46,10 @@ import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.SwingUtilities; -import javax.swing.WindowConstants; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; -public class Test6505027 implements Runnable { +public class Test6505027 { private static final boolean INTERNAL = true; private static final boolean TERMINATE = true; @@ -57,80 +57,53 @@ public class Test6505027 implements Runnable { private static final int WIDTH = 450; private static final int HEIGHT = 200; private static final int OFFSET = 10; - private static final long PAUSE = 2048L; - private static final String[] COLUMNS = { "Size", "Shape" }; // NON-NLS - private static final String[] ITEMS = { "a", "b", "c", "d" }; // NON-NLS - private static final String KEY = "terminateEditOnFocusLost"; // NON-NLS + private static final String[] COLUMNS = { "Size", "Shape" }; // NON-NLS: column names + private static final String[] ITEMS = { "a", "b", "c", "d" }; // NON-NLS: combobox content + private static final String KEY = "terminateEditOnFocusLost"; // NON-NLS: property name - public static void main(String[] args) { - SwingUtilities.invokeLater(new Test6505027()); + public static void main(String[] args) throws Throwable { + SwingTest.start(Test6505027.class); + } - Component component = null; - while (component == null) { - try { - Thread.sleep(PAUSE); - } - catch (InterruptedException exception) { - // ignore interrupted exception - } - component = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); + private final JTable table = new JTable(new DefaultTableModel(COLUMNS, 2)); + + public Test6505027(JFrame main) { + Container container = main; + if (INTERNAL) { + JInternalFrame frame = new JInternalFrame(); + frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT); + frame.setVisible(true); + + JDesktopPane desktop = new JDesktopPane(); + desktop.add(frame, new Integer(1)); + + container.add(desktop); + container = frame; } + if (TERMINATE) { + this.table.putClientProperty(KEY, Boolean.TRUE); + } + TableColumn column = this.table.getColumn(COLUMNS[1]); + column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS))); + + container.add(BorderLayout.NORTH, new JTextField()); + container.add(BorderLayout.CENTER, new JScrollPane(this.table)); + } + + public void press() throws AWTException { + Point point = this.table.getCellRect(1, 1, false).getLocation(); + SwingUtilities.convertPointToScreen(point, this.table); + + Robot robot = new Robot(); + robot.mouseMove(point.x + 1, point.y + 1); + robot.mousePress(InputEvent.BUTTON1_MASK); + } + + public static void validate() { + Component component = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (!component.getClass().equals(JComboBox.class)) { throw new Error("unexpected focus owner: " + component); } - SwingUtilities.getWindowAncestor(component).dispose(); - } - - private JTable table; - private Point point; - - public void run() { - if (this.table == null) { - JFrame main = new JFrame(); - main.setSize(WIDTH + OFFSET * 3, HEIGHT + OFFSET * 5); - main.setLocationRelativeTo(null); - main.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - main.setVisible(true); - - Container container = main; - if (INTERNAL) { - JInternalFrame frame = new JInternalFrame(); - frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT); - frame.setVisible(true); - - JDesktopPane desktop = new JDesktopPane(); - desktop.add(frame, new Integer(1)); - - container.add(desktop); - container = frame; - } - this.table = new JTable(new DefaultTableModel(COLUMNS, 2)); - if (TERMINATE) { - this.table.putClientProperty(KEY, Boolean.TRUE); - } - TableColumn column = this.table.getColumn(COLUMNS[1]); - column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS))); - - container.add(BorderLayout.NORTH, new JTextField()); - container.add(BorderLayout.CENTER, new JScrollPane(this.table)); - - SwingUtilities.invokeLater(this); - } - else if (this.point == null) { - this.point = this.table.getCellRect(1, 1, false).getLocation(); - SwingUtilities.convertPointToScreen(this.point, this.table); - SwingUtilities.invokeLater(this); - } - else { - try { - Robot robot = new Robot(); - robot.mouseMove(this.point.x + 1, this.point.y + 1); - robot.mousePress(InputEvent.BUTTON1_MASK); - } - catch (AWTException exception) { - throw new Error("unexpected exception", exception); - } - } } } diff --git a/jdk/test/javax/swing/JInternalFrame/Test6802868.java b/jdk/test/javax/swing/JInternalFrame/Test6802868.java index 74410df81fd..9f8eb9bb2e7 100644 --- a/jdk/test/javax/swing/JInternalFrame/Test6802868.java +++ b/jdk/test/javax/swing/JInternalFrame/Test6802868.java @@ -26,83 +26,73 @@ * @bug 6802868 * @summary JInternalFrame is not maximized when maximized parent frame * @author Alexander Potochkin + * @library .. */ -import sun.awt.SunToolkit; - import java.awt.Dimension; import java.awt.Point; -import java.awt.Robot; -import java.awt.Toolkit; import java.beans.PropertyVetoException; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JInternalFrame; -import javax.swing.SwingUtilities; public class Test6802868 { - static JInternalFrame jif; - static JFrame frame; - static Dimension size; - static Point location; - public static void main(String[] args) throws Exception { - Robot robot = new Robot(); - robot.setAutoDelay(20); - SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); + public static void main(String[] args) throws Throwable { + SwingTest.start(Test6802868.class); + } - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - frame = new JFrame(); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + private final JFrame frame; + private final JInternalFrame internal; + private Dimension size; + private Point location; - JDesktopPane jdp = new JDesktopPane(); - frame.getContentPane().add(jdp); + public Test6802868(JFrame frame) { + JDesktopPane desktop = new JDesktopPane(); - jif = new JInternalFrame("Title", true, true, true, true); - jdp.add(jif); - jif.setVisible(true); + this.frame = frame; + this.frame.add(desktop); - frame.setSize(200, 200); - frame.setLocationRelativeTo(null); - frame.setVisible(true); + this.internal = new JInternalFrame(getClass().getName(), true, true, true, true); + this.internal.setVisible(true); - try { - jif.setMaximum(true); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - toolkit.realSync(); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - size = jif.getSize(); - frame.setSize(300, 300); - } - }); - toolkit.realSync(); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - if (jif.getSize().equals(size)) { - throw new RuntimeException("InternalFrame hasn't changed its size"); - } - try { - jif.setIcon(true); - } catch (PropertyVetoException e) { - e.printStackTrace(); - } - location = jif.getDesktopIcon().getLocation(); - frame.setSize(400, 400); - } - }); - toolkit.realSync(); - SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - if (jif.getDesktopIcon().getLocation().equals(location)) { - throw new RuntimeException("JDesktopIcon hasn't moved"); - } - } - }); + desktop.add(this.internal); + } + + public void firstAction() throws PropertyVetoException { + this.internal.setMaximum(true); + } + + public void firstTest() { + this.size = this.internal.getSize(); + resizeFrame(); + } + + public void firstValidation() { + if (this.internal.getSize().equals(this.size)) { + throw new Error("InternalFrame hasn't changed its size"); + } + } + + public void secondAction() throws PropertyVetoException { + this.internal.setIcon(true); + } + + public void secondTest() { + this.location = this.internal.getDesktopIcon().getLocation(); + resizeFrame(); + } + + public void secondValidation() { + if (this.internal.getDesktopIcon().getLocation().equals(this.location)) { + throw new Error("JDesktopIcon hasn't moved"); + } + } + + private void resizeFrame() { + Dimension size = this.frame.getSize(); + size.width += 10; + size.height += 10; + this.frame.setSize(size); } } diff --git a/jdk/test/javax/swing/JScrollPane/Test6526631.java b/jdk/test/javax/swing/JScrollPane/Test6526631.java index ec324623ee5..61a39c6371e 100644 --- a/jdk/test/javax/swing/JScrollPane/Test6526631.java +++ b/jdk/test/javax/swing/JScrollPane/Test6526631.java @@ -27,10 +27,9 @@ * @summary Resizes right-oriented scroll pane * @author Sergey Malenkov * @library .. - * @build SwingTest - * @run main Test6526631 */ +import java.awt.ComponentOrientation; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JScrollBar; @@ -38,15 +37,13 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JViewport; -import static java.awt.ComponentOrientation.RIGHT_TO_LEFT; - public class Test6526631 { private static final int COLS = 90; private static final int ROWS = 50; private static final int OFFSET = 10; - public static void main(String[] args) { + public static void main(String[] args) throws Throwable { SwingTest.start(Test6526631.class); } @@ -55,7 +52,7 @@ public class Test6526631 { public Test6526631(JFrame frame) { this.pane = new JScrollPane(new JTextArea(ROWS, COLS)); - this.pane.setComponentOrientation(RIGHT_TO_LEFT); + this.pane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); this.frame = frame; this.frame.add(this.pane); } @@ -79,24 +76,24 @@ public class Test6526631 { public void validateThird() { JViewport viewport = this.pane.getViewport(); JScrollBar scroller = this.pane.getHorizontalScrollBar(); - if (!scroller.getComponentOrientation().equals(RIGHT_TO_LEFT)) { - throw new IllegalStateException("unexpected component orientation"); + if (!scroller.getComponentOrientation().equals(ComponentOrientation.RIGHT_TO_LEFT)) { + throw new Error("unexpected component orientation"); } int value = scroller.getValue(); if (value != 0) { - throw new IllegalStateException("unexpected scroll value"); + throw new Error("unexpected scroll value"); } int extent = viewport.getExtentSize().width; if (extent != scroller.getVisibleAmount()) { - throw new IllegalStateException("unexpected visible amount"); + throw new Error("unexpected visible amount"); } int size = viewport.getViewSize().width; if (size != scroller.getMaximum()) { - throw new IllegalStateException("unexpected maximum"); + throw new Error("unexpected maximum"); } int pos = size - extent - value; if (pos != viewport.getViewPosition().x) { - throw new IllegalStateException("unexpected position"); + throw new Error("unexpected position"); } } } diff --git a/jdk/test/javax/swing/SwingTest.java b/jdk/test/javax/swing/SwingTest.java index 7f486122e8c..006808880eb 100644 --- a/jdk/test/javax/swing/SwingTest.java +++ b/jdk/test/javax/swing/SwingTest.java @@ -21,7 +21,8 @@ * have any questions. */ -import java.io.PrintWriter; +import sun.awt.SunToolkit; +import java.awt.Toolkit; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -30,12 +31,18 @@ import java.util.Iterator; import java.util.Set; import java.util.TreeSet; import javax.swing.JFrame; - -import static javax.swing.SwingUtilities.invokeLater; +import javax.swing.SwingUtilities; /** - * SwingTestHelper is a utility class for writing regression tests + * SwingTest is a utility class for writing regression tests * that require interacting with the UI. + * It uses reflection to invoke all public methods without parameters. + * All static methods are starting on the current thread. + * Other methods including constructor are starting on the EDT. + * Between each method invocation all pending events are processed. + * The methods are sorted by name and invoked in that order. + * Failure of the test is signaled by any method throwing an exception. + * If no methods throw an exception the test is assumed to have passed. * * @author Sergey A. Malenkov */ @@ -44,99 +51,56 @@ final class SwingTest implements Runnable { private static final int WIDTH = 640; private static final int HEIGHT = 480; - public static void start(Class type) { + public static void start(Class type) throws Throwable { new SwingTest(type).start(); } - private final PrintWriter writer = new PrintWriter(System.out, true); + private final Class type; + private final Iterator methods; - private Class type; private JFrame frame; - private Iterator methods; private Object object; private Method method; private Throwable error; private SwingTest(Class type) { + Set methods = new TreeSet(new Comparator() { + public int compare(Method first, Method second) { + return first.getName().compareTo(second.getName()); + } + }); + for (Method method : type.getMethods()) { + if (method.getDeclaringClass().equals(type)) { + if (method.getReturnType().equals(void.class)) { + if (0 == method.getParameterTypes().length) { + methods.add(method); + } + } + } + } this.type = type; + this.methods = methods.iterator(); } public void run() { - synchronized (this.writer) { - if (this.error != null) { - this.frame.dispose(); - this.frame = null; - } - else if (this.object == null) { - invoke(); - Set methods = new TreeSet(new Comparator() { - public int compare(Method first, Method second) { - return first.getName().compareTo(second.getName()); - } - }); - for (Method method : this.type.getMethods()) { - if (method.getDeclaringClass().equals(this.type)) { - if (method.getReturnType().equals(void.class)) { - if (0 == method.getParameterTypes().length) { - methods.add(method); - } - } - } - } - this.methods = methods.iterator(); - } - else if (this.method != null) { - invoke(); - } - else if (this.methods.hasNext()) { - this.method = this.methods.next(); - } - else { - this.frame.dispose(); - this.frame = null; - this.type = null; - } - this.writer.notifyAll(); - } - } - - private void start() { - synchronized (this.writer) { - while (this.type != null) { - if ((this.method != null) && Modifier.isStatic(this.method.getModifiers())) { - invoke(); - } - else { - invokeLater(this); - try { - this.writer.wait(); - } - catch (InterruptedException exception) { - exception.printStackTrace(this.writer); - } - } - if ((this.frame == null) && (this.error != null)) { - throw new Error("unexpected error", this.error); - } - } - } - } - - private void invoke() { try { - if (this.method != null) { - this.writer.println(this.method); - this.method.invoke(this.object); - this.method = null; - } - else { - this.writer.println(this.type); + if (this.object == null) { + System.out.println(this.type); this.frame = new JFrame(this.type.getSimpleName()); this.frame.setSize(WIDTH, HEIGHT); this.frame.setLocationRelativeTo(null); - this.object = this.type.getConstructor(JFrame.class).newInstance(this.frame); + this.object = this.type.getConstructor(this.frame.getClass()).newInstance(this.frame); this.frame.setVisible(true); } + else if (this.method != null) { + System.out.println(this.method); + this.method.invoke(this.object); + } + else { + System.out.println((this.error == null) ? "PASSED" : "FAILED"); // NON-NLS: debug + this.frame.dispose(); + this.frame = null; + } } catch (NoSuchMethodException exception) { this.error = exception; @@ -156,5 +120,29 @@ final class SwingTest implements Runnable { catch (InvocationTargetException exception) { this.error = exception.getTargetException(); } + System.out.flush(); + this.method = this.methods.hasNext() && (this.error == null) + ? this.methods.next() + : null; + } + + private void start() throws Throwable { + do { + if ((this.method != null) && Modifier.isStatic(this.method.getModifiers())) { + run(); // invoke static method on the current thread + } + else { + SwingUtilities.invokeLater(this); // invoke on the event dispatch thread + } + Toolkit tk = Toolkit.getDefaultToolkit(); + if (tk instanceof SunToolkit) { + SunToolkit stk = (SunToolkit) tk; + stk.realSync(); // wait until done + } + } + while (this.frame != null); + if (this.error != null) { + throw this.error; + } } } From 426d2a0ee7502bbb428a2b85926f45642fe71a10 Mon Sep 17 00:00:00 2001 From: Alexey Utkin Date: Fri, 31 Jul 2009 17:24:27 +0400 Subject: [PATCH 13/51] 6851688: Hung up in applet application Reviewed-by: art, dcherepanov --- jdk/src/windows/native/sun/windows/awt_Toolkit.cpp | 6 +++--- jdk/src/windows/native/sun/windows/awt_Toolkit.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp index 5158ef6c43e..b612bd1bf16 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -1596,18 +1596,18 @@ void AwtToolkit::RegisterEmbedderProcessId(HWND embedder) } JNIEnv* AwtToolkit::m_env; -HANDLE AwtToolkit::m_thread; +DWORD AwtToolkit::m_threadId; void AwtToolkit::SetEnv(JNIEnv *env) { if (m_env != NULL) { // If already cashed (by means of embeddedInit() call). return; } - m_thread = GetCurrentThread(); + m_threadId = GetCurrentThreadId(); m_env = env; } JNIEnv* AwtToolkit::GetEnv() { - return (m_env == NULL || m_thread != GetCurrentThread()) ? + return (m_env == NULL || m_threadId != GetCurrentThreadId()) ? (JNIEnv*)JNU_GetEnv(jvm, JNI_VERSION_1_2) : m_env; } diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.h b/jdk/src/windows/native/sun/windows/awt_Toolkit.h index 0673201d026..efaf9ff8432 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.h +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.h @@ -442,7 +442,7 @@ public: private: static JNIEnv *m_env; - static HANDLE m_thread; + static DWORD m_threadId; public: static void SetEnv(JNIEnv *env); static JNIEnv* GetEnv(); From 82eb86f2beac59294365b1b267500ca8da921439 Mon Sep 17 00:00:00 2001 From: Sergey Groznyh Date: Mon, 3 Aug 2009 19:22:02 +0400 Subject: [PATCH 14/51] 6539700: JTextPane line wrap radically different from previous versions in jre 1.5.0_10+ Reviewed-by: peterz --- .../classes/javax/swing/text/GlyphView.java | 25 +--- .../javax/swing/text/ParagraphView.java | 30 +---- .../text/GlyphView/6539700/bug6539700.java | 114 ++++++++++++++++++ 3 files changed, 116 insertions(+), 53 deletions(-) create mode 100644 jdk/test/javax/swing/text/GlyphView/6539700/bug6539700.java diff --git a/jdk/src/share/classes/javax/swing/text/GlyphView.java b/jdk/src/share/classes/javax/swing/text/GlyphView.java index 087e9201545..64db8cd6cd1 100644 --- a/jdk/src/share/classes/javax/swing/text/GlyphView.java +++ b/jdk/src/share/classes/javax/swing/text/GlyphView.java @@ -540,30 +540,7 @@ public class GlyphView extends View implements TabableView, Cloneable { */ @Override public float getMinimumSpan(int axis) { - switch (axis) { - case View.X_AXIS: - if (minimumSpan < 0) { - minimumSpan = 0; - int p0 = getStartOffset(); - int p1 = getEndOffset(); - while (p1 > p0) { - int breakSpot = getBreakSpot(p0, p1); - if (breakSpot == BreakIterator.DONE) { - // the rest of the view is non-breakable - breakSpot = p0; - } - minimumSpan = Math.max(minimumSpan, - getPartialSpan(breakSpot, p1)); - // Note: getBreakSpot returns the *last* breakspot - p1 = breakSpot - 1; - } - } - return minimumSpan; - case View.Y_AXIS: - return super.getMinimumSpan(axis); - default: - throw new IllegalArgumentException("Invalid axis: " + axis); - } + return super.getMinimumSpan(axis); } /** diff --git a/jdk/src/share/classes/javax/swing/text/ParagraphView.java b/jdk/src/share/classes/javax/swing/text/ParagraphView.java index 2b5f7826a08..c02ea4d810e 100644 --- a/jdk/src/share/classes/javax/swing/text/ParagraphView.java +++ b/jdk/src/share/classes/javax/swing/text/ParagraphView.java @@ -721,35 +721,7 @@ public class ParagraphView extends FlowView implements TabExpander { @Override protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { - r = super.calculateMinorAxisRequirements(axis, r); - - float min = 0; - float glue = 0; - int n = getLayoutViewCount(); - for (int i = 0; i < n; i++) { - View v = getLayoutView(i); - float span = v.getMinimumSpan(axis); - if (v.getBreakWeight(axis, 0, v.getMaximumSpan(axis)) - > View.BadBreakWeight) { - // find the longest non-breakable fragments at the view edges - int p0 = v.getStartOffset(); - int p1 = v.getEndOffset(); - float start = findEdgeSpan(v, axis, p0, p0, p1); - float end = findEdgeSpan(v, axis, p1, p0, p1); - glue += start; - min = Math.max(min, Math.max(span, glue)); - glue = end; - } else { - // non-breakable view - glue += span; - min = Math.max(min, glue); - } - } - r.minimum = Math.max(r.minimum, (int) min); - r.preferred = Math.max(r.minimum, r.preferred); - r.maximum = Math.max(r.preferred, r.maximum); - - return r; + return super.calculateMinorAxisRequirements(axis, r); } /** diff --git a/jdk/test/javax/swing/text/GlyphView/6539700/bug6539700.java b/jdk/test/javax/swing/text/GlyphView/6539700/bug6539700.java new file mode 100644 index 00000000000..8d83f2e22d4 --- /dev/null +++ b/jdk/test/javax/swing/text/GlyphView/6539700/bug6539700.java @@ -0,0 +1,114 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6539700 + * @summary test that the long space-less lines are correctly soft-wrapped + * @author Sergey Groznyh + * @run main bug6539700 + */ + +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; +import javax.swing.text.ParagraphView; +import javax.swing.text.View; + +public class bug6539700 { + static JFrame f; + static JEditorPane ep; + static String text = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAA"; + static int size = 100; + static Class rowClass = null; + + static void createContentPane() { + ep = new JEditorPane(); + ep.setContentType("text/html"); + ep.setEditable(false); + ep.setText(text); + f = new JFrame(); + f.setSize(size, 2 * size); + f.add(ep); + f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + f.setVisible(true); + } + + static void checkRows(View v, boolean last) { + int width = (int) v.getPreferredSpan(View.X_AXIS); + + if (v.getClass() == rowClass) { + // Row width shouldn't exceed the container width + if (width > size) { + throw new RuntimeException("too long row: " + width); + } + + // Row shouldn't be too short (except for the last one) + if (!last) { + if (width < size * 2 / 3) { + throw new RuntimeException("too short row: " + width); + } + } + } + + int n = v.getViewCount(); + if (n > 0) { + for (int i = 0; i < n; i++) { + View c = v.getView(i); + checkRows(c, i == n - 1); + } + } + } + + public static void main(String[] argv) { + try { + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + createContentPane(); + } + }); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + + Class[] pvchildren = ParagraphView.class.getDeclaredClasses(); + for (Class c : pvchildren) { + if (c.getName().equals("javax.swing.text.ParagraphView$Row")) { + rowClass = c; + break; + } + } + if (rowClass == null) { + throw new RuntimeException("can't find ParagraphView.Row class"); + } + + SwingUtilities.invokeLater(new Runnable() { + public void run() { + checkRows(ep.getUI().getRootView(ep), true); + } + }); + + System.out.println("OK"); + } +} From 22c0a5cddfb8e7c26b687f6d276d431f2da5c4f4 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 4 Aug 2009 17:26:41 -0700 Subject: [PATCH 15/51] 6867671: javap whitespace formatting issues Reviewed-by: mcimadamore --- .../com/sun/tools/javap/AttributeWriter.java | 182 +++++++++++------- .../com/sun/tools/javap/BasicWriter.java | 54 +++++- .../com/sun/tools/javap/ClassWriter.java | 96 +++++---- .../com/sun/tools/javap/CodeWriter.java | 62 +++--- .../com/sun/tools/javap/ConstantWriter.java | 35 +++- .../com/sun/tools/javap/JavapTask.java | 32 +++ .../classes/com/sun/tools/javap/Options.java | 2 + 7 files changed, 297 insertions(+), 166 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java index ba190beea24..47c8e460188 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java @@ -41,7 +41,6 @@ import com.sun.tools.classfile.DefaultAttribute; import com.sun.tools.classfile.Deprecated_attribute; import com.sun.tools.classfile.EnclosingMethod_attribute; import com.sun.tools.classfile.Exceptions_attribute; -import com.sun.tools.classfile.Field; import com.sun.tools.classfile.InnerClasses_attribute; import com.sun.tools.classfile.LineNumberTable_attribute; import com.sun.tools.classfile.LocalVariableTable_attribute; @@ -149,22 +148,26 @@ public class AttributeWriter extends BasicWriter } public Void visitAnnotationDefault(AnnotationDefault_attribute attr, Void ignore) { - println(" AnnotationDefault: "); - print(" default_value: "); + println("AnnotationDefault:"); + indent(+1); + print("default_value: "); annotationWriter.write(attr.default_value); + indent(-1); return null; } public Void visitCharacterRangeTable(CharacterRangeTable_attribute attr, Void ignore) { - print(" CharacterRangeTable: "); + println("CharacterRangeTable:"); + indent(+1); for (int i = 0; i < attr.character_range_table.length; i++) { CharacterRangeTable_attribute.Entry e = attr.character_range_table[i]; print(" " + e.start_pc + ", " + e.end_pc + ", " + Integer.toHexString(e.character_range_start) + ", " + Integer.toHexString(e.character_range_end) + ", " + - Integer.toHexString(e.flags) + - "\t// "); + Integer.toHexString(e.flags)); + tab(); + print("// "); print(e.start_pc + ", " + e.end_pc + ", " + (e.character_range_start >> 10) + ":" + (e.character_range_start & 0x3ff) + ", " + @@ -187,16 +190,13 @@ public class AttributeWriter extends BasicWriter print(", branch-true"); if ((e.flags & CharacterRangeTable_attribute.CRT_BRANCH_FALSE) != 0) print(", branch-false"); - - - } + indent(-1); return null; } public Void visitCode(Code_attribute attr, Void ignore) { codeWriter.write(attr, constant_pool); - println(); return null; } @@ -207,25 +207,23 @@ public class AttributeWriter extends BasicWriter public Void visitConstantValue(ConstantValue_attribute attr, Void ignore) { if (options.compat) // BUG 6622216 javap names some attributes incorrectly - print(" Constant value: "); + print("Constant value: "); else - print(" ConstantValue: "); + print("ConstantValue: "); constantWriter.write(attr.constantvalue_index); - if (!options.compat) // BUG 6622232 javap gets whitespace confused - println(); + println(); return null; } public Void visitDeprecated(Deprecated_attribute attr, Void ignore) { - if (!(options.compat && owner instanceof Field)) // BUG 6622232 javap gets whitespace confused - print(" "); println("Deprecated: true"); return null; } public Void visitEnclosingMethod(EnclosingMethod_attribute attr, Void ignore) { - print(" EnclosingMethod: #" + attr.class_index + ".#" + attr.method_index - + "\t// " + getJavaClassName(attr)); + print("EnclosingMethod: #" + attr.class_index + ".#" + attr.method_index); + tab(); + print("// " + getJavaClassName(attr)); if (attr.method_index != 0) print("." + getMethodName(attr)); println(); @@ -249,15 +247,16 @@ public class AttributeWriter extends BasicWriter } public Void visitExceptions(Exceptions_attribute attr, Void ignore) { - println(" Exceptions: "); - print(" throws "); + println("Exceptions:"); + indent(+1); + print("throws "); for (int i = 0; i < attr.number_of_exceptions; i++) { if (i > 0) print(", "); print(getJavaException(attr, i)); } - if (!options.compat) // BUG 6622232 javap gets whitespace confused - println(); + println(); + indent(-1); return null; } @@ -290,8 +289,7 @@ public class AttributeWriter extends BasicWriter writeInnerClassHeader(); first = false; } - if (!options.compat) // BUG 6622232: javap gets whitespace confused - print(" "); + print(" "); for (String name: access_flags.getInnerClassModifiers()) print(name + " "); if (info.inner_name_index!=0) { @@ -313,6 +311,8 @@ public class AttributeWriter extends BasicWriter println(); } } + if (!first) + indent(-1); return null; } @@ -325,26 +325,28 @@ public class AttributeWriter extends BasicWriter } private void writeInnerClassHeader() { - print(" "); if (options.compat) // BUG 6622216: javap names some attributes incorrectly print("InnerClass"); else print("InnerClasses"); println(": "); + indent(+1); } public Void visitLineNumberTable(LineNumberTable_attribute attr, Void ignore) { - println(" LineNumberTable: "); + println("LineNumberTable:"); + indent(+1); for (LineNumberTable_attribute.Entry entry: attr.line_number_table) { - println(" line " + entry.line_number + ": " + entry.start_pc); + println("line " + entry.line_number + ": " + entry.start_pc); } + indent(-1); return null; } public Void visitLocalVariableTable(LocalVariableTable_attribute attr, Void ignore) { - println(" LocalVariableTable: "); - println(" Start Length Slot Name Signature"); - + println("LocalVariableTable:"); + indent(+1); + println("Start Length Slot Name Signature"); for (LocalVariableTable_attribute.Entry entry : attr.local_variable_table) { Formatter formatter = new Formatter(); println(formatter.format("%8d %7d %5d %5s %s", @@ -352,25 +354,28 @@ public class AttributeWriter extends BasicWriter constantWriter.stringValue(entry.name_index), constantWriter.stringValue(entry.descriptor_index))); } + indent(-1); return null; } public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, Void ignore) { - println(" LocalVariableTypeTable: "); - println(" Start Length Slot Name Signature"); - + println("LocalVariableTypeTable:"); + indent(+1); + println("Start Length Slot Name Signature"); for (LocalVariableTypeTable_attribute.Entry entry : attr.local_variable_table) { - Formatter formatter = new Formatter(); - println(formatter.format("%8d %7d %5d %5s %s", + println(String.format("%5d %7d %5d %5s %s", entry.start_pc, entry.length, entry.index, constantWriter.stringValue(entry.name_index), constantWriter.stringValue(entry.signature_index))); } + indent(-1); return null; } public Void visitModule(Module_attribute attr, Void ignore) { - println(" Module: #" + attr.module_name + "\t// " + getModuleName(attr)); + print("Module: #" + attr.module_name); + tab(); + println("// " + getModuleName(attr)); return null; } @@ -383,11 +388,15 @@ public class AttributeWriter extends BasicWriter } public Void visitModuleExportTable(ModuleExportTable_attribute attr, Void ignore) { - println(" ModuleExportTable:"); - println(" Types: (" + attr.export_type_table.length + ")"); + println("ModuleExportTable:"); + indent(+1); + println("Types: (" + attr.export_type_table.length + ")"); for (int i = 0; i < attr.export_type_table.length; i++) { - println(" #" + attr.export_type_table[i] + "\t// " + getExportTypeName(attr, i)); + print("#" + attr.export_type_table[i]); + tab(); + println("// " + getExportTypeName(attr, i)); } + indent(-1); return null; } @@ -400,11 +409,15 @@ public class AttributeWriter extends BasicWriter } public Void visitModuleMemberTable(ModuleMemberTable_attribute attr, Void ignore) { - println(" ModuleMemberTable:"); - println(" Packages: (" + attr.package_member_table.length + ")"); + println("ModuleMemberTable:"); + indent(+1); + println("Packages: (" + attr.package_member_table.length + ")"); for (int i = 0; i < attr.package_member_table.length; i++) { - println(" #" + attr.package_member_table[i] + "\t// " + getPackageMemberName(attr, i)); + print("#" + attr.package_member_table[i]); + tab(); + println("// " + getPackageMemberName(attr, i)); } + indent(-1); return null; } @@ -417,73 +430,91 @@ public class AttributeWriter extends BasicWriter } public Void visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, Void ignore) { - println(" RuntimeVisibleAnnotations: "); + println("RuntimeVisibleAnnotations:"); + indent(+1); for (int i = 0; i < attr.annotations.length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.annotations[i]); println(); } + indent(-1); return null; } public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, Void ignore) { - println(" RuntimeInvisibleAnnotations: "); + println("RuntimeInvisibleAnnotations:"); + indent(+1); for (int i = 0; i < attr.annotations.length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.annotations[i]); println(); } + indent(-1); return null; } public Void visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute attr, Void ignore) { - println(" RuntimeVisibleTypeAnnotations: "); + println("RuntimeVisibleTypeAnnotations:"); + indent(+1); for (int i = 0; i < attr.annotations.length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.annotations[i]); println(); } + indent(-1); return null; } public Void visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute attr, Void ignore) { - println(" RuntimeInvisibleTypeAnnotations: "); + println("RuntimeInvisibleTypeAnnotations:"); + indent(+1); for (int i = 0; i < attr.annotations.length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.annotations[i]); println(); } + indent(-1); return null; } public Void visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, Void ignore) { - println(" RuntimeVisibleParameterAnnotations: "); + println("RuntimeVisibleParameterAnnotations:"); + indent(+1); for (int param = 0; param < attr.parameter_annotations.length; param++) { - println(" parameter " + param + ": "); + println("parameter " + param + ": "); + indent(+1); for (int i = 0; i < attr.parameter_annotations[param].length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.parameter_annotations[param][i]); println(); } + indent(-1); } + indent(-1); return null; } public Void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, Void ignore) { - println(" RuntimeInvisibleParameterAnnotations: "); + println("RuntimeInvisibleParameterAnnotations:"); + indent(+1); for (int param = 0; param < attr.parameter_annotations.length; param++) { - println(" " + param + ": "); + println(param + ": "); + indent(+1); for (int i = 0; i < attr.parameter_annotations[param].length; i++) { - print(" " + i + ": "); + print(i + ": "); annotationWriter.write(attr.parameter_annotations[param][i]); println(); } + indent(-1); } + indent(-1); return null; } public Void visitSignature(Signature_attribute attr, Void ignore) { - println(" Signature: #" + attr.signature_index + "\t// " + getSignature(attr)); + print("Signature: #" + attr.signature_index); + tab(); + println("// " + getSignature(attr)); return null; } @@ -496,12 +527,12 @@ public class AttributeWriter extends BasicWriter } public Void visitSourceDebugExtension(SourceDebugExtension_attribute attr, Void ignore) { - println(" SourceDebugExtension: " + attr.getValue()); + println("SourceDebugExtension: " + attr.getValue()); return null; } public Void visitSourceFile(SourceFile_attribute attr, Void ignore) { - println(" SourceFile: \"" + getSourceFile(attr) + "\""); + println("SourceFile: \"" + getSourceFile(attr) + "\""); return null; } @@ -519,24 +550,26 @@ public class AttributeWriter extends BasicWriter } public Void visitStackMap(StackMap_attribute attr, Void ignore) { - println(" StackMap: number_of_entries = " + attr.number_of_entries); - + println("StackMap: number_of_entries = " + attr.number_of_entries); + indent(+1); StackMapTableWriter w = new StackMapTableWriter(); for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { w.write(entry); } println(); + indent(-1); return null; } public Void visitStackMapTable(StackMapTable_attribute attr, Void ignore) { - println(" StackMapTable: number_of_entries = " + attr.number_of_entries); - + println("StackMapTable: number_of_entries = " + attr.number_of_entries); + indent(+1); StackMapTableWriter w = new StackMapTableWriter(); for (StackMapTable_attribute.stack_map_frame entry : attr.entries) { w.write(entry); } println(); + indent(-1); return null; } @@ -555,29 +588,37 @@ public class AttributeWriter extends BasicWriter public Void visit_same_locals_1_stack_item_frame(StackMapTable_attribute.same_locals_1_stack_item_frame frame, Void p) { printHeader(frame); println(" /* same_locals_1_stack_item */"); + indent(+1); printMap("stack", frame.stack); + indent(-1); return null; } public Void visit_same_locals_1_stack_item_frame_extended(StackMapTable_attribute.same_locals_1_stack_item_frame_extended frame, Void p) { printHeader(frame); println(" /* same_locals_1_stack_item_frame_extended */"); - println(" offset_delta = " + frame.offset_delta); + indent(+1); + println("offset_delta = " + frame.offset_delta); printMap("stack", frame.stack); + indent(-1); return null; } public Void visit_chop_frame(StackMapTable_attribute.chop_frame frame, Void p) { printHeader(frame); println(" /* chop */"); - println(" offset_delta = " + frame.offset_delta); + indent(+1); + println("offset_delta = " + frame.offset_delta); + indent(-1); return null; } public Void visit_same_frame_extended(StackMapTable_attribute.same_frame_extended frame, Void p) { printHeader(frame); println(" /* same_frame_extended */"); - println(" offset_delta = " + frame.offset_delta); + indent(+1); + println("offset_delta = " + frame.offset_delta); + indent(-1); return null; } @@ -592,13 +633,16 @@ public class AttributeWriter extends BasicWriter public Void visit_full_frame(StackMapTable_attribute.full_frame frame, Void p) { printHeader(frame); if (frame instanceof StackMap_attribute.stack_map_frame) { - println(" offset = " + frame.offset_delta); + indent(+1); + println(" offset = " + frame.offset_delta); } else { println(" /* full_frame */"); - println(" offset_delta = " + frame.offset_delta); + indent(+1); + println("offset_delta = " + frame.offset_delta); } printMap("locals", frame.locals); printMap("stack", frame.stack); + indent(-1); return null; } @@ -607,7 +651,7 @@ public class AttributeWriter extends BasicWriter } void printMap(String name, StackMapTable_attribute.verification_type_info[] map) { - print(" " + name + " = ["); + print(name + " = ["); for (int i = 0; i < map.length; i++) { StackMapTable_attribute.verification_type_info info = map[i]; int tag = info.tag; diff --git a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java index 0f80004bacd..dc971dc68da 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java @@ -71,6 +71,18 @@ public class BasicWriter { lineWriter.println(); } + protected void indent(int delta) { + lineWriter.indent(delta); + } + + protected void tab() { + lineWriter.tab(); + } + + protected void setPendingNewline(boolean b) { + lineWriter.pendingNewline = b; + } + protected String report(AttributeException e) { out.println("Error: " + e.getMessage()); // i18n? return "???"; @@ -122,19 +134,30 @@ public class BasicWriter { protected LineWriter(Context context) { context.put(LineWriter.class, this); + Options options = Options.instance(context); + indentWidth = options.indentWidth; + tabColumn = options.tabColumn; out = context.get(PrintWriter.class); buffer = new StringBuilder(); } protected void print(String s) { + if (pendingNewline) { + println(); + pendingNewline = false; + } if (s == null) s = "null"; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); - if (c == '\n') { - println(); - } else { - buffer.append(c); + switch (c) { + case '\n': + println(); + break; + default: + if (buffer.length() == 0) + indent(); + buffer.append(c); } } @@ -145,8 +168,31 @@ public class BasicWriter { buffer.setLength(0); } + protected void indent(int delta) { + indentCount += delta; + } + + protected void tab() { + if (buffer.length() == 0) + indent(); + space(indentCount * indentWidth + tabColumn - buffer.length()); + } + + private void indent() { + space(indentCount * indentWidth); + } + + private void space(int n) { + for (int i = 0; i < n; i++) + buffer.append(' '); + } + private PrintWriter out; private StringBuilder buffer; + private int indentCount; + private int indentWidth; + private int tabColumn; + private boolean pendingNewline; } } diff --git a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java index 4500c365c37..9d657ee4d55 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java @@ -120,6 +120,7 @@ public class ClassWriter extends BasicWriter { else println("Classfile " + uri); } + indent(+1); if (lastModified != -1) { Date lm = new Date(lastModified); DateFormat df = DateFormat.getDateInstance(); @@ -144,6 +145,10 @@ public class ClassWriter extends BasicWriter { println("Compiled from \"" + getSourceFile((SourceFile_attribute) sfa) + "\""); } + if ((options.sysInfo || options.verbose) && !options.compat) { + indent(-1); + } + String name = getJavaName(classFile); AccessFlags flags = cf.access_flags; @@ -186,23 +191,24 @@ public class ClassWriter extends BasicWriter { if (options.verbose) { println(); + indent(+1); attrWriter.write(cf, cf.attributes, constant_pool); - println(" minor version: " + cf.minor_version); - println(" major version: " + cf.major_version); + println("minor version: " + cf.minor_version); + println("major version: " + cf.major_version); if (!options.compat) - writeList(" flags: ", flags.getClassFlags(), NEWLINE); + writeList("flags: ", flags.getClassFlags(), NEWLINE); + indent(-1); constantWriter.writeConstantPool(); - println(); } else { - if (!options.compat) - print(" "); + print(" "); } println("{"); + indent(+1); writeFields(); writeMethods(); + indent(-1); println("}"); - println(); } protected void writeFields() { @@ -215,14 +221,6 @@ public class ClassWriter extends BasicWriter { if (!options.checkAccess(f.access_flags)) return; - if (!(options.showLineAndLocalVariableTables - || options.showDisassembled - || options.verbose - || options.showInternalSignatures - || options.showAllAttrs)) { - print(" "); - } - AccessFlags flags = f.access_flags; writeModifiers(flags.getFieldModifiers()); Signature_attribute sigAttr = getSignature(f.attributes); @@ -251,11 +249,13 @@ public class ClassWriter extends BasicWriter { print(";"); println(); + indent(+1); + if (options.showInternalSignatures) - println(" Signature: " + getValue(f.descriptor)); + println("Signature: " + getValue(f.descriptor)); if (options.verbose && !options.compat) - writeList(" flags: ", flags.getFieldFlags(), NEWLINE); + writeList("flags: ", flags.getFieldFlags(), NEWLINE); if (options.showAllAttrs) { for (Attribute attr: f.attributes) @@ -263,6 +263,8 @@ public class ClassWriter extends BasicWriter { println(); } + indent(-1); + if (options.showDisassembled || options.showLineAndLocalVariableTables) println(); } @@ -270,6 +272,7 @@ public class ClassWriter extends BasicWriter { protected void writeMethods() { for (Method m: classFile.methods) writeMethod(m); + setPendingNewline(false); } protected void writeMethod(Method m) { @@ -278,14 +281,6 @@ public class ClassWriter extends BasicWriter { method = m; - if (!(options.showLineAndLocalVariableTables - || options.showDisassembled - || options.verbose - || options.showInternalSignatures - || options.showAllAttrs)) { - print(" "); - } - AccessFlags flags = m.access_flags; Descriptor d; @@ -333,16 +328,6 @@ public class ClassWriter extends BasicWriter { if (e_attr != null) { // if there are generic exceptions, there must be erased exceptions if (e_attr instanceof Exceptions_attribute) { Exceptions_attribute exceptions = (Exceptions_attribute) e_attr; - if (options.compat) { // Bug XXXXXXX whitespace - if (!(options.showLineAndLocalVariableTables - || options.showDisassembled - || options.verbose - || options.showInternalSignatures - || options.showAllAttrs)) { - print(" "); - } - print(" "); - } print(" throws "); if (methodExceptions != null) { // use generic list if available writeList("", methodExceptions, ""); @@ -358,14 +343,17 @@ public class ClassWriter extends BasicWriter { } } - print(";"); - println(); + println(";"); - if (options.showInternalSignatures) - println(" Signature: " + getValue(m.descriptor)); + indent(+1); - if (options.verbose && !options.compat) - writeList(" flags: ", flags.getMethodFlags(), NEWLINE); + if (options.showInternalSignatures) { + println("Signature: " + getValue(m.descriptor)); + } + + if (options.verbose && !options.compat) { + writeList("flags: ", flags.getMethodFlags(), NEWLINE); + } Code_attribute code = null; Attribute c_attr = m.attributes.get(Attribute.Code); @@ -378,33 +366,35 @@ public class ClassWriter extends BasicWriter { if (options.showDisassembled && !options.showAllAttrs) { if (code != null) { - println(" Code:"); + println("Code:"); codeWriter.writeInstrs(code); codeWriter.writeExceptionTable(code); } - println(); } if (options.showLineAndLocalVariableTables) { - if (code != null) + if (code != null) { attrWriter.write(code, code.attributes.get(Attribute.LineNumberTable), constant_pool); - println(); - if (code != null) attrWriter.write(code, code.attributes.get(Attribute.LocalVariableTable), constant_pool); - println(); - println(); + } } if (options.showAllAttrs) { Attribute[] attrs = m.attributes.attrs; for (Attribute attr: attrs) attrWriter.write(m, attr, constant_pool); - -// // the following condition is to mimic old javap -// if (!(attrs.length > 0 && -// attrs[attrs.length - 1] instanceof Exceptions_attribute)) - println(); } + + indent(-1); + + // set pendingNewline to write a newline before the next method (if any) + // if a separator is desired + setPendingNewline( + options.showDisassembled || + options.showAllAttrs || + options.showInternalSignatures || + options.showLineAndLocalVariableTables || + options.verbose); } void writeModifiers(Collection items) { diff --git a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java index 975e3621536..04508494395 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java @@ -69,11 +69,13 @@ class CodeWriter extends BasicWriter { } void write(Code_attribute attr, ConstantPool constant_pool) { - println(" Code:"); + println("Code:"); + indent(+1); writeVerboseHeader(attr, constant_pool); writeInstrs(attr); writeExceptionTable(attr); attrWriter.write(attr, attr.attributes, constant_pool); + indent(-1); } public void writeVerboseHeader(Code_attribute attr, ConstantPool constant_pool) { @@ -90,9 +92,9 @@ class CodeWriter extends BasicWriter { argCount = report(e); } - println(" Stack=" + attr.max_stack + - ", Locals=" + attr.max_locals + - ", Args_size=" + argCount); + println("stack=" + attr.max_stack + + ", locals=" + attr.max_locals + + ", args_size=" + argCount); } @@ -115,8 +117,7 @@ class CodeWriter extends BasicWriter { } public void writeInstr(Instruction instr) { - print(" " + instr.getPC() + ":\t"); - print(instr.getMnemonic()); + print(String.format("%4d: %-12s ", instr.getPC(), instr.getMnemonic())); instr.accept(instructionPrinter, null); println(); } @@ -134,54 +135,62 @@ class CodeWriter extends BasicWriter { } public Void visitBranch(Instruction instr, int offset, Void p) { - print("\t" + (instr.getPC() + offset)); + print((instr.getPC() + offset)); return null; } public Void visitConstantPoolRef(Instruction instr, int index, Void p) { - print("\t#" + index + "; //"); + print("#" + index + ";"); + tab(); + print("// "); printConstant(index); return null; } public Void visitConstantPoolRefAndValue(Instruction instr, int index, int value, Void p) { - print("\t#" + index + ", " + value + "; //"); + print("#" + index + ", " + value + ";"); + tab(); + print("// "); printConstant(index); return null; } public Void visitLocal(Instruction instr, int index, Void p) { - print("\t" + index); + print(index); return null; } public Void visitLocalAndValue(Instruction instr, int index, int value, Void p) { - print("\t" + index + ", " + value); + print(index + ", " + value); return null; } public Void visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets) { int pc = instr.getPC(); - print("{ //" + npairs); + print("{ // " + npairs); + indent(+1); for (int i = 0; i < npairs; i++) { - print("\n\t\t" + matches[i] + ": " + (pc + offsets[i]) + ";"); + print("\n" + matches[i] + ": " + (pc + offsets[i]) + ";"); } - print("\n\t\tdefault: " + (pc + default_) + " }"); + print("\ndefault: " + (pc + default_) + " }"); + indent(-1); return null; } public Void visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets) { int pc = instr.getPC(); print("{ //" + low + " to " + high); + indent(+1); for (int i = 0; i < offsets.length; i++) { - print("\n\t\t" + (low + i) + ": " + (pc + offsets[i]) + ";"); + print("\n" + (low + i) + ": " + (pc + offsets[i]) + ";"); } - print("\n\t\tdefault: " + (pc + default_) + " }"); + print("\ndefault: " + (pc + default_) + " }"); + indent(-1); return null; } public Void visitValue(Instruction instr, int value, Void p) { - print("\t" + value); + print(value); return null; } @@ -193,13 +202,13 @@ class CodeWriter extends BasicWriter { public void writeExceptionTable(Code_attribute attr) { if (attr.exception_table_langth > 0) { - println(" Exception table:"); - println(" from to target type"); + println("Exception table:"); + indent(+1); + println(" from to target type"); for (int i = 0; i < attr.exception_table.length; i++) { Code_attribute.Exception_data handler = attr.exception_table[i]; - printFixedWidthInt(handler.start_pc, 6); - printFixedWidthInt(handler.end_pc, 6); - printFixedWidthInt(handler.handler_pc, 6); + print(String.format(" %5d %5d %5d", + handler.start_pc, handler.end_pc, handler.handler_pc)); print(" "); int catch_type = handler.catch_type; if (catch_type == 0) { @@ -207,9 +216,9 @@ class CodeWriter extends BasicWriter { } else { print("Class "); println(constantWriter.stringValue(catch_type)); - println(""); } } + indent(-1); } } @@ -218,13 +227,6 @@ class CodeWriter extends BasicWriter { constantWriter.write(index); } - private void printFixedWidthInt(int n, int width) { - String s = String.valueOf(n); - for (int i = s.length(); i < width; i++) - print(" "); - print(s); - } - private List getDetailWriters(Code_attribute attr) { List detailWriters = new ArrayList(); diff --git a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java index c84cc57a0d4..5a53beb33ed 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java @@ -62,7 +62,9 @@ public class ConstantWriter extends BasicWriter { protected void writeConstantPool(ConstantPool constant_pool) { ConstantPool.Visitor v = new ConstantPool.Visitor() { public Integer visitClass(CONSTANT_Class_info info, Void p) { - println("#" + info.name_index + ";\t// " + stringValue(info)); + print("#" + info.name_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } @@ -72,7 +74,9 @@ public class ConstantWriter extends BasicWriter { } public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) { - println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); + print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } @@ -87,7 +91,9 @@ public class ConstantWriter extends BasicWriter { } public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) { - println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); + print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } @@ -97,18 +103,23 @@ public class ConstantWriter extends BasicWriter { } public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) { - String tab = (options.compat ? "" : "\t"); // BUG 6622232 javap gets whitespace confused - println("#" + info.name_index + ":#" + info.type_index + ";" + tab + "// " + stringValue(info)); + print("#" + info.name_index + ":#" + info.type_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) { - println("#" + info.class_index + ".#" + info.name_and_type_index + ";\t// " + stringValue(info)); + print("#" + info.class_index + ".#" + info.name_and_type_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } public Integer visitString(CONSTANT_String_info info, Void p) { - println("#" + info.string_index + ";\t// " + stringValue(info)); + print("#" + info.string_index + ";"); + tab(); + println("// " + stringValue(info)); return 1; } @@ -118,17 +129,21 @@ public class ConstantWriter extends BasicWriter { } }; - println(" Constant pool:"); + println("Constant pool:"); + indent(+1); + int width = String.valueOf(constant_pool.size()).length() + 1; int cpx = 1; while (cpx < constant_pool.size()) { + print(String.format("const %" + width + "s", ("#" + cpx))); try { CPInfo cpInfo = constant_pool.get(cpx); - print("const #" + cpx + " = " + tagName(cpInfo.getTag()) + "\t"); + print(String.format(" = %-15s ", tagName(cpInfo.getTag()))); cpx += cpInfo.accept(v, null); } catch (ConstantPool.InvalidIndex ex) { - print("const #" + cpx); // should not happen + // should not happen } } + indent(-1); } protected void write(int cpx) { diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java index f86534f923c..39e927559bf 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java @@ -295,6 +295,38 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { void process(JavapTask task, String opt, String arg) { task.options.showInnerClasses = true; } + }, + + new Option(false, "-XDindent:") { + @Override + boolean matches(String opt) { + int sep = opt.indexOf(":"); + return sep != -1 && super.matches(opt.substring(0, sep + 1)); + } + + void process(JavapTask task, String opt, String arg) throws BadArgs { + int sep = opt.indexOf(":"); + try { + task.options.indentWidth = Integer.valueOf(opt.substring(sep + 1)); + } catch (NumberFormatException e) { + } + } + }, + + new Option(false, "-XDtab:") { + @Override + boolean matches(String opt) { + int sep = opt.indexOf(":"); + return sep != -1 && super.matches(opt.substring(0, sep + 1)); + } + + void process(JavapTask task, String opt, String arg) throws BadArgs { + int sep = opt.indexOf(":"); + try { + task.options.tabColumn = Integer.valueOf(opt.substring(sep + 1)); + } catch (NumberFormatException e) { + } + } } }; diff --git a/langtools/src/share/classes/com/sun/tools/javap/Options.java b/langtools/src/share/classes/com/sun/tools/javap/Options.java index e6b37345582..0ff78a7edd2 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/Options.java +++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java @@ -86,6 +86,8 @@ public class Options { public boolean showConstants; public boolean sysInfo; public boolean showInnerClasses; + public int indentWidth = 2; // #spaces per indentWidth level + public int tabColumn = 40; // column number for comments public boolean compat; // bug-for-bug compatibility mode with old javap public boolean jsr277; From ea9763ee2450a90e1308d006b6f9a38e1b920376 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 5 Aug 2009 07:43:50 -0700 Subject: [PATCH 16/51] 6868553: 6867671 breaks some tests Reviewed-by: mcimadamore --- .../share/classes/com/sun/tools/javap/AttributeWriter.java | 2 +- langtools/test/tools/javac/code/ArrayClone.java | 2 +- langtools/test/tools/javap/4111861/T4111861.java | 2 +- langtools/test/tools/javap/T4884240.java | 6 +++--- langtools/test/tools/javap/T4975569.java | 4 ++-- langtools/test/tools/javap/stackmap/T6271292.sh | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java index 47c8e460188..42567342b31 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java +++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java @@ -329,7 +329,7 @@ public class AttributeWriter extends BasicWriter print("InnerClass"); else print("InnerClasses"); - println(": "); + println(":"); indent(+1); } diff --git a/langtools/test/tools/javac/code/ArrayClone.java b/langtools/test/tools/javac/code/ArrayClone.java index ce1126bcf14..650f2604b8d 100644 --- a/langtools/test/tools/javac/code/ArrayClone.java +++ b/langtools/test/tools/javac/code/ArrayClone.java @@ -48,7 +48,7 @@ public class ArrayClone { System.out.println(out); for (String line: out.split("\n")) { - String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+; //Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;"; + String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+;[ \t]+// Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;"; if (line.matches(match)) return; } diff --git a/langtools/test/tools/javap/4111861/T4111861.java b/langtools/test/tools/javap/4111861/T4111861.java index b722d80b41a..6491ed9900d 100644 --- a/langtools/test/tools/javap/4111861/T4111861.java +++ b/langtools/test/tools/javap/4111861/T4111861.java @@ -89,7 +89,7 @@ public class T4111861 { String line; while ((line = in.readLine()) != null) { if (line.indexOf("public static final") > 0) { - sb.append(line); + sb.append(line.trim()); sb.append('\n'); } } diff --git a/langtools/test/tools/javap/T4884240.java b/langtools/test/tools/javap/T4884240.java index f2f36167760..91256aa82ee 100644 --- a/langtools/test/tools/javap/T4884240.java +++ b/langtools/test/tools/javap/T4884240.java @@ -46,9 +46,9 @@ public class T4884240 { pw.close(); String[] lines = sw.toString().split("\n"); if (lines.length < 3 - || !lines[0].startsWith("Classfile") - || !lines[1].startsWith("Last modified") - || !lines[2].startsWith("MD5")) { + || !lines[0].trim().startsWith("Classfile") + || !lines[1].trim().startsWith("Last modified") + || !lines[2].trim().startsWith("MD5")) { System.out.println(sw); throw new Exception("unexpected output"); } diff --git a/langtools/test/tools/javap/T4975569.java b/langtools/test/tools/javap/T4975569.java index 4b029c6c118..48a5777bc70 100644 --- a/langtools/test/tools/javap/T4975569.java +++ b/langtools/test/tools/javap/T4975569.java @@ -40,10 +40,10 @@ public class T4975569 verify("T4975569$Anno", "flags: ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION"); verify("T4975569$E", "flags: ACC_FINAL, ACC_SUPER, ACC_ENUM"); verify("T4975569$S", "flags: ACC_BRIDGE, ACC_SYNTHETIC", - "InnerClasses: \n static"); + "InnerClasses:\n static"); verify("T4975569$V", "void m(java.lang.String...)", "flags: ACC_VARARGS"); - verify("T4975569$Prot", "InnerClasses: \n protected"); + verify("T4975569$Prot", "InnerClasses:\n protected"); //verify("T4975569$Priv", "InnerClasses"); if (errors > 0) throw new Error(errors + " found."); diff --git a/langtools/test/tools/javap/stackmap/T6271292.sh b/langtools/test/tools/javap/stackmap/T6271292.sh index 2726b1acfc4..7a0e1abbf54 100644 --- a/langtools/test/tools/javap/stackmap/T6271292.sh +++ b/langtools/test/tools/javap/stackmap/T6271292.sh @@ -75,7 +75,7 @@ grep "frame_type" "${JAVAPFILE}" > "${OUTFILE}" grep "offset_delta" "${JAVAPFILE}" >> "${OUTFILE}" grep "stack = " "${JAVAPFILE}" >> "${OUTFILE}" grep "locals = " "${JAVAPFILE}" >> "${OUTFILE}" -diff "${OUTFILE}" "${TESTSRC}${FS}T6271292.out" +diff -w "${OUTFILE}" "${TESTSRC}${FS}T6271292.out" result="$?" if [ "$result" -eq 0 ] then From 9e26dc467b2cb282f987e75a5f122ce881b1d0f5 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 5 Aug 2009 08:38:18 -0700 Subject: [PATCH 17/51] 6729471: javap should accept class files on the command line Reviewed-by: mcimadamore --- .../com/sun/tools/javap/JavapTask.java | 131 ++++++++++++++---- langtools/test/tools/javap/T6729471.java | 109 +++++++++++++++ 2 files changed, 216 insertions(+), 24 deletions(-) create mode 100644 langtools/test/tools/javap/T6729471.java diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java index 39e927559bf..1c26fd4028f 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java @@ -32,8 +32,10 @@ import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; +import java.io.Reader; import java.io.StringWriter; import java.io.Writer; +import java.net.URI; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -49,6 +51,8 @@ import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; +import javax.lang.model.element.Modifier; +import javax.lang.model.element.NestingKind; import javax.tools.Diagnostic; import javax.tools.DiagnosticListener; import javax.tools.JavaFileManager; @@ -57,6 +61,9 @@ import javax.tools.StandardJavaFileManager; import javax.tools.StandardLocation; import com.sun.tools.classfile.*; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLConnection; /** * "Main" class for javap, normally accessed from the command line @@ -607,30 +614,10 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { protected boolean writeClass(ClassWriter classWriter, String className) throws IOException, ConstantPoolException { - JavaFileObject fo; - if (className.endsWith(".class")) { - if (fileManager instanceof StandardJavaFileManager) { - StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; - fo = sfm.getJavaFileObjects(className).iterator().next(); - } else { - reportError("err.not.standard.file.manager", className); - return false; - } - } else { - fo = getClassFileObject(className); - if (fo == null) { - // see if it is an inner class, by replacing dots to $, starting from the right - String cn = className; - int lastDot; - while (fo == null && (lastDot = cn.lastIndexOf(".")) != -1) { - cn = cn.substring(0, lastDot) + "$" + cn.substring(lastDot + 1); - fo = getClassFileObject(cn); - } - } - if (fo == null) { - reportError("err.class.not.found", className); - return false; - } + JavaFileObject fo = open(className); + if (fo == null) { + reportError("err.class.not.found", className); + return false; } ClassFileInfo cfInfo = read(fo); @@ -675,6 +662,102 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { return true; } + protected JavaFileObject open(String className) throws IOException { + // for compatibility, first see if it is a class name + JavaFileObject fo = getClassFileObject(className); + if (fo != null) + return fo; + + // see if it is an inner class, by replacing dots to $, starting from the right + String cn = className; + int lastDot; + while ((lastDot = cn.lastIndexOf(".")) != -1) { + cn = cn.substring(0, lastDot) + "$" + cn.substring(lastDot + 1); + fo = getClassFileObject(cn); + if (fo != null) + return fo; + } + + if (!className.endsWith(".class")) + return null; + + if (fileManager instanceof StandardJavaFileManager) { + StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager; + fo = sfm.getJavaFileObjects(className).iterator().next(); + if (fo != null && fo.getLastModified() != 0) { + return fo; + } + } + + // see if it is a URL, and if so, wrap it in just enough of a JavaFileObject + // to suit javap's needs + if (className.matches("^[A-Za-z]+:.*")) { + try { + final URI uri = new URI(className); + final URL url = uri.toURL(); + final URLConnection conn = url.openConnection(); + return new JavaFileObject() { + public Kind getKind() { + return JavaFileObject.Kind.CLASS; + } + + public boolean isNameCompatible(String simpleName, Kind kind) { + throw new UnsupportedOperationException(); + } + + public NestingKind getNestingKind() { + throw new UnsupportedOperationException(); + } + + public Modifier getAccessLevel() { + throw new UnsupportedOperationException(); + } + + public URI toUri() { + return uri; + } + + public String getName() { + return url.toString(); + } + + public InputStream openInputStream() throws IOException { + return conn.getInputStream(); + } + + public OutputStream openOutputStream() throws IOException { + throw new UnsupportedOperationException(); + } + + public Reader openReader(boolean ignoreEncodingErrors) throws IOException { + throw new UnsupportedOperationException(); + } + + public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { + throw new UnsupportedOperationException(); + } + + public Writer openWriter() throws IOException { + throw new UnsupportedOperationException(); + } + + public long getLastModified() { + return conn.getLastModified(); + } + + public boolean delete() { + throw new UnsupportedOperationException(); + } + + }; + } catch (URISyntaxException ignore) { + } catch (IOException ignore) { + } + } + + return null; + } + public static class ClassFileInfo { ClassFileInfo(JavaFileObject fo, ClassFile cf, byte[] digest, int size) { this.fo = fo; diff --git a/langtools/test/tools/javap/T6729471.java b/langtools/test/tools/javap/T6729471.java new file mode 100644 index 00000000000..964850e42df --- /dev/null +++ b/langtools/test/tools/javap/T6729471.java @@ -0,0 +1,109 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + + +/* + * @test + * @bug 6729471 + * @summary javap does not output inner interfaces of an interface + */ + +import java.io.*; +import java.util.*; + +public class T6729471 +{ + public static void main(String... args) { + new T6729471().run(); + } + + void run() { + // simple class + verify("java.util.Map", + "public abstract boolean containsKey(java.lang.Object)"); + + // inner class + verify("java.util.Map.Entry", + "public abstract K getKey()"); + + // file name + verify("../classes/tools/javap/T6729471.class", + "public static void main(java.lang.String...)"); + + // file url + verify("file:../classes/tools/javap/T6729471.class", + "public static void main(java.lang.String...)"); + + // jar url: rt.jar + File java_home = new File(System.getProperty("java.home")); + if (java_home.getName().equals("jre")) + java_home = java_home.getParentFile(); + File rt_jar = new File(new File(new File(java_home, "jre"), "lib"), "rt.jar"); + verify("jar:file:" + rt_jar + "!/java/util/Map.class", + "public abstract boolean containsKey(java.lang.Object)"); + + // jar url: ct.sym, if it exists + File ct_sym = new File(new File(java_home, "lib"), "ct.sym"); + if (ct_sym.exists()) { + verify("jar:file:" + ct_sym + "!/META-INF/sym/rt.jar/java/util/Map.class", + "public abstract boolean containsKey(java.lang.Object)"); + } else + System.err.println("warning: ct.sym not found"); + + if (errors > 0) + throw new Error(errors + " found."); + } + + void verify(String className, String... expects) { + String output = javap(className); + for (String expect: expects) { + if (output.indexOf(expect)< 0) + error(expect + " not found"); + } + } + + void error(String msg) { + System.err.println(msg); + errors++; + } + + int errors; + + String javap(String className) { + String testClasses = System.getProperty("test.classes", "."); + StringWriter sw = new StringWriter(); + PrintWriter out = new PrintWriter(sw); + String[] args = { "-classpath", testClasses, className }; + int rc = com.sun.tools.javap.Main.run(args, out); + out.close(); + String output = sw.toString(); + System.out.println("class " + className); + System.out.println(output); + if (rc != 0) + throw new Error("javap failed. rc=" + rc); + if (output.indexOf("Error:") != -1) + throw new Error("javap reported error."); + return output; + } +} + From 872d3ebfc728132613a43a8f41fcf4abf0bc5955 Mon Sep 17 00:00:00 2001 From: Lillian Angel Date: Thu, 6 Aug 2009 16:04:47 +0100 Subject: [PATCH 18/51] 6593649: Word wrap broken for JTextArea Layout correctly resizes components based on actual dimensions of the window they are in. Reviewed-by: gsm --- .../javax/swing/text/WrappedPlainView.java | 36 +++++++- .../javax/swing/JTextArea/Test6593649.java | 89 +++++++++++++++++++ 2 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 jdk/test/javax/swing/JTextArea/Test6593649.java diff --git a/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java b/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java index fb7aede7374..b845419ad78 100644 --- a/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java +++ b/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java @@ -327,13 +327,45 @@ public class WrappedPlainView extends BoxView implements TabExpander { /** * Return reasonable default values for the view dimensions. The standard * text terminal size 80x24 is pretty suitable for the wrapped plain view. + * + * The size should not be larger than the component housing the view's + * container. */ private float getDefaultSpan(int axis) { + Container host = getContainer(); + Component parent = null; + + if (host != null) { + parent = host.getParent(); + } + switch (axis) { case View.X_AXIS: - return 80 * metrics.getWidths()['M']; + int defaultWidth = 80 * metrics.getWidths()['M']; + int parentWidth = 0; + + if (parent != null) { + parentWidth = parent.getWidth(); + } + + if (defaultWidth > parentWidth) { + return parentWidth; + } + return defaultWidth; + case View.Y_AXIS: - return 24 * metrics.getHeight(); + int defaultHeight = 24 * metrics.getHeight(); + int parentHeight = 0; + + if (parent != null) { + parentHeight = parent.getHeight(); + } + + if (defaultHeight > parentHeight) { + return parentHeight; + } + return defaultHeight; + default: throw new IllegalArgumentException("Invalid axis: " + axis); } diff --git a/jdk/test/javax/swing/JTextArea/Test6593649.java b/jdk/test/javax/swing/JTextArea/Test6593649.java new file mode 100644 index 00000000000..8de478b3825 --- /dev/null +++ b/jdk/test/javax/swing/JTextArea/Test6593649.java @@ -0,0 +1,89 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* @test + @bug 6593649 + @summary Word wrap does not work in JTextArea: long lines are not wrapped + @author Lillian Angel + @run main Test6593649 +*/ + +import javax.swing.*; +import java.awt.*; + +public class Test6593649 extends JFrame { + static JTextArea txt; + static JPanel innerPanel; + + public Test6593649(Dimension d) + { + super("Word Wrap Testcase"); + + setSize(d); + + final Container contentPane = getContentPane(); + + innerPanel = new JPanel(); + innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.LINE_AXIS)); + + txt = new JTextArea("This is a long line that should wrap, but doesn't..."); + txt.setLineWrap(true); + txt.setWrapStyleWord(true); + + innerPanel.add(txt); + + contentPane.add(innerPanel, BorderLayout.SOUTH); + } + + public static void main(String[] args) throws InterruptedException + { + int size = 100; + Dimension d; + Test6593649 cp; + Dimension txtSize; + Dimension innerSize; + Dimension cpSize; + + while (size <= 600) + { + d = new Dimension(size, size); + cp = new Test6593649(d); + cp.setVisible(true); + + txtSize = txt.getPreferredSize(); + innerSize = innerPanel.getPreferredSize(); + cpSize = cp.getSize(); + + if (!(txtSize.getWidth() == innerPanel.getWidth() && txtSize.getHeight() == innerPanel.getHeight() && + txtSize.getWidth() <= cpSize.getWidth() && txtSize.getHeight() <= cpSize.getHeight())) + { + throw new RuntimeException("Test failed: Text area size does not properly match panel and frame sizes"); + } + + Thread.sleep(2000); + + cp.hide(); + size += 50; + } + } +} From d78b7fcc9b04134c94242f4368e9f92baa75b330 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 6 Aug 2009 19:35:41 -0700 Subject: [PATCH 19/51] 6858429: javap classfile library a minor bug Reviewed-by: ksrini --- .../src/share/classes/com/sun/tools/classfile/ClassWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java index 96ae0cfa452..8f8a6edab5e 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java @@ -435,7 +435,7 @@ public class ClassWriter { } public Void visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, ClassOutputStream out) { - out.writeByte(attr.local_variable_table.length); + out.writeShort(attr.local_variable_table.length); for (LocalVariableTypeTable_attribute.Entry e: attr.local_variable_table) writeLocalVariableTypeTableEntry(e, out); return null; From 24fdb8e4be217007eb3a6e772a77af0db10d529d Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 7 Aug 2009 19:06:56 +0400 Subject: [PATCH 20/51] 6868189: Nested enum class with custom BeanInfo fails Reviewed-by: peterz --- .../com/sun/beans/finder/BeanInfoFinder.java | 2 +- .../java/beans/Introspector/Test6868189.java | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/beans/Introspector/Test6868189.java diff --git a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java index 3e1c37c2d57..faab85cafa9 100644 --- a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java +++ b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java @@ -48,7 +48,7 @@ public final class BeanInfoFinder } private static boolean isValid(Class type, Method method) { - return (method != null) && type.equals(method.getDeclaringClass()); + return (method != null) && method.getDeclaringClass().isAssignableFrom(type); } @Override diff --git a/jdk/test/java/beans/Introspector/Test6868189.java b/jdk/test/java/beans/Introspector/Test6868189.java new file mode 100644 index 00000000000..3aa10aa6d86 --- /dev/null +++ b/jdk/test/java/beans/Introspector/Test6868189.java @@ -0,0 +1,66 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6868189 + * @summary Tests custom BeanInfo in the same package + * @author Sergey Malenkov + */ + +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +public class Test6868189 { + + private static final String PROPERTY = "$?"; // NON-NLS: the property name + private static final String GETTER = "name"; // NON-NLS: the method name + private static final String SETTER = null; + + public static void main(String[] args) throws IntrospectionException { + PropertyDescriptor[] pds = Introspector.getBeanInfo(Enumeration.class).getPropertyDescriptors(); + if ((pds.length != 1)|| !PROPERTY.equals(pds[0].getName())){ + throw new Error("unexpected property"); + } + } + + public enum Enumeration { + FIRST, SECOND + } + + public static class EnumerationBeanInfo extends SimpleBeanInfo { + @Override + public PropertyDescriptor[] getPropertyDescriptors() { + try { + return new PropertyDescriptor[] { + new PropertyDescriptor(PROPERTY, Enumeration.class, GETTER, SETTER) + }; + } + catch (IntrospectionException exception) { + throw new Error("unexpected exception", exception); + } + } + } +} From 1d2b6d72b22b81cffb041a5668270ef8618d1e92 Mon Sep 17 00:00:00 2001 From: Abhijit Saha Date: Fri, 7 Aug 2009 11:27:00 -0700 Subject: [PATCH 21/51] 6813167: 6u14 JAX-WS audit mutable static bugs 6803688: Integrate latest JAX-WS (2.1.6) in to JDK 6u14 Reviewed-by: darcy, ramap --- jaxws/THIRD_PARTY_README | 2 +- jaxws/jaxws.patch | 81929 ++++++++++++++++ jaxws/patch.out | 1402 + .../sun/codemodel/internal/JAnnotatable.java | 1 + .../codemodel/internal/JAnnotationUse.java | 3 +- .../codemodel/internal/JAnnotationWriter.java | 1 + .../com/sun/codemodel/internal/JBlock.java | 8 + .../sun/codemodel/internal/JCommentPart.java | 20 +- .../sun/codemodel/internal/JDirectClass.java | 1 + .../com/sun/codemodel/internal/JExpr.java | 8 +- .../com/sun/codemodel/internal/JJavaName.java | 1 + .../com/sun/codemodel/internal/JMethod.java | 5 +- .../com/sun/codemodel/internal/JPackage.java | 27 +- .../sun/codemodel/internal/JTypeWildcard.java | 1 + .../internal/TypedAnnotationWriter.java | 1 + .../sun/codemodel/internal/fmt/package.html | 29 - .../sun/codemodel/internal/package-info.java | 1 + .../internal/util/EncoderFactory.java | 3 +- .../internal/util/MS1252Encoder.java | 3 +- .../internal/writer/FilterCodeWriter.java | 1 + .../com/sun/istack/internal/Builder.java | 33 + .../classes/com/sun/istack/internal/Pool.java | 30 +- .../XMLStreamReaderToContentHandler.java | 32 +- .../internal/localization/Localizable.java | 63 + .../localization/LocalizableMessage.java | 56 + .../LocalizableMessageFactory.java} | 25 +- .../internal/localization/Localizer.java | 149 + .../ws/AnnotationProcessorFactoryImpl.java | 5 - .../sun/tools/internal/jxc/ConfigReader.java | 1 + .../internal/jxc/MessageBundle.properties | 5 +- .../com/sun/tools/internal/jxc/Messages.java | 1 + .../tools/internal/jxc/SchemaGenerator.java | 1 + .../internal/jxc/SchemaGeneratorFacade.java | 56 + .../internal/jxc/apt/AnnotationParser.java | 1 + .../apt/AnnotationProcessorFactoryImpl.java | 1 + .../com/sun/tools/internal/jxc/apt/Const.java | 1 + .../internal/jxc/apt/ErrorReceiverImpl.java | 1 + .../jxc/apt/InlineAnnotationReaderImpl.java | 1 + .../internal/jxc/apt/MessageBundle.properties | 1 - .../sun/tools/internal/jxc/apt/Messages.java | 1 + .../sun/tools/internal/jxc/apt/Options.java | 1 + .../internal/jxc/apt/SchemaGenerator.java | 1 + .../internal/jxc/gen/config/Classes.java | 100 +- .../tools/internal/jxc/gen/config/Config.java | 94 +- .../tools/internal/jxc/gen/config/Schema.java | 138 +- .../tools/internal/jxc/gen/config/config.xsd | 2 + .../internal/jxc/model/nav/APTNavigator.java | 3 +- .../com/sun/tools/internal/ws/Invoker.java | 24 +- .../ws/api/TJavaGeneratorExtension.java | 1 + .../tools/internal/ws/api/WsgenExtension.java | 43 + .../tools/internal/ws/api/WsgenProtocol.java | 52 + .../internal/ws/api/wsdl/TWSDLExtensible.java | 2 + .../internal/ws/api/wsdl/TWSDLExtension.java | 1 + .../ws/api/wsdl/TWSDLExtensionHandler.java | 1 + .../internal/ws/api/wsdl/TWSDLOperation.java | 1 + .../ws/api/wsdl/TWSDLParserContext.java | 1 + .../sun/tools/internal/ws/package-info.java | 22 +- .../ws/processor/generator/GeneratorBase.java | 4 +- .../ws/processor/generator/SeiGenerator.java | 34 +- .../processor/generator/ServiceGenerator.java | 217 +- .../W3CAddressingJavaGeneratorExtension.java | 3 - .../internal/ws/processor/model/Port.java | 2 + .../ws/processor/model/java/JavaMethod.java | 30 +- .../ws/processor/model/jaxb/JAXBType.java | 4 +- .../modeler/annotation/WebServiceAP.java | 1 + .../modeler/annotation/WebServiceVisitor.java | 33 +- .../WebServiceWrapperGenerator.java | 8 +- .../modeler/wsdl/ConsoleErrorReporter.java | 7 + .../modeler/wsdl/PseudoSchemaBuilder.java | 3 +- .../processor/modeler/wsdl/WSDLModeler.java | 112 +- .../modeler/wsdl/WSDLModelerBase.java | 30 +- .../ws/processor/util/ClassNameCollector.java | 6 +- .../ws/resources/GeneratorMessages.java | 24 + .../internal/ws/resources/ModelMessages.java | 31 +- .../ws/resources/ModelerMessages.java | 38 +- .../ws/resources/WebserviceapMessages.java | 1242 +- .../ws/resources/WscompileMessages.java | 166 +- .../internal/ws/resources/WsdlMessages.java | 132 +- .../ws/resources/configuration.properties | 1 - .../ws/resources/generator.properties | 3 +- .../ws/resources/javacompiler.properties | 1 - .../internal/ws/resources/model.properties | 10 +- .../internal/ws/resources/modeler.properties | 15 +- .../ws/resources/processor.properties | 1 - .../internal/ws/resources/util.properties | 1 - .../ws/resources/webserviceap.properties | 25 +- .../ws/resources/wscompile.properties | 66 +- .../internal/ws/resources/wsdl.properties | 48 +- .../sun/tools/internal/ws/version.properties | 8 +- .../internal/ws/wscompile/AbortException.java | 1 - .../tools/internal/ws/wscompile/AuthInfo.java | 64 + .../ws/wscompile/BadCommandLineException.java | 1 - .../ws/wscompile/DefaultAuthTester.java | 66 + .../ws/wscompile/DefaultAuthenticator.java | 154 + .../internal/ws/wscompile/ErrorReceiver.java | 5 +- .../ws/wscompile/ErrorReceiverFilter.java | 5 +- .../ws/wscompile/JavaCompilerHelper.java | 9 +- .../tools/internal/ws/wscompile/Options.java | 7 +- .../internal/ws/wscompile/WsgenOptions.java | 45 +- .../internal/ws/wscompile/WsgenTool.java | 47 +- .../ws/wscompile/WsimportListener.java | 3 +- .../ws/wscompile/WsimportOptions.java | 75 +- .../internal/ws/wscompile/WsimportTool.java | 69 +- .../internal/ws/wsdl/document/Message.java | 7 +- .../ws/wsdl/document/jaxws/JAXWSBinding.java | 9 - .../ws/wsdl/framework/AbstractDocument.java | 17 +- .../parser/AbstractReferenceFinderImpl.java | 1 - .../internal/ws/wsdl/parser/DOMBuilder.java | 1 - .../internal/ws/wsdl/parser/DOMForest.java | 118 +- .../ws/wsdl/parser/DOMForestParser.java | 94 + .../ws/wsdl/parser/DOMForestScanner.java | 1 - .../ws/wsdl/parser/InternalizationLogic.java | 1 - .../internal/ws/wsdl/parser/Internalizer.java | 306 +- ...rSubmissionAddressingExtensionHandler.java | 3 - .../ws/wsdl/parser/MetadataFinder.java | 90 +- .../ws/wsdl/parser/NamespaceContextImpl.java | 33 +- .../ws/wsdl/parser/VersionChecker.java | 1 - .../parser/W3CAddressingExtensionHandler.java | 3 - .../wsdl/parser/WSDLInternalizationLogic.java | 8 +- .../internal/ws/wsdl/parser/WSDLParser.java | 9 +- .../ws/wsdl/parser/WhitespaceStripper.java | 1 - .../internal/xjc/ClassLoaderBuilder.java | 122 + .../com/sun/tools/internal/xjc/Driver.java | 15 +- .../com/sun/tools/internal/xjc/Language.java | 1 + .../internal/xjc/MessageBundle.properties | 113 +- .../sun/tools/internal/xjc/ModelLoader.java | 8 +- .../com/sun/tools/internal/xjc/Options.java | 101 +- .../internal/xjc/ProgressCodeWriter.java | 1 + .../sun/tools/internal/xjc/SchemaCache.java | 1 + .../com/sun/tools/internal/xjc/XJCFacade.java | 79 + .../sun/tools/internal/xjc/XJCListener.java | 1 + .../xjc/addon/at_generated/PluginImpl.java | 1 + .../xjc/addon/code_injector/Const.java | 1 + .../xjc/addon/code_injector/PluginImpl.java | 1 + .../xjc/addon/episode/PluginImpl.java | 1 + .../xjc/addon/episode/package-info.java | 1 + .../internal/xjc/api/ClassNameAllocator.java | 1 + .../tools/internal/xjc/api/J2SJAXBModel.java | 1 + .../sun/tools/internal/xjc/api/Reference.java | 1 + .../tools/internal/xjc/api/S2JJAXBModel.java | 1 + .../internal/xjc/api/SchemaCompiler.java | 4 + .../tools/internal/xjc/api/SpecVersion.java | 10 +- .../internal/xjc/api/TypeAndAnnotation.java | 1 + .../xjc/api/impl/j2s/JAXBModelImpl.java | 1 + .../xjc/api/impl/j2s/JavaCompilerImpl.java | 1 + .../xjc/api/impl/s2j/AbstractMappingImpl.java | 1 + .../xjc/api/impl/s2j/BeanMappingImpl.java | 1 + .../api/impl/s2j/DowngradingErrorHandler.java | 1 + .../xjc/api/impl/s2j/ElementAdapter.java | 1 + .../impl/s2j/ElementCollectionAdapter.java | 1 + .../xjc/api/impl/s2j/ElementMappingImpl.java | 1 + .../api/impl/s2j/ElementSingleAdapter.java | 1 + .../xjc/api/impl/s2j/PropertyImpl.java | 1 + .../xjc/api/impl/s2j/SchemaCompilerImpl.java | 7 +- .../api/impl/s2j/TypeAndAnnotationImpl.java | 1 + .../sun/tools/internal/xjc/api/package.html | 2 +- .../internal/xjc/api/util/APTClassLoader.java | 1 + .../xjc/api/util/FilerCodeWriter.java | 1 + .../internal/xjc/api/util/Messages.properties | 2 - .../api/util/ToolsJarNotFoundException.java | 1 + .../ri/OverrideAnnotationOfWriter.java | 37 + .../annotation/spec/XmlElementRefWriter.java | 2 + .../xjc/generator/bean/BeanGenerator.java | 10 +- .../bean/DualObjectFactoryGenerator.java | 1 + .../generator/bean/ElementOutlineImpl.java | 14 +- .../generator/bean/ImplStructureStrategy.java | 1 + .../generator/bean/MessageBundle.properties | 11 +- .../xjc/generator/bean/MethodWriter.java | 1 + .../bean/ObjectFactoryGeneratorImpl.java | 9 +- .../generator/bean/PackageOutlineImpl.java | 7 +- .../bean/PrivateObjectFactoryGenerator.java | 1 + .../bean/PublicObjectFactoryGenerator.java | 1 + .../generator/bean/field/AbstractField.java | 33 +- .../bean/field/AbstractFieldWithVar.java | 15 +- .../bean/field/AbstractListField.java | 4 +- .../xjc/generator/bean/field/ArrayField.java | 101 +- .../bean/field/ConstFieldRenderer.java | 3 +- .../bean/field/ContentListField.java | 176 + .../bean/field/DefaultFieldRenderer.java | 17 +- .../generator/bean/field/DummyListField.java | 152 + .../generator/bean/field/FieldRenderer.java | 2 +- .../bean/field/FieldRendererFactory.java | 7 + .../bean/field/IsSetFieldRenderer.java | 2 +- .../bean/field/MessageBundle.properties | 1 - .../xjc/generator/bean/field/Messages.java | 2 +- .../bean/field/NoExtendedContentField.java | 187 + .../xjc/generator/bean/field/SingleField.java | 6 +- .../field/SinglePrimitiveAccessField.java | 1 + .../generator/bean/field/UnboxedField.java | 6 +- .../bean/field/UntypedListFieldRenderer.java | 18 +- .../internal/xjc/generator/package-info.java | 1 + .../internal/xjc/model/AbstractCElement.java | 1 + .../xjc/model/AbstractCTypeInfoImpl.java | 1 + .../xjc/model/AutoClassNameAllocator.java | 1 + .../tools/internal/xjc/model/CAdapter.java | 1 + .../tools/internal/xjc/model/CArrayInfo.java | 8 +- .../xjc/model/CAttributePropertyInfo.java | 1 + .../internal/xjc/model/CBuiltinLeafInfo.java | 5 +- .../sun/tools/internal/xjc/model/CClass.java | 1 + .../tools/internal/xjc/model/CClassInfo.java | 24 +- .../internal/xjc/model/CClassInfoParent.java | 1 + .../tools/internal/xjc/model/CClassRef.java | 1 + .../internal/xjc/model/CCustomizable.java | 1 + .../internal/xjc/model/CCustomizations.java | 1 + .../internal/xjc/model/CDefaultValue.java | 1 + .../tools/internal/xjc/model/CElement.java | 1 + .../internal/xjc/model/CElementInfo.java | 20 + .../xjc/model/CElementPropertyInfo.java | 1 + .../internal/xjc/model/CEnumConstant.java | 1 + .../tools/internal/xjc/model/CNonElement.java | 1 + .../xjc/model/CPluginCustomization.java | 1 + .../internal/xjc/model/CPropertyInfo.java | 20 +- .../internal/xjc/model/CPropertyVisitor.java | 1 + .../xjc/model/CReferencePropertyInfo.java | 36 +- .../xjc/model/CSingleTypePropertyInfo.java | 2 +- .../tools/internal/xjc/model/CTypeInfo.java | 1 + .../tools/internal/xjc/model/CTypeRef.java | 1 + .../xjc/model/CValuePropertyInfo.java | 1 + .../internal/xjc/model/CWildcardTypeInfo.java | 1 + .../xjc/model/ClassNameAllocatorWrapper.java | 1 + .../sun/tools/internal/xjc/model/Model.java | 1 + .../tools/internal/xjc/model/Populatable.java | 1 + .../sun/tools/internal/xjc/model/TypeUse.java | 1 + .../internal/xjc/model/TypeUseFactory.java | 1 + .../tools/internal/xjc/model/TypeUseImpl.java | 1 + .../internal/xjc/model/nav/EagerNClass.java | 1 + .../internal/xjc/model/nav/EagerNType.java | 1 + .../tools/internal/xjc/model/nav/NClass.java | 1 + .../xjc/model/nav/NClassByJClass.java | 1 + .../xjc/model/nav/NParameterizedType.java | 1 + .../tools/internal/xjc/model/nav/NType.java | 1 + .../internal/xjc/model/nav/NavigatorImpl.java | 1 + .../internal/xjc/model/package-info.java | 1 + .../tools/internal/xjc/outline/Aspect.java | 1 + .../internal/xjc/outline/ClassOutline.java | 3 +- .../internal/xjc/outline/ElementOutline.java | 1 + .../xjc/outline/EnumConstantOutline.java | 1 + .../internal/xjc/outline/EnumOutline.java | 1 + .../sun/tools/internal/xjc/package-info.java | 1 + .../AbstractExtensionBindingChecker.java | 1 + .../sun/tools/internal/xjc/reader/Const.java | 10 +- .../xjc/reader/MessageBundle.properties | 21 +- .../internal/xjc/reader/ModelChecker.java | 1 + .../tools/internal/xjc/reader/RawTypeSet.java | 1 + .../sun/tools/internal/xjc/reader/Ring.java | 1 + .../tools/internal/xjc/reader/dtd/Block.java | 1 + .../internal/xjc/reader/dtd/Element.java | 3 +- .../xjc/reader/dtd/MessageBundle.properties | 21 +- .../internal/xjc/reader/dtd/ModelGroup.java | 1 + .../internal/xjc/reader/dtd/Occurence.java | 1 + .../tools/internal/xjc/reader/dtd/Term.java | 1 + .../xjc/reader/dtd/bindinfo/DOMBuilder.java | 1 + .../xjc/reader/dtd/bindinfo/DOMUtil.java | 1 + .../bindinfo/DTDExtensionBindingChecker.java | 1 + .../dtd/bindinfo/MessageBundle.properties | 5 +- .../xjc/reader/dtd/bindinfo/bindingfile.rng | 1 - .../xjc/reader/dtd/bindinfo/bindingfile.xsd | 3 +- .../internal/xjc/reader/dtd/bindinfo/xjc.xsd | 2 + .../internal/xjc/reader/gbind/Choice.java | 1 + .../xjc/reader/gbind/ConnectedComponent.java | 1 + .../internal/xjc/reader/gbind/Element.java | 14 + .../internal/xjc/reader/gbind/ElementSet.java | 1 + .../xjc/reader/gbind/ElementSets.java | 1 + .../internal/xjc/reader/gbind/Expression.java | 5 +- .../internal/xjc/reader/gbind/Graph.java | 1 + .../internal/xjc/reader/gbind/OneOrMore.java | 1 + .../internal/xjc/reader/gbind/Sequence.java | 1 + .../internal/xjc/reader/gbind/SinkNode.java | 1 + .../internal/xjc/reader/gbind/SourceNode.java | 1 + .../ContentHandlerNamespacePrefixAdapter.java | 1 + .../internalizer/MessageBundle.properties | 29 +- .../internalizer/NamespaceContextImpl.java | 34 +- .../internalizer/SCDBasedBindingSet.java | 1 + .../internalizer/WhitespaceStripper.java | 5 - .../xjc/reader/relaxng/BindStyle.java | 1 + .../reader/relaxng/ContentModelBinder.java | 3 +- .../xjc/reader/relaxng/DatatypeLib.java | 1 + .../xjc/reader/relaxng/DefineFinder.java | 1 + .../xjc/reader/relaxng/NameCalculator.java | 1 + .../xjc/reader/relaxng/RELAXNGCompiler.java | 1 + .../xjc/reader/relaxng/RawTypeSetBuilder.java | 1 + .../xjc/reader/relaxng/TypePatternBinder.java | 1 + .../xjc/reader/relaxng/TypeUseBinder.java | 1 + .../xjc/reader/xmlschema/Abstractifier.java | 1 + .../xjc/reader/xmlschema/BGMBuilder.java | 12 + .../xjc/reader/xmlschema/BindBlue.java | 1 + .../xjc/reader/xmlschema/BindGreen.java | 1 + .../xjc/reader/xmlschema/BindPurple.java | 1 + .../xjc/reader/xmlschema/BindRed.java | 14 +- .../xjc/reader/xmlschema/BindYellow.java | 1 + .../reader/xmlschema/BindingComponent.java | 1 + .../reader/xmlschema/ClassBinderFilter.java | 1 + .../xjc/reader/xmlschema/CollisionInfo.java | 5 - .../xjc/reader/xmlschema/ColorBinder.java | 1 + .../xmlschema/DefaultParticleBinder.java | 11 +- .../reader/xmlschema/ExpressionBuilder.java | 1 + .../xmlschema/ExpressionParticleBinder.java | 1 + .../xjc/reader/xmlschema/GElement.java | 1 + .../xjc/reader/xmlschema/GElementImpl.java | 1 + .../reader/xmlschema/GWildcardElement.java | 1 + .../reader/xmlschema/MessageBundle.properties | 102 +- .../xjc/reader/xmlschema/Messages.java | 6 + .../reader/xmlschema/MultiplicityCounter.java | 1 + .../reader/xmlschema/RawTypeSetBuilder.java | 8 +- .../xjc/reader/xmlschema/RefererFinder.java | 1 + .../reader/xmlschema/SimpleTypeBuilder.java | 37 +- .../xmlschema/UnusedCustomizationChecker.java | 23 + .../bindinfo/AnnotationParserFactoryImpl.java | 16 +- .../xmlschema/bindinfo/BIConversion.java | 18 +- .../xmlschema/bindinfo/BIFactoryMethod.java | 64 + .../xmlschema/bindinfo/BIGlobalBinding.java | 7 + .../bindinfo/BIInlineBinaryData.java | 62 + .../reader/xmlschema/bindinfo/BIProperty.java | 67 +- .../xjc/reader/xmlschema/bindinfo/BIXDom.java | 1 + .../bindinfo/BIXPluginCustomization.java | 1 + .../xmlschema/bindinfo/BIXSubstitutable.java | 1 + .../reader/xmlschema/bindinfo/BindInfo.java | 13 +- .../bindinfo/CollectionTypeAttribute.java | 1 + .../xmlschema/bindinfo/DomHandlerEx.java | 1 + .../xmlschema/bindinfo/EnumMemberMode.java | 1 + .../xmlschema/bindinfo/ForkingFilter.java | 5 + .../xmlschema/bindinfo/LocalScoping.java | 1 + .../bindinfo/MessageBundle.properties | 13 +- .../bindinfo/OptionalPropertyMode.java | 1 + .../xjc/reader/xmlschema/bindinfo/binding.rng | 7 + .../xjc/reader/xmlschema/bindinfo/binding.xsd | 36 + .../xmlschema/bindinfo/package-info.java | 1 + .../reader/xmlschema/bindinfo/package.html | 6 +- .../xjc/reader/xmlschema/bindinfo/xjc.xsd | 4 + .../xjc/reader/xmlschema/bindinfo/xs.xsd | 2 + .../AbstractExtendedComplexTypeBuilder.java | 221 + .../ct/ChoiceContentComplexTypeBuilder.java | 1 + .../xmlschema/ct/ComplexTypeBindingMode.java | 9 +- .../xmlschema/ct/ComplexTypeFieldBuilder.java | 3 +- .../ct/ExtendedComplexTypeBuilder.java | 204 +- .../xmlschema/ct/MessageBundle.properties | 1 - .../xjc/reader/xmlschema/ct/Messages.java | 1 + .../xmlschema/ct/MixedComplexTypeBuilder.java | 58 +- .../ct/MixedExtendedComplexTypeBuilder.java | 92 + .../ct/RestrictedComplexTypeBuilder.java | 36 +- .../xmlschema/parser/LSInputSAXWrapper.java | 1 + .../xmlschema/parser/MessageBundle.properties | 14 +- .../xjc/runtime/JAXBContextFactory.java | 1 + .../xjc/runtime/ZeroOneBooleanAdapter.java | 1 + .../internal/xjc/util/ForkContentHandler.java | 2 +- .../internal/xjc/util/ForkEntityResolver.java | 1 + .../xjc/util/MessageBundle.properties | 9 +- .../internal/xjc/util/MimeTypeRange.java | 1 + .../xjc/util/NamespaceContextAdapter.java | 1 + .../internal/xjc/util/ReadOnlyAdapter.java | 1 + .../tools/internal/xjc/util/StringCutter.java | 1 + .../internal/xjc/util/SubtreeCutter.java | 1 + .../internal/bind/AccessorFactoryImpl.java | 13 +- .../sun/xml/internal/bind/AnyTypeAdapter.java | 1 + .../xml/internal/bind/CycleRecoverable.java | 1 + .../internal/bind/DatatypeConverterImpl.java | 34 +- .../com/sun/xml/internal/bind/IDResolver.java | 1 + .../com/sun/xml/internal/bind/Locatable.java | 5 - .../com/sun/xml/internal/bind/Util.java | 1 + .../bind/ValidationEventLocatorEx.java | 5 - .../xml/internal/bind/XmlAccessorFactory.java | 1 - .../bind/annotation/OverrideAnnotationOf.java | 42 + .../internal/bind/annotation/XmlIsSet.java | 1 + .../internal/bind/annotation/XmlLocation.java | 1 + .../internal/bind/api/AccessorException.java | 1 + .../com/sun/xml/internal/bind/api/Bridge.java | 1 + .../xml/internal/bind/api/BridgeContext.java | 1 + .../xml/internal/bind/api/ClassResolver.java | 1 + .../internal/bind/api/CompositeStructure.java | 1 + .../xml/internal/bind/api/ErrorListener.java | 1 + .../xml/internal/bind/api/JAXBRIContext.java | 31 +- .../internal/bind/api}/Messages.java | 15 +- .../internal/bind/api}/Messages.properties | 3 +- .../xml/internal/bind/api/RawAccessor.java | 1 + .../xml/internal/bind/api/TypeReference.java | 14 +- .../internal/bind/api/impl/NameConverter.java | 1 + .../xml/internal/bind/api/impl/NameUtil.java | 26 +- .../xml/internal/bind/api/package-info.java | 1 + .../internal/bind/marshaller/DataWriter.java | 1 + .../bind/marshaller/Messages.properties | 33 +- .../bind/marshaller/MinimumEscapeHandler.java | 31 +- .../marshaller/NamespacePrefixMapper.java | 25 +- .../internal/bind/marshaller/XMLWriter.java | 1 + .../bind/unmarshaller/DOMScanner.java | 1 - .../bind/unmarshaller/Messages.properties | 34 +- .../internal/bind/unmarshaller/Patcher.java | 1 + .../internal/bind/util/AttributesImpl.java | 1 - .../util/ValidationEventLocatorExImpl.java | 5 - .../com/sun/xml/internal/bind/util/Which.java | 5 - .../xml/internal/bind/v2/ClassFactory.java | 44 +- .../xml/internal/bind/v2/ContextFactory.java | 23 +- .../xml/internal/bind/v2/Messages.properties | 1 - .../com/sun/xml/internal/bind/v2/TODO.java | 1 + .../bind/v2/bytecode/ClassTailor.java | 1 + .../AbstractInlineAnnotationReaderImpl.java | 1 + .../v2/model/annotation/AnnotationReader.java | 1 + .../v2/model/annotation/AnnotationSource.java | 1 + .../v2/model/annotation/ClassLocatable.java | 1 + .../v2/model/annotation/FieldLocatable.java | 1 + .../bind/v2/model/annotation/Init.java | 2 +- .../bind/v2/model/annotation/Locatable.java | 1 + .../model/annotation/LocatableAnnotation.java | 11 +- .../bind/v2/model/annotation/Messages.java | 1 + .../v2/model/annotation/Messages.properties | 1 - .../v2/model/annotation/MethodLocatable.java | 1 + .../bind/v2/model/annotation/Quick.java | 1 + .../annotation/RuntimeAnnotationReader.java | 1 + .../RuntimeInlineAnnotationReader.java | 1 + .../model/annotation/XmlSchemaTypeQuick.java | 66 + .../internal/bind/v2/model/core/Adapter.java | 1 + .../bind/v2/model/core/ArrayInfo.java | 1 + .../v2/model/core/AttributePropertyInfo.java | 1 + .../bind/v2/model/core/BuiltinLeafInfo.java | 1 + .../bind/v2/model/core/ClassInfo.java | 1 + .../internal/bind/v2/model/core/Element.java | 1 + .../bind/v2/model/core/ElementInfo.java | 1 + .../v2/model/core/ElementPropertyInfo.java | 1 + .../bind/v2/model/core/EnumConstant.java | 1 + .../bind/v2/model/core/EnumLeafInfo.java | 1 + .../bind/v2/model/core/ErrorHandler.java | 1 + .../xml/internal/bind/v2/model/core/ID.java | 1 + .../internal/bind/v2/model/core/LeafInfo.java | 1 + .../bind/v2/model/core/MapPropertyInfo.java | 1 + .../bind/v2/model/core/MaybeElement.java | 1 + .../bind/v2/model/core/NonElement.java | 10 +- .../bind/v2/model/core/NonElementRef.java | 1 + .../bind/v2/model/core/PropertyInfo.java | 1 + .../bind/v2/model/core/PropertyKind.java | 1 + .../xml/internal/bind/v2/model/core/Ref.java | 1 + .../v2/model/core/ReferencePropertyInfo.java | 6 + .../bind/v2/model/core/RegistryInfo.java | 1 + .../internal/bind/v2/model/core/TypeInfo.java | 1 + .../bind/v2/model/core/TypeInfoSet.java | 1 + .../internal/bind/v2/model/core/TypeRef.java | 1 + .../bind/v2/model/core/ValuePropertyInfo.java | 1 + .../bind/v2/model/core/WildcardMode.java | 1 + .../bind/v2/model/core/WildcardTypeInfo.java | 1 + .../bind/v2/model/core/package-info.java | 1 + .../bind/v2/model/impl/AnyTypeImpl.java | 5 +- .../bind/v2/model/impl/ArrayInfoImpl.java | 13 +- .../model/impl/AttributePropertyInfoImpl.java | 1 + .../v2/model/impl/BuiltinLeafInfoImpl.java | 1 + .../bind/v2/model/impl/ClassInfoImpl.java | 89 +- .../bind/v2/model/impl/DummyPropertyInfo.java | 35 + .../v2/model/impl/ERPropertyInfoImpl.java | 1 + .../bind/v2/model/impl/ElementInfoImpl.java | 1 + .../model/impl/ElementPropertyInfoImpl.java | 1 + .../bind/v2/model/impl/EnumConstantImpl.java | 1 + .../bind/v2/model/impl/EnumLeafInfoImpl.java | 1 + .../bind/v2/model/impl/FieldPropertySeed.java | 1 + .../model/impl/GetterSetterPropertySeed.java | 1 + .../bind/v2/model/impl/LeafInfoImpl.java | 1 + .../v2/model/impl/MapPropertyInfoImpl.java | 1 + .../internal/bind/v2/model/impl/Messages.java | 16 +- .../bind/v2/model/impl/Messages.properties | 44 +- .../bind/v2/model/impl/ModelBuilder.java | 18 + .../bind/v2/model/impl/PropertyInfoImpl.java | 5 +- .../bind/v2/model/impl/PropertySeed.java | 1 + .../model/impl/ReferencePropertyInfoImpl.java | 125 +- .../bind/v2/model/impl/RegistryInfoImpl.java | 1 + .../v2/model/impl/RuntimeAnyTypeImpl.java | 1 + .../v2/model/impl/RuntimeArrayInfoImpl.java | 1 + .../RuntimeAttributePropertyInfoImpl.java | 1 + .../impl/RuntimeBuiltinLeafInfoImpl.java | 160 +- .../v2/model/impl/RuntimeClassInfoImpl.java | 15 +- .../v2/model/impl/RuntimeElementInfoImpl.java | 1 + .../impl/RuntimeElementPropertyInfoImpl.java | 1 + .../model/impl/RuntimeEnumConstantImpl.java | 1 + .../model/impl/RuntimeEnumLeafInfoImpl.java | 1 + .../impl/RuntimeMapPropertyInfoImpl.java | 1 + .../v2/model/impl/RuntimeModelBuilder.java | 17 +- .../RuntimeReferencePropertyInfoImpl.java | 1 + .../v2/model/impl/RuntimeTypeInfoSetImpl.java | 1 + .../v2/model/impl/RuntimeTypeRefImpl.java | 1 + .../impl/RuntimeValuePropertyInfoImpl.java | 1 + .../impl/SingleTypePropertyInfoImpl.java | 5 +- .../bind/v2/model/impl/TypeInfoImpl.java | 1 + .../bind/v2/model/impl/TypeInfoSetImpl.java | 1 + .../bind/v2/model/impl/TypeRefImpl.java | 1 + .../xml/internal/bind/v2/model/impl/Util.java | 1 + .../v2/model/impl/ValuePropertyInfoImpl.java | 1 + .../v2/model/nav/GenericArrayTypeImpl.java | 1 + .../internal/bind/v2/model/nav/Navigator.java | 4 + .../v2/model/nav/ParameterizedTypeImpl.java | 1 + .../v2/model/nav/ReflectionNavigator.java | 5 +- .../bind/v2/model/nav/TypeVisitor.java | 1 + .../bind/v2/model/nav/WildcardTypeImpl.java | 1 + .../v2/model/runtime/RuntimeArrayInfo.java | 1 + .../runtime/RuntimeAttributePropertyInfo.java | 1 + .../model/runtime/RuntimeBuiltinLeafInfo.java | 1 + .../v2/model/runtime/RuntimeClassInfo.java | 1 + .../bind/v2/model/runtime/RuntimeElement.java | 1 + .../v2/model/runtime/RuntimeElementInfo.java | 1 + .../runtime/RuntimeElementPropertyInfo.java | 1 + .../v2/model/runtime/RuntimeEnumLeafInfo.java | 1 + .../v2/model/runtime/RuntimeLeafInfo.java | 1 + .../model/runtime/RuntimeMapPropertyInfo.java | 1 + .../v2/model/runtime/RuntimeNonElement.java | 1 + .../model/runtime/RuntimeNonElementRef.java | 1 + .../v2/model/runtime/RuntimePropertyInfo.java | 1 + .../runtime/RuntimeReferencePropertyInfo.java | 1 + .../v2/model/runtime/RuntimeTypeInfo.java | 1 + .../v2/model/runtime/RuntimeTypeInfoSet.java | 1 + .../bind/v2/model/runtime/RuntimeTypeRef.java | 1 + .../runtime/RuntimeValuePropertyInfo.java | 1 + .../bind/v2/model/runtime/package-info.java | 1 + .../xml/internal/bind/v2/package-info.java | 1 + .../bind/v2/runtime/AnyTypeBeanInfo.java | 13 +- .../bind/v2/runtime/ArrayBeanInfoImpl.java | 14 +- .../bind/v2/runtime/AttributeAccessor.java | 35 + .../internal/bind/v2/runtime/BinderImpl.java | 2 + .../bind/v2/runtime/BridgeAdapter.java | 1 + .../bind/v2/runtime/BridgeContextImpl.java | 1 + .../internal/bind/v2/runtime/BridgeImpl.java | 3 +- .../bind/v2/runtime/ClassBeanInfoImpl.java | 52 +- .../runtime/CompositeStructureBeanInfo.java | 1 + .../internal/bind/v2/runtime/Coordinator.java | 13 +- .../bind/v2/runtime/DomPostInitAction.java | 1 + .../bind/v2/runtime/ElementBeanInfoImpl.java | 13 +- .../bind/v2/runtime/FilterTransducer.java | 1 + .../runtime/IllegalAnnotationException.java | 1 + .../runtime/IllegalAnnotationsException.java | 1 + .../v2/runtime/InlineBinaryTransducer.java | 1 + .../bind/v2/runtime/InternalBridge.java | 1 + .../bind/v2/runtime/JAXBContextImpl.java | 174 +- .../internal/bind/v2/runtime/JaxBeanInfo.java | 65 +- .../bind/v2/runtime/LeafBeanInfoImpl.java | 1 + .../bind/v2/runtime/LifecycleMethods.java | 1 + .../internal/bind/v2/runtime/Location.java | 1 + .../bind/v2/runtime/MarshallerImpl.java | 26 +- .../internal/bind/v2/runtime/Messages.java | 2 + .../bind/v2/runtime/Messages.properties | 22 +- .../bind/v2/runtime/MimeTypedTransducer.java | 1 + .../xml/internal/bind/v2/runtime/Name.java | 1 + .../internal/bind/v2/runtime/NameBuilder.java | 1 + .../internal/bind/v2/runtime/NameList.java | 1 + .../internal/bind/v2/runtime/RuntimeUtil.java | 1 + .../bind/v2/runtime/SchemaTypeTransducer.java | 1 + .../bind/v2/runtime/StAXPostInitAction.java | 1 + .../bind/v2/runtime/SwaRefAdapter.java | 1 + .../internal/bind/v2/runtime/Transducer.java | 1 + .../v2/runtime/ValueListBeanInfoImpl.java | 1 + .../bind/v2/runtime/XMLSerializer.java | 39 +- .../bind/v2/runtime/output/C14nXmlOutput.java | 1 + .../bind/v2/runtime/output/DOMOutput.java | 1 + .../bind/v2/runtime/output/Encoded.java | 1 + .../output/FastInfosetStreamWriterOutput.java | 39 +- .../bind/v2/runtime/output/ForkXmlOutput.java | 1 + .../v2/runtime/output/InPlaceDOMOutput.java | 1 + .../output/IndentingUTF8XmlOutput.java | 1 + .../bind/v2/runtime/output/MTOMXmlOutput.java | 1 + .../runtime/output/NamespaceContextImpl.java | 6 +- .../bind/v2/runtime/output/Pcdata.java | 1 + .../bind/v2/runtime/output/SAXOutput.java | 11 +- .../output/StAXExStreamWriterOutput.java | 59 + .../bind/v2/runtime/output/UTF8XmlOutput.java | 1 + .../runtime/output/XMLEventWriterOutput.java | 1 + .../runtime/output/XMLStreamWriterOutput.java | 13 +- .../bind/v2/runtime/output/XmlOutput.java | 1 + .../runtime/output/XmlOutputAbstractImpl.java | 1 + .../bind/v2/runtime/output/package-info.java | 1 + .../v2/runtime/property/ArrayERProperty.java | 1 + .../property/ArrayElementLeafProperty.java | 1 + .../property/ArrayElementNodeProperty.java | 3 +- .../property/ArrayElementProperty.java | 3 +- .../v2/runtime/property/ArrayProperty.java | 1 + .../property/ArrayReferenceNodeProperty.java | 10 +- .../runtime/property/AttributeProperty.java | 13 +- .../runtime/property/ListElementProperty.java | 1 + .../bind/v2/runtime/property/Messages.java | 1 + .../v2/runtime/property/Messages.properties | 1 - .../bind/v2/runtime/property/Property.java | 12 + .../v2/runtime/property/PropertyFactory.java | 1 + .../v2/runtime/property/PropertyImpl.java | 9 + .../property/SingleElementLeafProperty.java | 1 + .../property/SingleElementNodeProperty.java | 27 +- .../property/SingleMapNodeProperty.java | 5 +- .../property/SingleReferenceNodeProperty.java | 1 + .../property/StructureLoaderBuilder.java | 1 + .../bind/v2/runtime/property/TagAndType.java | 1 + .../runtime/property/UnmarshallerChain.java | 3 - .../v2/runtime/property/ValueProperty.java | 1 + .../bind/v2/runtime/reflect/Accessor.java | 18 +- .../v2/runtime/reflect/AdaptedAccessor.java | 1 + .../v2/runtime/reflect/AdaptedLister.java | 1 + .../reflect/DefaultTransducedAccessor.java | 1 + .../bind/v2/runtime/reflect/ListIterator.java | 1 + .../reflect/ListTransducedAccessorImpl.java | 1 + .../bind/v2/runtime/reflect/Lister.java | 14 +- .../bind/v2/runtime/reflect/Messages.java | 1 + .../v2/runtime/reflect/Messages.properties | 1 - .../v2/runtime/reflect/NullSafeAccessor.java | 1 + .../reflect/PrimitiveArrayListerBoolean.java | 4 +- .../reflect/PrimitiveArrayListerByte.java | 4 +- .../PrimitiveArrayListerCharacter.java | 4 +- .../reflect/PrimitiveArrayListerDouble.java | 4 +- .../reflect/PrimitiveArrayListerFloat.java | 4 +- .../reflect/PrimitiveArrayListerInteger.java | 4 +- .../reflect/PrimitiveArrayListerLong.java | 4 +- .../reflect/PrimitiveArrayListerShort.java | 4 +- .../runtime/reflect/TransducedAccessor.java | 1 + .../runtime/reflect/opt/AccessorInjector.java | 1 + .../bind/v2/runtime/reflect/opt/Bean.java | 1 + .../bind/v2/runtime/reflect/opt/Const.java | 1 + .../reflect/opt/FieldAccessor_Boolean.java | 1 + .../reflect/opt/FieldAccessor_Byte.java | 1 + .../reflect/opt/FieldAccessor_Character.java | 1 + .../reflect/opt/FieldAccessor_Double.java | 1 + .../reflect/opt/FieldAccessor_Float.java | 1 + .../reflect/opt/FieldAccessor_Integer.java | 1 + .../reflect/opt/FieldAccessor_Long.java | 1 + .../reflect/opt/FieldAccessor_Ref.java | 1 + .../reflect/opt/FieldAccessor_Short.java | 1 + .../bind/v2/runtime/reflect/opt/Injector.java | 21 + .../reflect/opt/MethodAccessor_Boolean.java | 1 + .../reflect/opt/MethodAccessor_Byte.java | 1 + .../reflect/opt/MethodAccessor_Character.java | 1 + .../reflect/opt/MethodAccessor_Double.java | 1 + .../reflect/opt/MethodAccessor_Float.java | 1 + .../reflect/opt/MethodAccessor_Integer.java | 1 + .../reflect/opt/MethodAccessor_Long.java | 1 + .../reflect/opt/MethodAccessor_Ref.java | 1 + .../reflect/opt/MethodAccessor_Short.java | 1 + .../reflect/opt/OptimizedAccessorFactory.java | 6 +- .../OptimizedTransducedAccessorFactory.java | 1 + .../bind/v2/runtime/reflect/opt/Ref.java | 1 + .../opt/TransducedAccessor_field_Boolean.java | 1 + .../opt/TransducedAccessor_field_Byte.java | 1 + .../opt/TransducedAccessor_field_Double.java | 1 + .../opt/TransducedAccessor_field_Float.java | 1 + .../opt/TransducedAccessor_field_Integer.java | 1 + .../opt/TransducedAccessor_field_Long.java | 1 + .../opt/TransducedAccessor_field_Short.java | 1 + .../TransducedAccessor_method_Boolean.java | 1 + .../opt/TransducedAccessor_method_Byte.java | 1 + .../opt/TransducedAccessor_method_Double.java | 1 + .../opt/TransducedAccessor_method_Float.java | 1 + .../TransducedAccessor_method_Integer.java | 1 + .../opt/TransducedAccessor_method_Long.java | 1 + .../opt/TransducedAccessor_method_Short.java | 1 + .../v2/runtime/unmarshaller/AttributesEx.java | 1 + .../unmarshaller/AttributesExImpl.java | 1 + .../v2/runtime/unmarshaller/Base64Data.java | 1 + .../v2/runtime/unmarshaller/ChildLoader.java | 1 + .../unmarshaller/DefaultIDResolver.java | 10 +- .../DefaultValueLoaderDecorator.java | 1 + .../v2/runtime/unmarshaller/Discarder.java | 3 - .../v2/runtime/unmarshaller/DomLoader.java | 1 + .../unmarshaller/FastInfosetConnector.java | 36 +- .../v2/runtime/unmarshaller/IntArrayData.java | 1 + .../bind/v2/runtime/unmarshaller/IntData.java | 1 + .../v2/runtime/unmarshaller/Intercepter.java | 1 + .../unmarshaller/InterningXmlVisitor.java | 1 + .../unmarshaller/LeafPropertyLoader.java | 1 + .../bind/v2/runtime/unmarshaller/Loader.java | 15 +- .../v2/runtime/unmarshaller/LocatorEx.java | 1 + .../unmarshaller/LocatorExWrapper.java | 1 + .../runtime/unmarshaller/MTOMDecorator.java | 3 +- .../v2/runtime/unmarshaller/Messages.java | 2 + .../runtime/unmarshaller/Messages.properties | 6 +- .../bind/v2/runtime/unmarshaller/Patcher.java | 1 + .../v2/runtime/unmarshaller/ProxyLoader.java | 1 + .../v2/runtime/unmarshaller/Receiver.java | 1 + .../v2/runtime/unmarshaller/SAXConnector.java | 14 +- .../bind/v2/runtime/unmarshaller/Scope.java | 1 + .../runtime/unmarshaller/StAXConnector.java | 1 + .../unmarshaller/StAXEventConnector.java | 2 + .../runtime/unmarshaller/StAXExConnector.java | 72 + .../unmarshaller/StAXStreamConnector.java | 10 +- .../runtime/unmarshaller/StructureLoader.java | 5 + .../bind/v2/runtime/unmarshaller/TagName.java | 1 + .../v2/runtime/unmarshaller/TextLoader.java | 1 + .../unmarshaller/UnmarshallerImpl.java | 27 +- .../unmarshaller/UnmarshallingContext.java | 91 +- .../unmarshaller/ValuePropertyLoader.java | 1 + .../runtime/unmarshaller/WildcardLoader.java | 3 - .../v2/runtime/unmarshaller/XmlVisitor.java | 5 +- .../v2/runtime/unmarshaller/XsiNilLoader.java | 25 +- .../runtime/unmarshaller/XsiTypeLoader.java | 1 + .../bind/v2/schemagen/FoolProofResolver.java | 1 + .../xml/internal/bind/v2/schemagen/Form.java | 1 + .../internal/bind/v2/schemagen/GroupKind.java | 1 + .../internal/bind/v2/schemagen/Messages.java | 1 + .../bind/v2/schemagen/Messages.properties | 1 - .../internal/bind/v2/schemagen/MultiMap.java | 1 + .../xml/internal/bind/v2/schemagen/Tree.java | 1 + .../bind/v2/schemagen/XmlSchemaGenerator.java | 57 +- .../bind/v2/schemagen/episode/Bindings.java | 1 + .../bind/v2/schemagen/episode/Klass.java | 1 + .../v2/schemagen/episode/SchemaBindings.java | 1 + .../v2/schemagen/episode/package-info.java | 1 + .../bind/v2/schemagen/package-info.java | 1 + .../xmlschema/ContentModelContainer.java | 1 + .../bind/v2/schemagen/xmlschema/Element.java | 4 +- .../bind/v2/schemagen/xmlschema/Occurs.java | 6 +- .../bind/v2/schemagen/xmlschema/Particle.java | 1 + .../bind/v2/schemagen/xmlschema/Schema.java | 4 +- .../v2/schemagen/xmlschema/SimpleType.java | 4 +- .../bind/v2/schemagen/xmlschema/Wildcard.java | 6 +- .../bind/v2/util/ByteArrayOutputStreamEx.java | 1 + .../bind/v2/util/CollisionCheckStack.java | 1 + .../bind/v2/util/DataSourceSource.java | 17 +- .../internal/bind/v2/util/EditDistance.java | 5 - .../internal/bind/v2/util/FatalAdapter.java | 1 + .../bind/v2/util/FlattenIterator.java | 1 + .../xml/internal/bind/v2/util/QNameMap.java | 1 + .../internal/bind/v2/util/StackRecorder.java | 33 + .../xml/internal/bind/v2/util/TypeCast.java | 1 + .../sun/xml/internal/dtdparser/DTDParser.java | 2 +- .../dtdparser/resources/Messages.properties | 101 +- .../fastinfoset/AbstractResourceBundle.java | 35 +- .../sun/xml/internal/fastinfoset/Decoder.java | 55 +- .../fastinfoset/DecoderStateTables.java | 66 +- .../sun/xml/internal/fastinfoset/Encoder.java | 397 +- .../BuiltInEncodingAlgorithmFactory.java | 6 +- .../HexadecimalEncodingAlgorithm.java | 2 +- .../algorithm/LongEncodingAlgorithm.java | 17 +- .../algorithm/UUIDEncodingAlgorithm.java | 2 +- .../fastinfoset/dom/DOMDocumentParser.java | 197 +- .../dom/DOMDocumentSerializer.java | 2 +- .../org/apache/xerces/util/XMLChar.java | 4 +- .../resources/ResourceBundle.properties | 7 +- .../fastinfoset/sax/AttributesHolder.java | 2 +- .../fastinfoset/sax/SAXDocumentParser.java | 120 +- .../sax/SAXDocumentSerializer.java | 44 +- ...AXDocumentSerializerWithPrefixMapping.java | 31 +- .../fastinfoset/stax/StAXDocumentParser.java | 54 +- .../stax/StAXDocumentSerializer.java | 19 +- .../stax/events/StAXEventAllocator.java | 237 - .../tools/VocabularyGenerator.java | 4 +- .../fastinfoset/util/CharArrayIntMap.java | 22 +- .../util/DuplicateAttributeVerifier.java | 2 +- .../util/NamespaceContextImplementation.java | 13 +- .../fastinfoset/util/StringIntMap.java | 2 +- .../messaging/saaj/SOAPExceptionImpl.java | 5 - .../saaj/client/p2p/HttpSOAPConnection.java | 57 +- .../client/p2p/HttpSOAPConnectionFactory.java | 5 - .../saaj/client/p2p/LocalStrings.properties | 1 - .../saaj/soap/AttachmentPartImpl.java | 7 +- .../messaging/saaj/soap/Envelope.java | 5 - .../messaging/saaj/soap/EnvelopeFactory.java | 8 +- .../soap/FastInfosetDataContentHandler.java | 5 - .../saaj/soap/GifDataContentHandler.java | 6 +- .../saaj/soap/ImageDataContentHandler.java | 5 - .../saaj/soap/JpegDataContentHandler.java | 6 - .../saaj/soap/LocalStrings.properties | 1 - .../saaj/soap/MessageFactoryImpl.java | 5 - .../messaging/saaj/soap/MessageImpl.java | 8 +- .../soap/MultipartDataContentHandler.java | 5 - .../saaj/soap/SAAJMetaFactoryImpl.java | 1 + .../messaging/saaj/soap/SOAPDocument.java | 3 - .../saaj/soap/SOAPDocumentFragment.java | 3 - .../messaging/saaj/soap/SOAPDocumentImpl.java | 5 +- .../messaging/saaj/soap/SOAPFactoryImpl.java | 5 - .../messaging/saaj/soap/SOAPIOException.java | 1 - .../messaging/saaj/soap/SOAPPartImpl.java | 17 +- .../soap/SOAPVersionMismatchException.java | 5 - .../saaj/soap/StringDataContentHandler.java | 225 +- .../saaj/soap/XmlDataContentHandler.java | 15 +- .../soap/dynamic/SOAPFactoryDynamicImpl.java | 3 - .../SOAPMessageFactoryDynamicImpl.java | 3 - .../saaj/soap/impl/BodyElementImpl.java | 5 - .../messaging/saaj/soap/impl/BodyImpl.java | 5 - .../messaging/saaj/soap/impl/CDATAImpl.java | 5 - .../messaging/saaj/soap/impl/CommentImpl.java | 5 - .../saaj/soap/impl/DetailEntryImpl.java | 5 - .../messaging/saaj/soap/impl/DetailImpl.java | 30 +- .../saaj/soap/impl/ElementFactory.java | 5 - .../messaging/saaj/soap/impl/ElementImpl.java | 37 +- .../saaj/soap/impl/EnvelopeImpl.java | 5 - .../saaj/soap/impl/FaultElementImpl.java | 5 - .../messaging/saaj/soap/impl/FaultImpl.java | 11 +- .../saaj/soap/impl/HeaderElementImpl.java | 5 - .../messaging/saaj/soap/impl/HeaderImpl.java | 5 - .../saaj/soap/impl/LocalStrings.properties | 3 +- .../messaging/saaj/soap/impl/TextImpl.java | 5 - .../saaj/soap/impl/TreeException.java | 5 - .../saaj/soap/name/LocalStrings.properties | 1 - .../messaging/saaj/soap/name/NameImpl.java | 20 +- .../saaj/soap/ver1_1/Body1_1Impl.java | 3 - .../saaj/soap/ver1_1/BodyElement1_1Impl.java | 3 - .../saaj/soap/ver1_1/Detail1_1Impl.java | 3 - .../saaj/soap/ver1_1/DetailEntry1_1Impl.java | 3 - .../saaj/soap/ver1_1/Envelope1_1Impl.java | 3 - .../saaj/soap/ver1_1/Fault1_1Impl.java | 64 +- .../saaj/soap/ver1_1/FaultElement1_1Impl.java | 3 - .../saaj/soap/ver1_1/Header1_1Impl.java | 3 - .../soap/ver1_1/HeaderElement1_1Impl.java | 3 - .../saaj/soap/ver1_1/LocalStrings.properties | 6 +- .../saaj/soap/ver1_1/Message1_1Impl.java | 3 - .../saaj/soap/ver1_1/SOAPFactory1_1Impl.java | 7 +- .../ver1_1/SOAPMessageFactory1_1Impl.java | 3 - .../saaj/soap/ver1_1/SOAPPart1_1Impl.java | 3 - .../saaj/soap/ver1_2/Body1_2Impl.java | 5 +- .../saaj/soap/ver1_2/BodyElement1_2Impl.java | 3 - .../saaj/soap/ver1_2/Detail1_2Impl.java | 3 - .../saaj/soap/ver1_2/DetailEntry1_2Impl.java | 3 - .../saaj/soap/ver1_2/Envelope1_2Impl.java | 3 - .../saaj/soap/ver1_2/Fault1_2Impl.java | 3 - .../saaj/soap/ver1_2/FaultElement1_2Impl.java | 3 - .../saaj/soap/ver1_2/Header1_2Impl.java | 3 - .../soap/ver1_2/HeaderElement1_2Impl.java | 3 - .../saaj/soap/ver1_2/LocalStrings.properties | 1 - .../saaj/soap/ver1_2/Message1_2Impl.java | 3 - .../saaj/soap/ver1_2/SOAPFactory1_2Impl.java | 3 - .../ver1_2/SOAPMessageFactory1_2Impl.java | 3 - .../saaj/soap/ver1_2/SOAPPart1_2Impl.java | 3 - .../internal/messaging/saaj/util/Base64.java | 7 +- .../messaging/saaj/util/ByteInputStream.java | 6 - .../messaging/saaj/util/ByteOutputStream.java | 4 - .../messaging/saaj/util/CharReader.java | 5 - .../messaging/saaj/util/CharWriter.java | 5 - .../saaj/util/FastInfosetReflection.java | 5 - .../messaging/saaj/util/FinalArrayList.java | 1 + .../messaging/saaj/util/JAXMStreamSource.java | 5 - .../internal/messaging/saaj/util/JaxmURI.java | 7 +- .../saaj/util/LocalStrings.properties | 1 - .../saaj/util/LogDomainConstants.java | 5 - .../messaging/saaj/util/MimeHeadersUtil.java | 3 - .../saaj/util/NamespaceContextIterator.java | 3 - .../messaging/saaj/util/ParseUtil.java | 5 - .../messaging/saaj/util/ParserPool.java | 5 - .../saaj/util/RejectDoctypeSaxFilter.java | 1 - .../messaging/saaj/util/TeeInputStream.java | 1 - .../saaj/util/XMLDeclarationParser.java | 3 +- .../EfficientStreamingTransformer.java | 35 +- .../fastinfoset/FastInfosetSerializer.java | 118 +- .../EncodingAlgorithmAttributesImpl.java | 12 +- .../internal/org/jvnet/mimepull/Chunk.java | 50 + .../org/jvnet/mimepull/ChunkInputStream.java | 94 + .../xml/internal/org/jvnet/mimepull/Data.java | 70 + .../internal/org/jvnet/mimepull/DataFile.java | 83 + .../internal/org/jvnet/mimepull/DataHead.java | 258 + .../internal/org/jvnet/mimepull/FileData.java | 73 + .../org/jvnet/mimepull/FinalArrayList.java | 49 + .../internal/org/jvnet/mimepull/Header.java | 48 + .../org/jvnet/mimepull/InternetHeaders.java | 238 + .../org/jvnet/mimepull/MIMEConfig.java | 147 + .../org/jvnet/mimepull/MIMEEvent.java | 116 + .../org/jvnet/mimepull/MIMEMessage.java | 248 + .../org/jvnet/mimepull/MIMEParser.java | 500 + .../jvnet/mimepull/MIMEParsingException.java | 87 + .../internal/org/jvnet/mimepull/MIMEPart.java | 206 + .../org/jvnet/mimepull/MemoryData.java | 96 + .../org/jvnet/mimepull/WeakDataFile.java | 116 + .../internal/org/jvnet/staxex/Base64Data.java | 36 +- .../org/jvnet/staxex/Base64Encoder.java | 1 + .../jvnet/staxex/ByteArrayOutputStreamEx.java | 1 + .../org/jvnet/staxex/NamespaceContextEx.java | 1 + .../jvnet/staxex/StreamingDataHandler.java | 143 + .../org/jvnet/staxex/XMLStreamReaderEx.java | 1 + .../org/jvnet/staxex/XMLStreamWriterEx.java | 16 +- .../internal/rngom/binary/Messages.properties | 1 - .../rngom/dt/builtin/Messages.properties | 1 - .../internal/rngom/parse/Messages.properties | 1 - .../rngom/parse/compact/Messages.properties | 1 - .../rngom/parse/xml/Messages.properties | 1 - .../stream/buffer/AbstractProcessor.java | 18 +- .../stream/buffer/MutableXMLStreamBuffer.java | 2 +- .../stream/buffer/sax/SAXBufferCreator.java | 6 +- .../stream/buffer/sax/SAXBufferProcessor.java | 4 +- .../buffer/stax/StreamBufferCreator.java | 29 + .../stax/StreamReaderBufferCreator.java | 31 + .../stax/StreamReaderBufferProcessor.java | 19 +- .../stax/StreamWriterBufferCreator.java | 6 +- .../stax/StreamWriterBufferProcessor.java | 94 +- .../xml/internal/txw2/NamespaceSupport.java | 1 - .../com/sun/xml/internal/txw2/TXW.java | 10 + .../internal/txw2/annotation/XmlValue.java | 4 - .../internal/txw2/output/ResultFactory.java | 2 + .../xml/internal/txw2/output/TXWResult.java | 65 + .../internal/txw2/output/TXWSerializer.java | 86 + .../ws/addressing/EndpointReferenceUtil.java | 3 +- .../ws/addressing/W3CWsaClientTube.java | 69 + .../ws/addressing/W3CWsaServerTube.java | 76 + .../internal/ws/addressing/WsaClientTube.java | 26 +- .../ws/addressing/WsaPropertyBag.java | 126 + .../internal/ws/addressing/WsaServerTube.java | 100 +- .../xml/internal/ws/addressing/WsaTube.java | 107 +- .../internal/ws/addressing/WsaTubeHelper.java | 32 +- .../ws/addressing/WsaTubeHelperImpl.java | 17 +- .../model/ActionNotSupportedException.java | 9 +- .../InvalidAddressingHeaderException.java | 64 + .../MissingAddressingHeaderException.java | 78 + .../MemberSubmissionWsaClientTube.java | 84 + .../MemberSubmissionWsaServerTube.java | 87 + .../addressing/v200408/WsaTubeHelperImpl.java | 17 +- .../sun/xml/internal/ws/api/BindingID.java | 28 +- .../xml/internal/ws/api/EndpointAddress.java | 3 + .../xml/internal/ws/api/ResourceLoader.java | 67 + .../sun/xml/internal/ws/api/SOAPVersion.java | 6 + .../sun/xml/internal/ws/api/WSService.java | 80 + .../ws/api/addressing/AddressingVersion.java | 4 + .../OutboundReferenceParameterHeader.java | 51 +- .../api/addressing/WSEndpointReference.java | 30 +- .../ws/api/handler/MessageHandler.java | 54 + .../ws/api/handler/MessageHandlerContext.java | 88 + .../ws/api/message/FilterMessageImpl.java | 164 + .../xml/internal/ws/api/message/Message.java | 26 + .../xml/internal/ws/api/message/Messages.java | 34 +- .../xml/internal/ws/api/message/Packet.java | 97 +- .../xml/internal/ws/api/model/JavaMethod.java | 18 + .../ws/api/model/wsdl/WSDLBoundFault.java | 73 + .../ws/api/model/wsdl/WSDLBoundOperation.java | 42 +- .../ws/api/model/wsdl/WSDLBoundPortType.java | 9 + .../ws/api/model/wsdl/WSDLExtensible.java | 2 +- .../internal/ws/api/model/wsdl/WSDLFault.java | 19 + .../internal/ws/api/model/wsdl/WSDLInput.java | 28 + .../ws/api/model/wsdl/WSDLMessage.java | 5 + .../internal/ws/api/model/wsdl/WSDLModel.java | 20 +- .../ws/api/model/wsdl/WSDLOperation.java | 2 +- .../ws/api/model/wsdl/WSDLOutput.java | 21 + .../ws/api/model/wsdl/WSDLPortType.java | 2 +- .../api/pipe/ClientPipeAssemblerContext.java | 7 + .../api/pipe/ClientTubeAssemblerContext.java | 90 +- .../sun/xml/internal/ws/api/pipe/Engine.java | 27 +- .../sun/xml/internal/ws/api/pipe/Fiber.java | 26 +- .../xml/internal/ws/api/pipe/NextAction.java | 9 + .../api/pipe/ServerPipeAssemblerContext.java | 7 + .../api/pipe/ServerTubeAssemblerContext.java | 31 +- .../internal/ws/api/pipe/StreamSOAPCodec.java | 11 + .../ws/api/pipe/TransportTubeFactory.java | 2 +- .../pipe/helper/AbstractFilterTubeImpl.java | 6 +- .../ws/api/pipe/helper/AbstractTubeImpl.java | 6 + .../internal/ws/api/server/BoundEndpoint.java | 20 + .../ws/api/server/EndpointComponent.java | 52 + .../internal/ws/api/server/HttpEndpoint.java | 62 + .../ws/api/server/InstanceResolver.java | 38 +- .../ws/api/server/PortAddressResolver.java | 18 + .../internal/ws/api/server/SDDocument.java | 12 + .../internal/ws/api/server/WSEndpoint.java | 33 + .../api/streaming/XMLStreamReaderFactory.java | 111 +- .../api/streaming/XMLStreamWriterFactory.java | 52 +- .../api/wsdl/parser/WSDLParserExtension.java | 18 +- .../parser/WSDLParserExtensionContext.java | 11 + .../xml/internal/ws/binding/BindingImpl.java | 8 + .../internal/ws/binding/HTTPBindingImpl.java | 2 +- .../internal/ws/binding/SOAPBindingImpl.java | 20 +- .../ws/binding/WebServiceFeatureList.java | 9 +- .../xml/internal/ws/client/AsyncInvoker.java | 15 + .../internal/ws/client/AsyncResponseImpl.java | 4 - .../ws/client/BindingProviderProperties.java | 4 - .../internal/ws/client/ClientContainer.java | 55 + .../ws/client/ClientSchemaValidationTube.java | 163 + .../ws/client/HandlerConfiguration.java | 15 +- .../xml/internal/ws/client/ResponseImpl.java | 118 - .../com/sun/xml/internal/ws/client/Stub.java | 73 +- .../internal/ws/client/WSServiceDelegate.java | 145 +- .../client/dispatch/DataSourceDispatch.java | 4 +- .../ws/client/dispatch/DispatchImpl.java | 75 +- .../client/dispatch/RESTSourceDispatch.java | 2 +- .../client/dispatch/SOAPMessageDispatch.java | 29 +- .../internal/ws/client/sei/AsyncBuilder.java | 244 - .../ws/client/sei/AsyncMethodHandler.java | 264 +- .../internal/ws/client/sei/BodyBuilder.java | 16 +- .../ws/client/sei/CallbackMethodHandler.java | 4 +- .../internal/ws/client/sei/MessageFiller.java | 2 +- .../internal/ws/client/sei/MethodHandler.java | 2 +- .../ws/client/sei/PollingMethodHandler.java | 4 +- .../ws/client/sei/ResponseBuilder.java | 34 +- .../ws/client/sei/SEIMethodHandler.java | 214 + .../xml/internal/ws/client/sei/SEIStub.java | 11 +- .../ws/client/sei/SyncMethodHandler.java | 161 +- .../internal/ws/client/sei/ValueGetter.java | 14 +- .../ws/client/sei/ValueGetterFactory.java | 57 + .../internal/ws/client/sei/ValueSetter.java | 67 +- .../ws/client/sei/ValueSetterFactory.java | 70 + .../{package-info.java => pacakge-info.java} | 0 .../ws/developer/BindingTypeFeature.java | 55 + .../ws/developer/JAXBContextFactory.java | 101 + .../ws/developer/JAXWSProperties.java | 141 +- .../developer/MemberSubmissionAddressing.java | 12 +- .../MemberSubmissionAddressingFeature.java | 33 +- .../MemberSubmissionEndpointReference.java | 4 +- .../ws/developer/SchemaValidation.java | 92 + .../ws/developer/SchemaValidationFeature.java | 74 + .../ws/developer/StatefulFeature.java | 1 - .../ws/developer/StreamingAttachment.java | 76 + .../developer/StreamingAttachmentFeature.java | 117 + .../ws/developer/StreamingDataHandler.java | 69 + .../ws/developer/UsesJAXBContext.java | 68 + .../ws/developer/UsesJAXBContextFeature.java | 124 + .../ws/developer/ValidationErrorHandler.java | 58 + .../ws/developer/WSBindingProvider.java | 20 +- .../AbstractXMLStreamWriterExImpl.java | 83 - .../xml/internal/ws/encoding/ContentType.java | 136 + .../internal/ws/encoding/ContentTypeImpl.java | 40 +- .../DataSourceStreamingDataHandler.java | 63 + .../internal/ws/encoding/HeaderTokenizer.java | 382 + .../ws/encoding/ImageDataContentHandler.java | 164 + .../MIMEPartStreamingDataHandler.java | 129 + .../xml/internal/ws/encoding/MimeCodec.java | 78 +- .../ws/encoding/MimeMultipartParser.java | 492 +- .../xml/internal/ws/encoding/MtomCodec.java | 249 +- .../internal/ws/encoding/ParameterList.java | 138 + .../internal/ws/encoding/RootOnlyCodec.java | 71 + .../ws/encoding/SOAPBindingCodec.java | 116 +- .../ws/encoding/StreamSOAP11Codec.java | 2 +- .../ws/encoding/StreamSOAP12Codec.java | 2 +- .../internal/ws/encoding/StreamSOAPCodec.java | 32 +- .../ws/encoding/StringDataContentHandler.java | 148 + .../xml/internal/ws/encoding/SwACodec.java | 21 +- .../xml/internal/ws/encoding/TagInfoset.java | 11 +- .../ws/encoding/XMLHTTPBindingCodec.java | 27 +- .../ws/encoding/XmlDataContentHandler.java | 114 + .../fastinfoset/FastInfosetCodec.java | 7 +- .../internal/ws/encoding/xml/XMLCodec.java | 9 +- .../internal/ws/encoding/xml/XMLMessage.java | 228 +- .../xml/internal/ws/fault/SOAP11Fault.java | 22 +- .../xml/internal/ws/fault/SOAP12Fault.java | 48 +- .../internal/ws/fault/SOAPFaultBuilder.java | 78 +- .../ws/handler/ClientLogicalHandlerTube.java | 69 +- .../ws/handler/ClientMessageHandlerTube.java | 150 + .../ws/handler/ClientSOAPHandlerTube.java | 65 +- .../xml/internal/ws/handler/HandlerTube.java | 121 +- .../ws/handler/MessageHandlerContextImpl.java | 84 + .../ws/handler/SOAPMessageContextImpl.java | 7 +- .../ws/handler/ServerLogicalHandlerTube.java | 87 +- .../ws/handler/ServerMessageHandlerTube.java | 149 + .../ws/handler/ServerSOAPHandlerTube.java | 81 +- .../message/AttachmentUnmarshallerImpl.java | 5 - .../ws/message/ByteArrayAttachment.java | 6 +- .../xml/internal/ws/message/DOMHeader.java | 4 +- .../ws/message/DataHandlerAttachment.java | 7 +- .../xml/internal/ws/message/FaultMessage.java | 55 + .../internal/ws/message/JAXBAttachment.java | 15 +- .../ws/message/MimeAttachmentSet.java | 6 +- .../internal/ws/message/jaxb/JAXBHeader.java | 14 +- .../internal/ws/message/jaxb/JAXBMessage.java | 18 +- .../ws/message/jaxb/MarshallerBridge.java | 4 +- .../internal/ws/message/saaj/SAAJMessage.java | 393 +- .../ws/message/stream/StreamAttachment.java | 3 +- .../ws/message/stream/StreamHeader.java | 6 +- .../ws/message/stream/StreamHeader11.java | 6 +- .../ws/message/stream/StreamHeader12.java | 8 +- .../ws/message/stream/StreamMessage.java | 68 +- .../ws/model/AbstractSEIModelImpl.java | 59 +- .../xml/internal/ws/model/FieldSignature.java | 100 + .../sun/xml/internal/ws/model/Injector.java | 192 + .../xml/internal/ws/model/JavaMethodImpl.java | 26 +- .../xml/internal/ws/model/RuntimeModeler.java | 205 +- .../xml/internal/ws/model/SOAPSEIModel.java | 5 + .../ws/model/WrapperBeanGenerator.java | 659 + .../ws/model/wsdl/WSDLBoundFaultImpl.java | 84 + .../ws/model/wsdl/WSDLBoundOperationImpl.java | 109 +- .../ws/model/wsdl/WSDLBoundPortTypeImpl.java | 16 +- .../internal/ws/model/wsdl/WSDLFaultImpl.java | 16 +- .../internal/ws/model/wsdl/WSDLInputImpl.java | 12 + .../ws/model/wsdl/WSDLMessageImpl.java | 2 +- .../ws/model/wsdl/WSDLOutputImpl.java | 12 + .../org/objectweb/asm/AnnotationVisitor.java | 127 + .../org/objectweb/asm/AnnotationWriter.java | 346 + .../ws/org/objectweb/asm/Attribute.java | 284 + .../ws/org/objectweb/asm/ByteVector.java | 323 + .../ws/org/objectweb/asm/ClassReader.java | 2039 + .../ws/org/objectweb/asm/ClassVisitor.java | 226 + .../ws/org/objectweb/asm/ClassWriter.java | 1374 + .../internal/ws/org/objectweb/asm/Edge.java | 105 + .../ws/org/objectweb/asm/FieldVisitor.java | 94 + .../ws/org/objectweb/asm/FieldWriter.java | 299 + .../internal/ws/org/objectweb/asm/Frame.java | 1432 + .../ws/org/objectweb/asm/Handler.java | 100 + .../internal/ws/org/objectweb/asm/Item.java | 286 + .../internal/ws/org/objectweb/asm/Label.java | 556 + .../ws/org/objectweb/asm/MethodVisitor.java | 425 + .../ws/org/objectweb/asm/MethodWriter.java | 2631 + .../ws/org/objectweb/asm/Opcodes.java | 371 + .../internal/ws/org/objectweb/asm/Type.java | 824 + .../xml/internal/ws/protocol/soap/MUTube.java | 2 +- .../soap/MessageCreationException.java | 60 + .../ws/resources/AddressingMessages.java | 48 + .../internal/ws/resources/ClientMessages.java | 12 + .../ws/resources/ModelerMessages.java | 14 +- .../ws/resources/ProviderApiMessages.java | 12 + .../internal/ws/resources/ServerMessages.java | 79 +- .../ws/resources/WsservletMessages.java | 24 +- .../ws/resources/addressing.properties | 6 +- .../internal/ws/resources/client.properties | 2 +- .../internal/ws/resources/dispatch.properties | 1 - .../internal/ws/resources/encoding.properties | 1 - .../internal/ws/resources/handler.properties | 1 - .../ws/resources/httpserver.properties | 1 - .../internal/ws/resources/modeler.properties | 8 +- .../ws/resources/providerApi.properties | 3 +- .../internal/ws/resources/sender.properties | 1 - .../internal/ws/resources/server.properties | 26 +- .../xml/internal/ws/resources/soap.properties | 3 +- .../ws/resources/streaming.properties | 1 - .../xml/internal/ws/resources/util.properties | 1 - .../ws/resources/wsdlmodel.properties | 1 - .../ws/resources/wsservlet.properties | 7 +- .../ws/resources/xmlmessage.properties | 1 - .../ws/server/AbstractInstanceResolver.java | 46 +- .../DraconianValidationErrorHandler.java | 47 + .../internal/ws/server/EndpointFactory.java | 30 +- .../sun/xml/internal/ws/server/JMXAgent.java | 87 + .../internal/ws/server/SDDocumentImpl.java | 62 +- .../ws/server/ServerSchemaValidationTube.java | 319 + .../ws/server/StatefulInstanceResolver.java | 5 +- .../ws/server/UnsupportedMediaException.java | 4 + .../xml/internal/ws/server/WSDLPatcher.java | 11 +- .../internal/ws/server/WSEndpointImpl.java | 31 +- .../provider/ProviderArgumentsBuilder.java | 2 +- .../provider/XMLProviderArgumentBuilder.java | 13 +- .../server/sei/EndpointArgumentsBuilder.java | 67 +- .../server/sei/EndpointMethodDispatcher.java | 3 - .../sei/EndpointMethodDispatcherGetter.java | 1 + .../ws/server/sei/EndpointMethodHandler.java | 28 +- .../sei/PayloadQNameBasedDispatcher.java | 72 +- .../ws/server/sei/SEIInvokerTube.java | 37 +- .../server/sei/SOAPActionBasedDispatcher.java | 76 + .../sun/xml/internal/ws/spi/ProviderImpl.java | 19 +- .../ws/streaming/DOMStreamReader.java | 66 +- .../ws/streaming/MtomStreamWriter.java | 44 + .../xml/internal/ws/streaming/XMLReader.java | 230 - .../ws/streaming/XMLReaderException.java | 1 - .../ws/streaming/XMLStreamReaderUtil.java | 11 + .../ws/streaming/XMLStreamWriterUtil.java | 45 +- .../xml/internal/ws/transport/Headers.java | 5 + .../http/DeploymentDescriptorParser.java | 9 +- .../ws/transport/http/HttpAdapter.java | 207 +- .../http/HttpDump.java} | 20 +- .../ws/transport/http/HttpDumpMBean.java | 37 + .../transport/http/HttpMetadataPublisher.java | 59 + .../ws/transport/http/WSHTTPConnection.java | 10 + .../http/client/HttpClientTransport.java | 219 +- .../http/client/HttpTransportPipe.java | 94 +- .../transport/http/server/EndpointImpl.java | 12 +- .../transport/http/server/HttpEndpoint.java | 2 +- .../http/server/ServerConnectionImpl.java | 52 +- .../ws/transport/http/server/ServerMgr.java | 10 +- .../transport/http/server/WSHttpHandler.java | 16 +- .../xml/internal/ws/util/ByteArrayBuffer.java | 5 + .../com/sun/xml/internal/ws/util/DOMUtil.java | 6 +- .../ws/util/HandlerAnnotationProcessor.java | 3 +- .../xml/internal/ws/util/MetadataUtil.java | 92 + .../com/sun/xml/internal/ws/util/Pool.java | 24 +- .../sun/xml/internal/ws/util/QNameMap.java | 8 +- .../xml/internal/ws/util/RuntimeVersion.java | 36 +- .../internal/ws/util/RuntimeVersionMBean.java | 43 + .../pipe/AbstractSchemaValidationTube.java | 261 + .../xml/internal/ws/util/pipe/DumpTube.java | 2 + .../ws/util/pipe/StandaloneTubeAssembler.java | 2 + .../ws/util/resources/Messages_en.properties | 1 - .../xml/internal/ws/util/version.properties | 8 +- .../xml/ContentHandlerToXMLStreamWriter.java | 8 +- .../ws/util/xml/MetadataDocument.java | 317 + .../xml/internal/ws/util/xml/StAXSource.java | 57 +- .../xml/XMLStreamReaderToXMLStreamWriter.java | 12 +- .../sun/xml/internal/ws/util/xml/XmlUtil.java | 48 + .../parser/DelegatingParserExtension.java | 19 +- .../wsdl/parser/FoolProofParserExtension.java | 15 +- .../internal/ws/wsdl/parser/ParserUtil.java | 38 +- .../ws/wsdl/parser/RuntimeWSDLParser.java | 119 +- ...AddressingMetadataWSDLParserExtension.java | 106 + .../WSDLParserExtensionContextImpl.java | 10 +- .../parser/WSDLParserExtensionFacade.java | 8 +- .../ws/wsdl/writer/UsingAddressing.java | 3 - .../W3CAddressingWSDLGeneratorExtension.java | 50 +- .../ws/wsdl/writer/WSDLGenerator.java | 17 +- .../xml/internal/xsom/ForeignAttributes.java | 1 + .../com/sun/xml/internal/xsom/SCD.java | 1 + .../sun/xml/internal/xsom/XSAnnotation.java | 2 + .../sun/xml/internal/xsom/XSAttContainer.java | 2 + .../sun/xml/internal/xsom/XSAttGroupDecl.java | 2 + .../xml/internal/xsom/XSAttributeDecl.java | 2 + .../sun/xml/internal/xsom/XSAttributeUse.java | 2 + .../sun/xml/internal/xsom/XSComplexType.java | 19 + .../sun/xml/internal/xsom/XSComponent.java | 2 + .../sun/xml/internal/xsom/XSContentType.java | 2 + .../sun/xml/internal/xsom/XSDeclaration.java | 2 + .../sun/xml/internal/xsom/XSElementDecl.java | 13 + .../com/sun/xml/internal/xsom/XSFacet.java | 2 + .../internal/xsom/XSIdentityConstraint.java | 1 + .../xml/internal/xsom/XSListSimpleType.java | 2 + .../sun/xml/internal/xsom/XSModelGroup.java | 2 + .../xml/internal/xsom/XSModelGroupDecl.java | 2 + .../com/sun/xml/internal/xsom/XSNotation.java | 2 + .../com/sun/xml/internal/xsom/XSParticle.java | 2 + .../xsom/XSRestrictionSimpleType.java | 8 + .../com/sun/xml/internal/xsom/XSSchema.java | 2 + .../sun/xml/internal/xsom/XSSchemaSet.java | 2 + .../sun/xml/internal/xsom/XSSimpleType.java | 14 + .../com/sun/xml/internal/xsom/XSTerm.java | 2 + .../com/sun/xml/internal/xsom/XSType.java | 2 + .../xml/internal/xsom/XSUnionSimpleType.java | 2 + .../com/sun/xml/internal/xsom/XSVariety.java | 2 + .../com/sun/xml/internal/xsom/XSWildcard.java | 2 + .../com/sun/xml/internal/xsom/XSXPath.java | 1 + .../com/sun/xml/internal/xsom/XmlString.java | 1 + .../internal/xsom/impl/AnnotationImpl.java | 26 +- .../internal/xsom/impl/AttGroupDeclImpl.java | 2 + .../internal/xsom/impl/AttributeDeclImpl.java | 2 + .../internal/xsom/impl/AttributeUseImpl.java | 2 + .../internal/xsom/impl/AttributesHolder.java | 9 +- .../internal/xsom/impl/ComplexTypeImpl.java | 55 +- .../xml/internal/xsom/impl/ComponentImpl.java | 2 + .../com/sun/xml/internal/xsom/impl/Const.java | 2 + .../internal/xsom/impl/ContentTypeImpl.java | 2 + .../internal/xsom/impl/DeclarationImpl.java | 2 + .../xml/internal/xsom/impl/ElementDecl.java | 12 +- .../sun/xml/internal/xsom/impl/EmptyImpl.java | 2 + .../sun/xml/internal/xsom/impl/FacetImpl.java | 2 + .../xsom/impl/ForeignAttributesImpl.java | 1 + .../xsom/impl/IdentityConstraintImpl.java | 1 + .../xsom/impl/ListSimpleTypeImpl.java | 5 + .../xsom/impl/ModelGroupDeclImpl.java | 2 + .../internal/xsom/impl/ModelGroupImpl.java | 2 + .../xml/internal/xsom/impl/NotationImpl.java | 2 + .../xml/internal/xsom/impl/ParticleImpl.java | 2 + .../com/sun/xml/internal/xsom/impl/Ref.java | 2 + .../xsom/impl/RestrictionSimpleTypeImpl.java | 10 + .../xml/internal/xsom/impl/SchemaImpl.java | 2 + .../xml/internal/xsom/impl/SchemaSetImpl.java | 29 + .../internal/xsom/impl/SimpleTypeImpl.java | 2 + .../com/sun/xml/internal/xsom/impl/UName.java | 33 + .../xsom/impl/UnionSimpleTypeImpl.java | 7 +- .../com/sun/xml/internal/xsom/impl/Util.java | 2 + .../xml/internal/xsom/impl/WildcardImpl.java | 2 + .../sun/xml/internal/xsom/impl/XPathImpl.java | 1 + .../sun/xml/internal/xsom/impl/package.html | 2 +- .../xsom/impl/parser/BaseContentRef.java | 1 + .../impl/parser/DefaultAnnotationParser.java | 2 + .../internal/xsom/impl/parser/DelayedRef.java | 2 + .../internal/xsom/impl/parser/Messages.java | 2 + .../xsom/impl/parser/Messages.properties | 31 +- .../xsom/impl/parser/Messages_ja.properties | 31 +- .../xsom/impl/parser/NGCCRuntimeEx.java | 1 + .../xsom/impl/parser/ParserContext.java | 1 + .../xml/internal/xsom/impl/parser/Patch.java | 2 + .../xsom/impl/parser/PatcherManager.java | 2 + .../impl/parser/SAXParserFactoryAdaptor.java | 2 + .../xsom/impl/parser/SchemaDocumentImpl.java | 1 + .../impl/parser/SubstGroupBaseTypeRef.java | 2 + .../xsom/impl/parser/state/Schema.java | 1164 +- .../impl/parser/state/SimpleType_List.java | 136 +- .../parser/state/SimpleType_Restriction.java | 112 +- .../impl/parser/state/SimpleType_Union.java | 282 +- .../xsom/impl/parser/state/annotation.java | 10 +- .../impl/parser/state/attributeDeclBody.java | 412 +- .../impl/parser/state/attributeGroupDecl.java | 328 +- .../xsom/impl/parser/state/attributeUses.java | 890 +- .../xsom/impl/parser/state/complexType.java | 1850 +- .../complexType_complexContent_body.java | 22 +- .../impl/parser/state/elementDeclBody.java | 941 +- .../xsom/impl/parser/state/erSet.java | 10 +- .../xsom/impl/parser/state/facet.java | 144 +- .../xsom/impl/parser/state/group.java | 276 +- .../impl/parser/state/identityConstraint.java | 292 +- .../xsom/impl/parser/state/importDecl.java | 204 +- .../xsom/impl/parser/state/includeDecl.java | 84 +- .../impl/parser/state/modelGroupBody.java | 162 +- .../xsom/impl/parser/state/notation.java | 272 +- .../xsom/impl/parser/state/occurs.java | 134 +- .../xsom/impl/parser/state/particle.java | 846 +- .../xsom/impl/parser/state/qname.java | 10 +- .../xsom/impl/parser/state/redefine.java | 168 +- .../xsom/impl/parser/state/simpleType.java | 196 +- .../xsom/impl/parser/state/wildcardBody.java | 204 +- .../xsom/impl/parser/state/xpath.java | 128 +- .../xsom/impl/scd/AbstractAxisImpl.java | 1 + .../sun/xml/internal/xsom/impl/scd/Axis.java | 1 + .../xml/internal/xsom/impl/scd/Iterators.java | 1 + .../xsom/impl/scd/ParseException.java | 10 +- .../xml/internal/xsom/impl/scd/SCDImpl.java | 1 + .../xsom/impl/scd/SCDParserConstants.java | 105 +- .../sun/xml/internal/xsom/impl/scd/Step.java | 1 + .../xsom/impl/util/DraconianErrorHandler.java | 2 + .../impl/util/ResourceEntityResolver.java | 2 + .../xsom/impl/util/SchemaTreeTraverser.java | 1 + .../internal/xsom/impl/util/SchemaWriter.java | 190 +- .../sun/xml/internal/xsom/impl/util/Uri.java | 24 - .../xsom/parser/AnnotationContext.java | 2 + .../xsom/parser/AnnotationParser.java | 2 + .../xsom/parser/AnnotationParserFactory.java | 2 + .../xml/internal/xsom/parser/JAXPParser.java | 2 + .../internal/xsom/parser/SchemaDocument.java | 1 + .../xml/internal/xsom/parser/XMLParser.java | 2 + .../xml/internal/xsom/parser/XSOMParser.java | 2 + .../sun/xml/internal/xsom/parser/package.html | 2 +- .../xsom/util/ComponentNameFunction.java | 2 +- .../internal/xsom/util/DeferedCollection.java | 1 + .../xsom/util/DomAnnotationParserFactory.java | 1 + .../xml/internal/xsom/util/NameGetter.java | 2 + .../internal/xsom/util/NameGetter.properties | 31 +- .../xml/internal/xsom/util/SimpleTypeSet.java | 2 + .../xml/internal/xsom/util/TypeClosure.java | 2 + .../sun/xml/internal/xsom/util/TypeSet.java | 2 + .../sun/xml/internal/xsom/util/XSFinder.java | 2 + .../internal/xsom/util/XSFunctionFilter.java | 2 + .../xsom/visitor/XSContentTypeFunction.java | 2 + .../xsom/visitor/XSContentTypeVisitor.java | 2 + .../xml/internal/xsom/visitor/XSFunction.java | 2 + .../xsom/visitor/XSSimpleTypeFunction.java | 2 + .../xsom/visitor/XSSimpleTypeVisitor.java | 2 + .../internal/xsom/visitor/XSTermFunction.java | 2 + .../xsom/visitor/XSTermFunctionWithParam.java | 1 + .../internal/xsom/visitor/XSTermVisitor.java | 2 + .../xml/internal/xsom/visitor/XSVisitor.java | 2 + .../xsom/visitor/XSWildcardFunction.java | 2 + .../xsom/visitor/XSWildcardVisitor.java | 2 + .../xml/internal/xsom/visitor/package.html | 2 +- .../classes/javax/xml/bind/ContextFinder.java | 47 +- .../javax/xml/bind/DatatypeConverter.java | 2 +- .../javax/xml/bind/DatatypeConverterImpl.java | 2 +- .../xml/bind/DatatypeConverterInterface.java | 2 +- .../share/classes/javax/xml/bind/Element.java | 2 +- .../classes/javax/xml/bind/JAXBContext.java | 2 +- .../classes/javax/xml/bind/JAXBException.java | 2 +- .../javax/xml/bind/MarshalException.java | 2 +- .../classes/javax/xml/bind/Marshaller.java | 2 +- .../javax/xml/bind/Messages.properties | 26 +- .../javax/xml/bind/NotIdentifiableEvent.java | 2 +- .../javax/xml/bind/ParseConversionEvent.java | 2 +- .../javax/xml/bind/PrintConversionEvent.java | 2 +- .../javax/xml/bind/PropertyException.java | 2 +- .../xml/bind/TypeConstraintException.java | 2 +- .../javax/xml/bind/UnmarshalException.java | 2 +- .../classes/javax/xml/bind/Unmarshaller.java | 2 +- .../javax/xml/bind/UnmarshallerHandler.java | 2 +- .../javax/xml/bind/ValidationEvent.java | 2 +- .../xml/bind/ValidationEventHandler.java | 2 +- .../xml/bind/ValidationEventLocator.java | 2 +- .../javax/xml/bind/ValidationException.java | 2 +- .../classes/javax/xml/bind/Validator.java | 2 +- .../xml/bind/annotation/XmlAccessOrder.java | 2 +- .../xml/bind/annotation/XmlAccessType.java | 2 +- .../xml/bind/annotation/XmlAccessorOrder.java | 2 +- .../xml/bind/annotation/XmlAccessorType.java | 2 +- .../xml/bind/annotation/XmlAttribute.java | 2 +- .../javax/xml/bind/annotation/XmlElement.java | 2 +- .../javax/xml/bind/annotation/XmlID.java | 2 +- .../javax/xml/bind/annotation/XmlIDREF.java | 2 +- .../javax/xml/bind/annotation/XmlNs.java | 2 +- .../javax/xml/bind/annotation/XmlNsForm.java | 2 +- .../javax/xml/bind/annotation/XmlSchema.java | 2 +- .../javax/xml/bind/annotation/XmlSeeAlso.java | 2 +- .../xml/bind/annotation/XmlTransient.java | 2 +- .../javax/xml/bind/annotation/XmlType.java | 2 +- .../javax/xml/bind/annotation/XmlValue.java | 2 +- .../adapters/XmlJavaTypeAdapter.java | 2 +- .../xml/bind/annotation/adapters/package.html | 4 +- .../javax/xml/bind/annotation/package.html | 26 +- .../javax/xml/bind/attachment/package.html | 18 +- .../bind/helpers/AbstractMarshallerImpl.java | 2 +- .../helpers/AbstractUnmarshallerImpl.java | 2 +- .../DefaultValidationEventHandler.java | 2 +- .../xml/bind/helpers/Messages.properties | 34 +- .../helpers/NotIdentifiableEventImpl.java | 2 +- .../helpers/ParseConversionEventImpl.java | 2 +- .../helpers/PrintConversionEventImpl.java | 2 +- .../xml/bind/helpers/ValidationEventImpl.java | 2 +- .../helpers/ValidationEventLocatorImpl.java | 2 +- .../javax/xml/bind/helpers/package.html | 16 +- .../share/classes/javax/xml/bind/package.html | 10 +- .../javax/xml/bind/util/Messages.properties | 23 +- .../bind/util/ValidationEventCollector.java | 2 +- .../classes/javax/xml/bind/util/package.html | 10 +- .../javax/xml/soap/AttachmentPart.java | 6 +- .../share/classes/javax/xml/soap/Detail.java | 6 +- .../classes/javax/xml/soap/DetailEntry.java | 6 +- .../classes/javax/xml/soap/FactoryFinder.java | 6 +- .../javax/xml/soap/MessageFactory.java | 6 +- .../classes/javax/xml/soap/MimeHeader.java | 6 +- .../classes/javax/xml/soap/MimeHeaders.java | 6 +- .../share/classes/javax/xml/soap/Name.java | 6 +- .../share/classes/javax/xml/soap/Node.java | 6 +- .../javax/xml/soap/SAAJMetaFactory.java | 6 +- .../classes/javax/xml/soap/SAAJResult.java | 2 +- .../classes/javax/xml/soap/SOAPBody.java | 6 +- .../javax/xml/soap/SOAPBodyElement.java | 6 +- .../javax/xml/soap/SOAPConnection.java | 6 +- .../javax/xml/soap/SOAPConnectionFactory.java | 6 +- .../classes/javax/xml/soap/SOAPConstants.java | 6 +- .../classes/javax/xml/soap/SOAPElement.java | 6 +- .../javax/xml/soap/SOAPElementFactory.java | 6 +- .../classes/javax/xml/soap/SOAPEnvelope.java | 6 +- .../classes/javax/xml/soap/SOAPException.java | 6 +- .../classes/javax/xml/soap/SOAPFactory.java | 4 +- .../classes/javax/xml/soap/SOAPFault.java | 6 +- .../javax/xml/soap/SOAPFaultElement.java | 6 +- .../classes/javax/xml/soap/SOAPHeader.java | 6 +- .../javax/xml/soap/SOAPHeaderElement.java | 6 +- .../classes/javax/xml/soap/SOAPMessage.java | 6 +- .../classes/javax/xml/soap/SOAPPart.java | 6 +- .../share/classes/javax/xml/soap/Text.java | 6 +- .../share/classes/javax/xml/soap/package.html | 12 +- .../javax/xml/ws/spi/FactoryFinder.java | 6 +- .../ws/wsaddressing/W3CEndpointReference.java | 3 +- .../org/relaxng/datatype/Datatype.java | 1 - .../org/relaxng/datatype/DatatypeBuilder.java | 1 - .../relaxng/datatype/DatatypeException.java | 1 - .../org/relaxng/datatype/DatatypeLibrary.java | 1 - .../datatype/DatatypeLibraryFactory.java | 1 - .../datatype/DatatypeStreamingValidator.java | 1 - .../relaxng/datatype/ValidationContext.java | 1 - .../helpers/DatatypeLibraryLoader.java | 3 +- .../helpers/ParameterlessDatatypeBuilder.java | 1 - .../helpers/StreamingValidatorImpl.java | 1 - 1399 files changed, 123816 insertions(+), 12509 deletions(-) create mode 100644 jaxws/jaxws.patch create mode 100644 jaxws/patch.out delete mode 100644 jaxws/src/share/classes/com/sun/codemodel/internal/fmt/package.html create mode 100644 jaxws/src/share/classes/com/sun/istack/internal/Builder.java create mode 100644 jaxws/src/share/classes/com/sun/istack/internal/localization/Localizable.java create mode 100644 jaxws/src/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java rename jaxws/src/share/classes/com/sun/{xml/internal/ws/addressing/model/InvalidMapException.java => istack/internal/localization/LocalizableMessageFactory.java} (71%) create mode 100644 jaxws/src/share/classes/com/sun/istack/internal/localization/Localizer.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/api/WsgenExtension.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/api/WsgenProtocol.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/wscompile/DefaultAuthTester.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/wscompile/DefaultAuthenticator.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/XJCFacade.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/generator/annotation/ri/OverrideAnnotationOfWriter.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java create mode 100644 jaxws/src/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/annotation/OverrideAnnotationOf.java rename jaxws/src/share/classes/com/sun/{tools/internal/xjc/api/impl/j2s => xml/internal/bind/api}/Messages.java (91%) rename jaxws/src/share/classes/com/sun/{tools/internal/xjc/api/impl/j2s => xml/internal/bind/api}/Messages.properties (94%) create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/runtime/AttributeAccessor.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXExConnector.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/bind/v2/util/StackRecorder.java delete mode 100644 jaxws/src/share/classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocator.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/txw2/output/TXWResult.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/txw2/output/TXWSerializer.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/ResourceLoader.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/ClientContainer.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java delete mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/ResponseImpl.java delete mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/sei/AsyncBuilder.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java rename jaxws/src/share/classes/com/sun/xml/internal/ws/client/sei/{package-info.java => pacakge-info.java} (100%) create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/SchemaValidation.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java delete mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/AbstractXMLStreamWriterExImpl.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/ContentType.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/ParameterList.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/message/FaultMessage.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/model/FieldSignature.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/model/Injector.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationVisitor.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationWriter.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Attribute.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/ByteVector.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassReader.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassVisitor.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassWriter.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Edge.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldVisitor.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldWriter.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Frame.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Handler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Item.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Label.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodVisitor.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodWriter.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Opcodes.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/org/objectweb/asm/Type.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/server/JMXAgent.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/server/sei/SOAPActionBasedDispatcher.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java delete mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/streaming/XMLReader.java rename jaxws/src/share/classes/com/sun/xml/internal/ws/{addressing/model/MapRequiredException.java => transport/http/HttpDump.java} (77%) create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/transport/http/HttpDumpMBean.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/util/MetadataUtil.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/util/RuntimeVersionMBean.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/util/xml/MetadataDocument.java create mode 100644 jaxws/src/share/classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java diff --git a/jaxws/THIRD_PARTY_README b/jaxws/THIRD_PARTY_README index 690890548f2..43058486295 100644 --- a/jaxws/THIRD_PARTY_README +++ b/jaxws/THIRD_PARTY_README @@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. --- end of LICENSE file --- %% This notice is provided with respect to ASM, which may be included with this software: -Copyright (c) 2000-2005 INRIA, France Telecom +Copyright (c) 2000-2007 INRIA, France Telecom All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/jaxws/jaxws.patch b/jaxws/jaxws.patch new file mode 100644 index 00000000000..12bd76ee9d9 --- /dev/null +++ b/jaxws/jaxws.patch @@ -0,0 +1,81929 @@ +--- old/./THIRD_PARTY_README Tue Aug 4 09:26:42 2009 ++++ new/./THIRD_PARTY_README Tue Aug 4 09:26:41 2009 +@@ -32,7 +32,7 @@ + + --- end of LICENSE file --- + %% This notice is provided with respect to ASM, which may be included with this software: +-Copyright (c) 2000-2005 INRIA, France Telecom ++Copyright (c) 2000-2007 INRIA, France Telecom + All rights reserved. + + Redistribution and use in source and binary forms, with or without +--- old/src/share/classes/com/sun/codemodel/internal/JAnnotatable.java Tue Aug 4 09:26:44 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JAnnotatable.java Tue Aug 4 09:26:44 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.lang.annotation.Annotation; +--- old/src/share/classes/com/sun/codemodel/internal/JAnnotationUse.java Tue Aug 4 09:26:46 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JAnnotationUse.java Tue Aug 4 09:26:46 2009 +@@ -199,8 +199,7 @@ + * + */ + public JAnnotationUse param(String name, Class value){ +- addValue(name, new JAnnotationStringValue(JExpr.lit(value.getName()))); +- return this; ++ return param(name,clazz.owner().ref(value)); + } + + /** +--- old/src/share/classes/com/sun/codemodel/internal/JAnnotationWriter.java Tue Aug 4 09:26:48 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JAnnotationWriter.java Tue Aug 4 09:26:48 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.lang.annotation.Annotation; +--- old/src/share/classes/com/sun/codemodel/internal/JBlock.java Tue Aug 4 09:26:51 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JBlock.java Tue Aug 4 09:26:50 2009 +@@ -111,7 +111,15 @@ + return r; + } + ++ /** ++ * Returns true if this block is empty and does not contain ++ * any statement. ++ */ ++ public boolean isEmpty() { ++ return content.isEmpty(); ++ } + ++ + /** + * Adds a local variable declaration to this block + * +--- old/src/share/classes/com/sun/codemodel/internal/JCommentPart.java Tue Aug 4 09:26:53 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JCommentPart.java Tue Aug 4 09:26:52 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.util.ArrayList; +@@ -77,7 +78,8 @@ + */ + protected void format( JFormatter f, String indent ) { + if(!f.isPrinting()) { +- // quickly pass the types to JFormatter ++ // quickly pass the types to JFormatter, as that's all we care. ++ // we don't need to worry about the exact formatting of text. + for( Object o : this ) + if(o instanceof JClass) + f.g((JClass)o); +@@ -97,12 +99,12 @@ + while( (idx=s.indexOf('\n'))!=-1 ) { + String line = s.substring(0,idx); + if(line.length()>0) +- f.p(line); ++ f.p(escape(line)); + s = s.substring(idx+1); + f.nl().p(indent); + } + if(s.length()!=0) +- f.p(s); ++ f.p(escape(s)); + } else + if(o instanceof JClass) { + // TODO: this doesn't print the parameterized type properly +@@ -117,4 +119,16 @@ + if(!isEmpty()) + f.nl(); + } ++ ++ /** ++ * Escapes the appearance of the comment terminator. ++ */ ++ private String escape(String s) { ++ while(true) { ++ int idx = s.indexOf("*/"); ++ if(idx <0) return s; ++ ++ s = s.substring(0,idx+1)+""+s.substring(idx+1); ++ } ++ } + } +--- old/src/share/classes/com/sun/codemodel/internal/JDirectClass.java Tue Aug 4 09:26:55 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JDirectClass.java Tue Aug 4 09:26:55 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.util.Iterator; +--- old/src/share/classes/com/sun/codemodel/internal/JExpr.java Tue Aug 4 09:26:57 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JExpr.java Tue Aug 4 09:26:57 2009 +@@ -198,8 +198,12 @@ + char c = s.charAt(i); + int j = charEscape.indexOf(c); + if(j>=0) { +- sb.append('\\'); +- sb.append(charMacro.charAt(j)); ++ if((quote=='"' && c=='\'') || (quote=='\'' && c=='"')) { ++ sb.append(c); ++ } else { ++ sb.append('\\'); ++ sb.append(charMacro.charAt(j)); ++ } + } else { + // technically Unicode escape shouldn't be done here, + // for it's a lexical level handling. +--- old/src/share/classes/com/sun/codemodel/internal/JJavaName.java Tue Aug 4 09:26:59 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JJavaName.java Tue Aug 4 09:26:59 2009 +@@ -231,6 +231,7 @@ + "(.*)basis","$1bases", + "(.*)axis","$1axes", + "(.+)is","$1ises", ++ "(.+)ss","$1sses", + "(.+)us","$1uses", + "(.+)s","$1s", + "(.*)foot","$1feet", +--- old/src/share/classes/com/sun/codemodel/internal/JMethod.java Tue Aug 4 09:27:02 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JMethod.java Tue Aug 4 09:27:01 2009 +@@ -388,10 +388,11 @@ + f.g(a).nl(); + } + +- // declare the generics parameters ++ f.g(mods); ++ ++ // declare the generics parameters + super.declare(f); + +- f.g(mods); + if (!isConstructor()) + f.g(type); + f.id(name).p('(').i(); +--- old/src/share/classes/com/sun/codemodel/internal/JPackage.java Tue Aug 4 09:27:04 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JPackage.java Tue Aug 4 09:27:03 2009 +@@ -98,34 +98,9 @@ + JPackage(String name, JCodeModel cw) { + this.owner = cw; + if (name.equals(".")) { +- String msg = "JPackage name . is not allowed"; ++ String msg = "Package name . is not allowed"; + throw new IllegalArgumentException(msg); + } +- +- int dots = 1; +- for (int i = 0; i < name.length(); i++) { +- char c = name.charAt(i); +- if (c == '.') { +- dots++; +- continue; +- } +- if (dots > 1) { +- String msg = "JPackage name " + name + " missing identifier"; +- throw new IllegalArgumentException(msg); +- } else if (dots == 1 && !Character.isJavaIdentifierStart(c)) { +- String msg = +- "JPackage name " + name + " contains illegal " + "character for beginning of identifier: " + c; +- throw new IllegalArgumentException(msg); +- } else if (!Character.isJavaIdentifierPart(c)) { +- String msg = "JPackage name " + name + "contains illegal " + "character: " + c; +- throw new IllegalArgumentException(msg); +- } +- dots = 0; +- } +- if (!name.trim().equals("") && dots != 0) { +- String msg = "JPackage name not allowed to end with ."; +- throw new IllegalArgumentException(msg); +- } + + if(JCodeModel.isCaseSensitiveFileSystem) + upperCaseClassMap = null; +--- old/src/share/classes/com/sun/codemodel/internal/JTypeWildcard.java Tue Aug 4 09:27:06 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/JTypeWildcard.java Tue Aug 4 09:27:06 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.util.Iterator; +--- old/src/share/classes/com/sun/codemodel/internal/TypedAnnotationWriter.java Tue Aug 4 09:27:08 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/TypedAnnotationWriter.java Tue Aug 4 09:27:08 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal; + + import java.lang.reflect.InvocationHandler; +--- old/src/share/classes/com/sun/codemodel/internal/package-info.java Tue Aug 4 09:27:10 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/package-info.java Tue Aug 4 09:27:10 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + /** + *

Library for generating Java source code

. + * +--- old/src/share/classes/com/sun/codemodel/internal/util/EncoderFactory.java Tue Aug 4 09:27:12 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/util/EncoderFactory.java Tue Aug 4 09:27:12 2009 +@@ -22,11 +22,10 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + /* + * @(#)$Id: EncoderFactory.java,v 1.3 2005/09/10 19:07:33 kohsuke Exp $ + */ +- +- + package com.sun.codemodel.internal.util; + + import java.lang.reflect.Constructor; +--- old/src/share/classes/com/sun/codemodel/internal/util/MS1252Encoder.java Tue Aug 4 09:27:15 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/util/MS1252Encoder.java Tue Aug 4 09:27:14 2009 +@@ -22,11 +22,10 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + /* + * @(#)$Id: MS1252Encoder.java,v 1.2 2005/09/10 19:07:33 kohsuke Exp $ + */ +- +- + package com.sun.codemodel.internal.util; + + import java.nio.charset.Charset; +--- old/src/share/classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java Tue Aug 4 09:27:17 2009 ++++ new/src/share/classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java Tue Aug 4 09:27:16 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.codemodel.internal.writer; + + import java.io.OutputStream; +--- old/src/share/classes/com/sun/istack/internal/Pool.java Tue Aug 4 09:27:19 2009 ++++ new/src/share/classes/com/sun/istack/internal/Pool.java Tue Aug 4 09:27:19 2009 +@@ -25,6 +25,7 @@ + package com.sun.istack.internal; + + import java.util.concurrent.ConcurrentLinkedQueue; ++import java.lang.ref.WeakReference; + + /** + * Pool of reusable objects that are indistinguishable from each other, +@@ -33,6 +34,7 @@ + * @author Kohsuke Kawaguchi + */ + public interface Pool { ++ + /** + * Gets a new object from the pool. + * +@@ -46,7 +48,6 @@ + */ + void recycle(@NotNull T t); + +- + /** + * Default implementation that uses {@link ConcurrentLinkedQueue} + * as the data store. +@@ -55,7 +56,10 @@ + *

+ * Don't rely on the fact that this class extends from {@link ConcurrentLinkedQueue}. + */ +- public abstract class Impl extends ConcurrentLinkedQueue implements Pool { ++ public abstract class Impl implements Pool { ++ ++ private volatile WeakReference> queue; ++ + /** + * Gets a new object from the pool. + * +@@ -66,9 +70,10 @@ + * always non-null. + */ + public final @NotNull T take() { +- T t = super.poll(); +- if(t==null) ++ T t = getQueue().poll(); ++ if(t==null) { + return create(); ++ } + return t; + } + +@@ -76,9 +81,24 @@ + * Returns an object back to the pool. + */ + public final void recycle(T t) { +- super.offer(t); ++ getQueue().offer(t); + } + ++ private ConcurrentLinkedQueue getQueue() { ++ WeakReference> q = queue; ++ if (q != null) { ++ ConcurrentLinkedQueue d = q.get(); ++ if (d != null) { ++ return d; ++ } ++ } ++ // overwrite the queue ++ ConcurrentLinkedQueue d = new ConcurrentLinkedQueue(); ++ queue = new WeakReference>(d); ++ ++ return d; ++ } ++ + /** + * Creates a new instance of object. + * +--- old/src/share/classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java Tue Aug 4 09:27:21 2009 ++++ new/src/share/classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java Tue Aug 4 09:27:21 2009 +@@ -54,14 +54,24 @@ + + // if true, when the conversion is completed, leave the cursor to the last + // event that was fired (such as end element) +- private boolean eagerQuit; ++ private final boolean eagerQuit; + + /** + * If true, not start/endDocument event. + */ +- private boolean fragment; ++ private final boolean fragment; + ++ // array of the even length of the form { prefix0, uri0, prefix1, uri1, ... } ++ private final String[] inscopeNamespaces; ++ + /** ++ * @see #XMLStreamReaderToContentHandler(XMLStreamReader, ContentHandler, boolean, boolean, String[]) ++ */ ++ public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment) { ++ this(staxCore, saxCore, eagerQuit, fragment, new String[0]); ++ } ++ ++ /** + * Construct a new StAX to SAX adapter that will convert a StAX event + * stream into a SAX event stream. + * +@@ -69,14 +79,22 @@ + * StAX event source + * @param saxCore + * SAXevent sink ++ * @param eagerQuit ++ * @param fragment ++ * @param inscopeNamespaces ++ * array of the even length of the form { prefix0, uri0, prefix1, uri1, ... } + */ +- public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment) { ++ public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, ++ boolean eagerQuit, boolean fragment, String[] inscopeNamespaces) { + this.staxStreamReader = staxCore; + this.saxHandler = saxCore; + this.eagerQuit = eagerQuit; + this.fragment = fragment; ++ this.inscopeNamespaces = inscopeNamespaces; ++ assert inscopeNamespaces.length%2 == 0; + } + ++ + /* + * @see StAXReaderToContentHandler#bridge() + */ +@@ -100,6 +118,10 @@ + + handleStartDocument(); + ++ for(int i=0; i < inscopeNamespaces.length; i+=2) { ++ saxHandler.startPrefixMapping(inscopeNamespaces[i], inscopeNamespaces[i+1]); ++ } ++ + OUTER: + do { + // These are all of the events listed in the javadoc for +@@ -156,6 +178,10 @@ + event=staxStreamReader.next(); + } while (depth!=0); + ++ for(int i=0; i < inscopeNamespaces.length; i+=2) { ++ saxHandler.endPrefixMapping(inscopeNamespaces[i]); ++ } ++ + handleEndDocument(); + } catch (SAXException e) { + throw new XMLStreamException2(e); +--- old/src/share/classes/com/sun/istack/internal/ws/AnnotationProcessorFactoryImpl.java Tue Aug 4 09:27:23 2009 ++++ new/src/share/classes/com/sun/istack/internal/ws/AnnotationProcessorFactoryImpl.java Tue Aug 4 09:27:23 2009 +@@ -66,10 +66,7 @@ + types.add("javax.jws.soap.SOAPBinding"); + types.add("javax.jws.soap.SOAPMessageHandler"); + types.add("javax.jws.soap.SOAPMessageHandlers"); +- types.add("javax.xml.ws.BeginService"); +- types.add("javax.xml.ws.EndService"); + types.add("javax.xml.ws.BindingType"); +- types.add("javax.xml.ws.ParameterIndex"); + types.add("javax.xml.ws.RequestWrapper"); + types.add("javax.xml.ws.ResponseWrapper"); + types.add("javax.xml.ws.ServiceMode"); +@@ -78,8 +75,6 @@ + types.add("javax.xml.ws.WebServiceClient"); + types.add("javax.xml.ws.WebServiceProvider"); + types.add("javax.xml.ws.WebServiceRef"); +- +- types.add("javax.xml.ws.security.MessageSecurity"); + supportedAnnotations = Collections.unmodifiableCollection(types); + } + +--- old/src/share/classes/com/sun/tools/internal/jxc/ConfigReader.java Tue Aug 4 09:27:26 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/ConfigReader.java Tue Aug 4 09:27:25 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties Tue Aug 4 09:27:28 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties Tue Aug 4 09:27:27 2009 +@@ -30,8 +30,8 @@ + Non-existent directory: {0} + + VERSION = \ +- schemagen version "JAXB 2.1.3" \n\ +- JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.3 in JDK) ++ schemagen version "JAXB 2.1.10 in JDK 6" \n\ ++ JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10 in JDK 6) + + USAGE = \ + Usage: schemagen [-options ...] \n\ +@@ -42,4 +42,3 @@ + \ \ \ \ -episode : generate episode file for separate compilation\n\ + \ \ \ \ -version : display version information\n\ + \ \ \ \ -help : display this usage message +- +--- old/src/share/classes/com/sun/tools/internal/jxc/Messages.java Tue Aug 4 09:27:30 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/Messages.java Tue Aug 4 09:27:30 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc; + + import java.text.MessageFormat; +--- old/src/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java Tue Aug 4 09:27:32 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java Tue Aug 4 09:27:32 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/AnnotationParser.java Tue Aug 4 09:27:34 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/AnnotationParser.java Tue Aug 4 09:27:34 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/AnnotationProcessorFactoryImpl.java Tue Aug 4 09:27:36 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/AnnotationProcessorFactoryImpl.java Tue Aug 4 09:27:36 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.util.Arrays; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/Const.java Tue Aug 4 09:27:39 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/Const.java Tue Aug 4 09:27:38 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/ErrorReceiverImpl.java Tue Aug 4 09:27:41 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/ErrorReceiverImpl.java Tue Aug 4 09:27:40 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import com.sun.mirror.apt.AnnotationProcessorEnvironment; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/InlineAnnotationReaderImpl.java Tue Aug 4 09:27:43 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/InlineAnnotationReaderImpl.java Tue Aug 4 09:27:43 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.lang.annotation.Annotation; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/MessageBundle.properties Tue Aug 4 09:27:45 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/MessageBundle.properties Tue Aug 4 09:27:45 2009 +@@ -31,4 +31,3 @@ + + OPERAND_MISSING = \ + Option "{0}" is missing an operand. +- +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/Messages.java Tue Aug 4 09:27:47 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/Messages.java Tue Aug 4 09:27:47 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.text.MessageFormat; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/Options.java Tue Aug 4 09:27:49 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/Options.java Tue Aug 4 09:27:49 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/apt/SchemaGenerator.java Tue Aug 4 09:27:52 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/apt/SchemaGenerator.java Tue Aug 4 09:27:51 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.apt; + + import java.io.File; +--- old/src/share/classes/com/sun/tools/internal/jxc/gen/config/Classes.java Tue Aug 4 09:27:54 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/gen/config/Classes.java Tue Aug 4 09:27:53 2009 +@@ -75,6 +75,11 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); ++ } ++ break; + case 12: + { + if(($__uri == "" && $__local == "classes")) { +@@ -92,34 +97,29 @@ + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + break; +- case 2: ++ case 11: + { +- if(($__uri == "" && $__local == "excludes")) { ++ if(($__uri == "" && $__local == "includes")) { + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); +- $_ngcc_current_state = 6; ++ $_ngcc_current_state = 10; + } + else { +- $_ngcc_current_state = 1; +- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); ++ unexpectedEnterElement($__qname); + } + } + break; +- case 11: ++ case 2: + { +- if(($__uri == "" && $__local == "includes")) { ++ if(($__uri == "" && $__local == "excludes")) { + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); +- $_ngcc_current_state = 10; ++ $_ngcc_current_state = 6; + } + else { +- unexpectedEnterElement($__qname); ++ $_ngcc_current_state = 1; ++ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + } + break; +- case 0: +- { +- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); +- } +- break; + default: + { + unexpectedEnterElement($__qname); +@@ -133,6 +133,17 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); ++ } ++ break; ++ case 4: ++ { ++ $_ngcc_current_state = 3; ++ $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); ++ } ++ break; + case 3: + { + if(($__uri == "" && $__local == "excludes")) { +@@ -144,12 +155,6 @@ + } + } + break; +- case 4: +- { +- $_ngcc_current_state = 3; +- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); +- } +- break; + case 2: + { + $_ngcc_current_state = 1; +@@ -156,11 +161,11 @@ + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + break; +- case 1: ++ case 8: + { +- if(($__uri == "" && $__local == "classes")) { ++ if(($__uri == "" && $__local == "includes")) { + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); +- $_ngcc_current_state = 0; ++ $_ngcc_current_state = 2; + } + else { + unexpectedLeaveElement($__qname); +@@ -167,11 +172,11 @@ + } + } + break; +- case 8: ++ case 1: + { +- if(($__uri == "" && $__local == "includes")) { ++ if(($__uri == "" && $__local == "classes")) { + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); +- $_ngcc_current_state = 2; ++ $_ngcc_current_state = 0; + } + else { + unexpectedLeaveElement($__qname); +@@ -178,11 +183,6 @@ + } + } + break; +- case 0: +- { +- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); +- } +- break; + default: + { + unexpectedLeaveElement($__qname); +@@ -196,6 +196,11 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); ++ } ++ break; + case 4: + { + $_ngcc_current_state = 3; +@@ -208,11 +213,6 @@ + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; +- case 0: +- { +- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); +- } +- break; + default: + { + unexpectedEnterAttribute($__qname); +@@ -226,6 +226,11 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); ++ } ++ break; + case 4: + { + $_ngcc_current_state = 3; +@@ -238,11 +243,6 @@ + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; +- case 0: +- { +- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); +- } +- break; + default: + { + unexpectedLeaveAttribute($__qname); +@@ -253,6 +253,11 @@ + + public void text(String $value) throws SAXException { + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromText(this, super._cookie, $value); ++ } ++ break; + case 9: + { + include_content = $value; +@@ -260,7 +265,7 @@ + action2(); + } + break; +- case 3: ++ case 4: + { + exclude_content = $value; + $_ngcc_current_state = 3; +@@ -267,7 +272,7 @@ + action0(); + } + break; +- case 4: ++ case 3: + { + exclude_content = $value; + $_ngcc_current_state = 3; +@@ -301,11 +306,6 @@ + action1(); + } + break; +- case 0: +- { +- revertToParentFromText(this, super._cookie, $value); +- } +- break; + } + } + +--- old/src/share/classes/com/sun/tools/internal/jxc/gen/config/Config.java Tue Aug 4 09:27:56 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/gen/config/Config.java Tue Aug 4 09:27:56 2009 +@@ -70,15 +70,10 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { +- case 0: ++ case 4: + { +- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); +- } +- break; +- case 1: +- { +- if(($__uri == "" && $__local == "schema")) { +- NGCCHandler h = new Schema(this, super._source, $runtime, 3, baseDir); ++ if(($__uri == "" && $__local == "classes")) { ++ NGCCHandler h = new Classes(this, super._source, $runtime, 34); + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); + } + else { +@@ -97,10 +92,26 @@ + } + } + break; ++ case 1: ++ { ++ if(($__uri == "" && $__local == "schema")) { ++ NGCCHandler h = new Schema(this, super._source, $runtime, 31, baseDir); ++ spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); ++ } ++ else { ++ unexpectedEnterElement($__qname); ++ } ++ } ++ break; ++ case 0: ++ { ++ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); ++ } ++ break; + case 2: + { + if(($__uri == "" && $__local == "schema")) { +- NGCCHandler h = new Schema(this, super._source, $runtime, 4, baseDir); ++ NGCCHandler h = new Schema(this, super._source, $runtime, 32, baseDir); + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); + } + else { +@@ -120,17 +131,6 @@ + } + } + break; +- case 4: +- { +- if(($__uri == "" && $__local == "classes")) { +- NGCCHandler h = new Classes(this, super._source, $runtime, 6); +- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); +- } +- else { +- unexpectedEnterElement($__qname); +- } +- } +- break; + default: + { + unexpectedEnterElement($__qname); +@@ -145,11 +145,6 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { +- case 0: +- { +- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); +- } +- break; + case 1: + { + if(($__uri == "" && $__local == "config")) { +@@ -161,6 +156,11 @@ + } + } + break; ++ case 0: ++ { ++ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); ++ } ++ break; + case 2: + { + $_ngcc_current_state = 1; +@@ -257,13 +257,6 @@ + public void text(String $value) throws SAXException { + int $ai; + switch($_ngcc_current_state) { +- case 6: +- { +- bd = $value; +- $_ngcc_current_state = 5; +- action1(); +- } +- break; + case 0: + { + revertToParentFromText(this, super._cookie, $value); +@@ -283,19 +276,32 @@ + } + } + break; ++ case 6: ++ { ++ bd = $value; ++ $_ngcc_current_state = 5; ++ action1(); ++ } ++ break; + } + } + + public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException { + switch($__cookie__) { +- case 3: ++ case 34: + { ++ classes = ((Classes)$__result__); ++ $_ngcc_current_state = 2; ++ } ++ break; ++ case 31: ++ { + _schema = ((Schema)$__result__); + action0(); + $_ngcc_current_state = 1; + } + break; +- case 4: ++ case 32: + { + _schema = ((Schema)$__result__); + action0(); +@@ -302,12 +308,6 @@ + $_ngcc_current_state = 1; + } + break; +- case 6: +- { +- classes = ((Classes)$__result__); +- $_ngcc_current_state = 2; +- } +- break; + } + } + +--- old/src/share/classes/com/sun/tools/internal/jxc/gen/config/Schema.java Tue Aug 4 09:27:58 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/gen/config/Schema.java Tue Aug 4 09:27:58 2009 +@@ -65,6 +65,23 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { ++ case 0: ++ { ++ revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); ++ } ++ break; ++ case 2: ++ { ++ if(($ai = $runtime.getAttributeIndex("","location"))>=0) { ++ $runtime.consumeAttribute($ai); ++ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); ++ } ++ else { ++ $_ngcc_current_state = 1; ++ $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); ++ } ++ } ++ break; + case 6: + { + if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { +@@ -88,23 +105,6 @@ + } + } + break; +- case 0: +- { +- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); +- } +- break; +- case 2: +- { +- if(($ai = $runtime.getAttributeIndex("","location"))>=0) { +- $runtime.consumeAttribute($ai); +- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); +- } +- else { +- $_ngcc_current_state = 1; +- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); +- } +- } +- break; + default: + { + unexpectedEnterElement($__qname); +@@ -119,23 +119,23 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { +- case 6: ++ case 0: + { +- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { ++ revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); ++ } ++ break; ++ case 2: ++ { ++ if(($ai = $runtime.getAttributeIndex("","location"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + else { +- $_ngcc_current_state = 2; ++ $_ngcc_current_state = 1; + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + } + break; +- case 0: +- { +- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); +- } +- break; + case 1: + { + if(($__uri == "" && $__local == "schema")) { +@@ -147,14 +147,14 @@ + } + } + break; +- case 2: ++ case 6: + { +- if(($ai = $runtime.getAttributeIndex("","location"))>=0) { ++ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + else { +- $_ngcc_current_state = 1; ++ $_ngcc_current_state = 2; + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + } +@@ -172,17 +172,6 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { +- case 6: +- { +- if(($__uri == "" && $__local == "namespace")) { +- $_ngcc_current_state = 8; +- } +- else { +- $_ngcc_current_state = 2; +- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); +- } +- } +- break; + case 0: + { + revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); +@@ -199,6 +188,17 @@ + } + } + break; ++ case 6: ++ { ++ if(($__uri == "" && $__local == "namespace")) { ++ $_ngcc_current_state = 8; ++ } ++ else { ++ $_ngcc_current_state = 2; ++ $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); ++ } ++ } ++ break; + default: + { + unexpectedEnterAttribute($__qname); +@@ -212,15 +212,15 @@ + $localName = $__local; + $qname = $__qname; + switch($_ngcc_current_state) { +- case 6: ++ case 0: + { +- $_ngcc_current_state = 2; +- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); ++ revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); + } + break; +- case 0: ++ case 2: + { +- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); ++ $_ngcc_current_state = 1; ++ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; + case 7: +@@ -233,6 +233,12 @@ + } + } + break; ++ case 6: ++ { ++ $_ngcc_current_state = 2; ++ $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); ++ } ++ break; + case 3: + { + if(($__uri == "" && $__local == "location")) { +@@ -243,12 +249,6 @@ + } + } + break; +- case 2: +- { +- $_ngcc_current_state = 1; +- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); +- } +- break; + default: + { + unexpectedLeaveAttribute($__qname); +@@ -260,24 +260,6 @@ + public void text(String $value) throws SAXException { + int $ai; + switch($_ngcc_current_state) { +- case 8: +- { +- namespace = $value; +- $_ngcc_current_state = 7; +- } +- break; +- case 6: +- { +- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { +- $runtime.consumeAttribute($ai); +- $runtime.sendText(super._cookie, $value); +- } +- else { +- $_ngcc_current_state = 2; +- $runtime.sendText(super._cookie, $value); +- } +- } +- break; + case 0: + { + revertToParentFromText(this, super._cookie, $value); +@@ -295,6 +277,12 @@ + } + } + break; ++ case 8: ++ { ++ namespace = $value; ++ $_ngcc_current_state = 7; ++ } ++ break; + case 4: + { + loc = $value; +@@ -302,6 +290,18 @@ + action0(); + } + break; ++ case 6: ++ { ++ if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { ++ $runtime.consumeAttribute($ai); ++ $runtime.sendText(super._cookie, $value); ++ } ++ else { ++ $_ngcc_current_state = 2; ++ $runtime.sendText(super._cookie, $value); ++ } ++ } ++ break; + } + } + +--- old/src/share/classes/com/sun/tools/internal/jxc/gen/config/config.xsd Tue Aug 4 09:28:01 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/gen/config/config.xsd Tue Aug 4 09:28:00 2009 +@@ -23,6 +23,8 @@ + CA 95054 USA or visit www.sun.com if you need additional information or + have any questions. + --> ++ ++ + + + +--- old/src/share/classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java Tue Aug 4 09:28:03 2009 ++++ new/src/share/classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java Tue Aug 4 09:28:02 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.jxc.model.nav; + + import java.util.ArrayList; +@@ -306,7 +307,7 @@ + } + + public boolean isInnerClass(TypeDeclaration clazz) { +- return clazz.getDeclaringType()!=null; ++ return clazz.getDeclaringType()!=null && !clazz.getModifiers().contains(Modifier.STATIC); + } + + public boolean isArray(TypeMirror t) { +--- old/src/share/classes/com/sun/tools/internal/ws/Invoker.java Tue Aug 4 09:28:05 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/Invoker.java Tue Aug 4 09:28:05 2009 +@@ -55,10 +55,12 @@ + static int invoke(String mainClass, String[] args) throws Throwable { + // use the platform default proxy if available. + // see sun.net.spi.DefaultProxySelector for details. +- try { +- System.setProperty("java.net.useSystemProxies","true"); +- } catch (SecurityException e) { +- // failing to set this property isn't fatal ++ if(!noSystemProxies) { ++ try { ++ System.setProperty("java.net.useSystemProxies","true"); ++ } catch (SecurityException e) { ++ // failing to set this property isn't fatal ++ } + } + + ClassLoader oldcc = Thread.currentThread().getContextClassLoader(); +@@ -220,4 +222,18 @@ + "com.sun.xml.internal.bind.", + "com.sun.xml.internal.ws." + }; ++ ++ /** ++ * Escape hatch to work around IBM JDK problem. ++ * See http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?nav=false&forum=367&thread=164718&cat=10 ++ */ ++ public static boolean noSystemProxies = false; ++ ++ static { ++ try { ++ noSystemProxies = Boolean.getBoolean(Invoker.class.getName()+".noSystemProxies"); ++ } catch(SecurityException e) { ++ // ignore ++ } ++ } + } +--- old/src/share/classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java Tue Aug 4 09:28:07 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java Tue Aug 4 09:28:07 2009 +@@ -34,6 +34,7 @@ + * + * @see JavaGeneratorExtensionFacade + * @author Vivek Pandey ++ * @deprecated This class is deprecated, will be removed in JAX-WS 2.2 RI. + */ + public abstract class TJavaGeneratorExtension { + /** +--- old/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java Tue Aug 4 09:28:09 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java Tue Aug 4 09:28:09 2009 +@@ -32,6 +32,8 @@ + * A WSDL element or attribute that can be extended. + * + * @author Vivek Pandey ++ * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI. ++ * + */ + public interface TWSDLExtensible { + /** +--- old/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java Tue Aug 4 09:28:12 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java Tue Aug 4 09:28:11 2009 +@@ -29,6 +29,7 @@ + * A WSDL extension + * + * @author Vivek Pandey ++ * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI. + */ + public interface TWSDLExtension { + /** +--- old/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java Tue Aug 4 09:28:14 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java Tue Aug 4 09:28:13 2009 +@@ -33,6 +33,7 @@ + * with it for the WSDL extensibility elements thats not already defined in the WSDL 1.1 spec, such as SOAP or MIME. + * + * @author Vivek Pandey ++ * @deprecated This class is deprecated, will be removed in JAX-WS 2.2 RI. + */ + public abstract class TWSDLExtensionHandler { + /** +--- old/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java Tue Aug 4 09:28:16 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java Tue Aug 4 09:28:15 2009 +@@ -33,6 +33,7 @@ + * Abstracts wsdl:portType/wsdl:operation + * + * @author Vivek Pandey ++ * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI. + */ + public interface TWSDLOperation extends TWSDLExtensible{ + /** +--- old/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java Tue Aug 4 09:28:18 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java Tue Aug 4 09:28:18 2009 +@@ -33,6 +33,7 @@ + * it can be latter used by other extensions to resolve the namespaces. + * + * @author Vivek Pandey ++ * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI. + */ + public interface TWSDLParserContext { + +--- old/src/share/classes/com/sun/tools/internal/ws/package-info.java Tue Aug 4 09:28:20 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/package-info.java Tue Aug 4 09:28:20 2009 +@@ -24,7 +24,7 @@ + */ + + /** +- *

JAX-WS 2.0.1 Tools

++ *

JAX-WS 2.1 Tools

+ * This document describes the tools included with JAX-WS 2.0.1. + * + * {@DotDiagram +@@ -42,7 +42,7 @@ + + // libraries + node [style=filled,color=lightblue]; +- CompileTool; "WSAP"; WebServiceAP; Processor; Modeler; ProcessorActions; ++ WsimportTool; WsgenTool;"WSAP"; WebServiceAP; WSDLModeler;WSDLParser;SeiGenerator;ServiceGenerator;ExceptionGenerator;"JAXB XJC APIs";CodeModel; + + // aps + # node [style=filled,color=lightpink]; +@@ -49,15 +49,17 @@ + # "JAX-WS"; tools; runtime; SPI; "Annotation Processor"; + + "Apt ANT Task" -> APT; +- "WsGen ANT Task" -> wsgen -> CompileTool; +- "WsImport ANT Task" -> wsimport -> CompileTool; ++ "WsGen ANT Task" -> wsgen -> WsgenTool; ++ "WsImport ANT Task" -> wsimport -> WsimportTool; + +- CompileTool -> APT -> WSAP -> WebServiceAP; +- CompileTool -> Processor -> Modeler; +- Processor -> ProcessorActions; +- CompileTool -> WebServiceAP; +- +- Modeler -> WSDLModeler; ++ WsgenTool -> APT -> WSAP -> WebServiceAP; ++ WsimportTool -> WSDLModeler; ++ WSDLModeler->WSDLParser; ++ WSDLModeler->"JAXB XJC APIs" ++ WsimportTool->SeiGenerator->CodeModel; ++ WsimportTool->ServiceGenerator->CodeModel; ++ WsimportTool->ExceptionGenerator->CodeModel; ++ WebServiceAP->CodeModel + } + * } + *
+--- old/src/share/classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java Tue Aug 4 09:28:23 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java Tue Aug 4 09:28:22 2009 +@@ -156,12 +156,14 @@ + return comments; + } + +- protected JDefinedClass getClass(String className, ClassType type) { ++ protected JDefinedClass getClass(String className, ClassType type) throws JClassAlreadyExistsException { + JDefinedClass cls; + try { + cls = cm._class(className, type); + } catch (JClassAlreadyExistsException e){ + cls = cm._getClass(className); ++ if(cls == null) ++ throw e; + } + return cls; + } +--- old/src/share/classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java Tue Aug 4 09:28:25 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java Tue Aug 4 09:28:24 2009 +@@ -36,7 +36,11 @@ + import com.sun.tools.internal.ws.wscompile.ErrorReceiver; + import com.sun.tools.internal.ws.wscompile.Options; + import com.sun.tools.internal.ws.wscompile.WsimportOptions; ++import com.sun.tools.internal.ws.wscompile.AbortException; + import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; ++import com.sun.tools.internal.ws.wsdl.document.PortType; ++import com.sun.tools.internal.ws.wsdl.document.Kinds; ++import com.sun.tools.internal.ws.resources.GeneratorMessages; + + import javax.jws.WebMethod; + import javax.jws.WebParam; +@@ -48,6 +52,8 @@ + import java.util.ArrayList; + import java.util.List; + ++import org.xml.sax.Locator; ++ + public class SeiGenerator extends GeneratorBase{ + private String serviceNS; + private TJavaGeneratorExtension extension; +@@ -83,10 +89,22 @@ + } + + +- JDefinedClass cls = getClass(className, ClassType.INTERFACE); +- if (cls == null) ++ JDefinedClass cls = null; ++ try { ++ cls = getClass(className, ClassType.INTERFACE); ++ } catch (JClassAlreadyExistsException e) { ++ QName portTypeName = ++ (QName) port.getProperty( ++ ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME); ++ Locator loc = null; ++ if(portTypeName != null){ ++ PortType pt = port.portTypes.get(portTypeName); ++ if(pt!=null) ++ loc = pt.getLocator(); ++ } ++ receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName)); + return; +- ++ } + // If the class has methods it has already been defined + // so skip it. + if (!cls.methods().isEmpty()) +@@ -441,15 +459,7 @@ + if (port.isProvider()) { + return; // Not generating for Provider based endpoint + } +- +- +- try { +- write(port); +- } catch (Exception e) { +- throw new GeneratorException( +- "generator.nestedGeneratorError", +- e); +- } ++ write(port); + } + + private void register(TJavaGeneratorExtension h) { +--- old/src/share/classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java Tue Aug 4 09:28:27 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java Tue Aug 4 09:28:27 2009 +@@ -29,11 +29,13 @@ + import com.sun.tools.internal.ws.processor.model.Model; + import com.sun.tools.internal.ws.processor.model.Port; + import com.sun.tools.internal.ws.processor.model.Service; ++import com.sun.tools.internal.ws.processor.model.ModelProperties; + import com.sun.tools.internal.ws.processor.model.java.JavaInterface; + import com.sun.tools.internal.ws.wscompile.ErrorReceiver; + import com.sun.tools.internal.ws.wscompile.Options; + import com.sun.tools.internal.ws.wscompile.WsimportOptions; + import com.sun.tools.internal.ws.resources.GeneratorMessages; ++import com.sun.tools.internal.ws.wsdl.document.PortType; + import com.sun.xml.internal.bind.api.JAXBRIContext; + import com.sun.xml.internal.ws.util.JAXWSUtils; + +@@ -42,161 +44,174 @@ + import javax.xml.ws.WebServiceClient; + import javax.xml.ws.WebServiceFeature; + import java.io.IOException; ++import java.io.File; + import java.net.MalformedURLException; + import java.net.URL; ++import java.util.logging.Logger; + ++import org.xml.sax.Locator; + ++ + /** +- * + * @author WS Development Team + */ +-public class ServiceGenerator extends GeneratorBase{ ++public class ServiceGenerator extends GeneratorBase { + +- public static void generate(Model model, WsimportOptions options, ErrorReceiver receiver){ ++ public static void generate(Model model, WsimportOptions options, ErrorReceiver receiver) { + ServiceGenerator serviceGenerator = new ServiceGenerator(model, options, receiver); + serviceGenerator.doGeneration(); + } ++ + private ServiceGenerator(Model model, WsimportOptions options, ErrorReceiver receiver) { + super(model, options, receiver); + } + +- private JInvocation createURL(URL url) { +- return JExpr._new(cm.ref(URL.class)).arg(url.toExternalForm()); +- } +- + @Override + public void visit(Service service) { ++ JavaInterface intf = service.getJavaInterface(); ++ String className = Names.customJavaTypeClassName(intf); ++ if (donotOverride && GeneratorUtil.classExists(options, className)) { ++ log("Class " + className + " exists. Not overriding."); ++ return; ++ } ++ ++ JDefinedClass cls; + try { +- JavaInterface intf = service.getJavaInterface(); +- String className = Names.customJavaTypeClassName(intf); +- if (donotOverride && GeneratorUtil.classExists(options, className)) { +- log("Class " + className + " exists. Not overriding."); +- return; +- } ++ cls = getClass(className, ClassType.CLASS); ++ } catch (JClassAlreadyExistsException e) { ++ receiver.error(service.getLocator(), GeneratorMessages.GENERATOR_SERVICE_CLASS_ALREADY_EXIST(className, service.getName())); ++ return; ++ } + +- JDefinedClass cls = getClass(className, ClassType.CLASS); ++ cls._extends(javax.xml.ws.Service.class); ++ String serviceFieldName = JAXBRIContext.mangleNameToClassName(service.getName().getLocalPart()).toUpperCase(); ++ String wsdlLocationName = serviceFieldName + "_WSDL_LOCATION"; ++ JFieldVar urlField = cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, URL.class, wsdlLocationName); + +- cls._extends(javax.xml.ws.Service.class); +- String serviceFieldName = JAXBRIContext.mangleNameToClassName(service.getName().getLocalPart()).toUpperCase(); +- String wsdlLocationName = serviceFieldName+"_WSDL_LOCATION"; +- JFieldVar urlField = cls.field(JMod.PRIVATE|JMod.STATIC|JMod.FINAL, URL.class, wsdlLocationName); +- JClass qNameCls = cm.ref(QName.class); +- JInvocation inv; +- inv = JExpr._new(qNameCls); +- inv.arg("namespace"); +- inv.arg("localpart"); + ++ cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, Logger.class, "logger", cm.ref(Logger.class).staticInvoke("getLogger").arg(JExpr.dotclass(cm.ref(className)).invoke("getName"))); + +- JBlock staticBlock = cls.init(); +- URL url = new URL(JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation))); +- JVar urlVar = staticBlock.decl(cm.ref(URL.class),"url", JExpr._null()); +- JTryBlock tryBlock = staticBlock._try(); +- tryBlock.body().assign(urlVar, createURL(url)); +- JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class)); +- catchBlock.param("e"); +- catchBlock.body().directStatement("e.printStackTrace();"); +- staticBlock.assign(urlField, urlVar); ++ JClass qNameCls = cm.ref(QName.class); ++ JInvocation inv; ++ inv = JExpr._new(qNameCls); ++ inv.arg("namespace"); ++ inv.arg("localpart"); + +- //write class comment - JAXWS warning +- JDocComment comment = cls.javadoc(); + +- if(service.getJavaDoc() != null){ +- comment.add(service.getJavaDoc()); +- comment.add("\n\n"); +- } ++ JBlock staticBlock = cls.init(); ++ JVar urlVar = staticBlock.decl(cm.ref(URL.class), "url", JExpr._null()); ++ JTryBlock tryBlock = staticBlock._try(); ++ JVar baseUrl = tryBlock.body().decl(cm.ref(URL.class), "baseUrl"); ++ tryBlock.body().assign(baseUrl, JExpr.dotclass(cm.ref(className)).invoke("getResource").arg(".")); ++ tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(baseUrl).arg(wsdlLocation)); ++ JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class)); ++ catchBlock.param("e"); + +- for (String doc : getJAXWSClassComment()) { +- comment.add(doc); +- } ++ catchBlock.body().directStatement("logger.warning(\"Failed to create URL for the wsdl Location: " + JExpr.quotify('\'', wsdlLocation) + ", retrying as a local file\");"); ++ catchBlock.body().directStatement("logger.warning(e.getMessage());"); + +- JMethod constructor = cls.constructor(JMod.PUBLIC); +- constructor.param(URL.class, "wsdlLocation"); +- constructor.param(QName.class, "serviceName"); +- constructor.body().directStatement("super(wsdlLocation, serviceName);"); ++ staticBlock.assign(urlField, urlVar); + +- constructor = cls.constructor(JMod.PUBLIC); +- constructor.body().directStatement("super("+wsdlLocationName+", new QName(\""+service.getName().getNamespaceURI()+"\", \""+service.getName().getLocalPart()+"\"));"); ++ //write class comment - JAXWS warning ++ JDocComment comment = cls.javadoc(); + +- //@WebService +- JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class)); +- writeWebServiceClientAnnotation(service, webServiceClientAnn); ++ if (service.getJavaDoc() != null) { ++ comment.add(service.getJavaDoc()); ++ comment.add("\n\n"); ++ } + +- //@HandlerChain +- writeHandlerConfig(Names.customJavaTypeClassName(service.getJavaInterface()), cls, options); ++ for (String doc : getJAXWSClassComment()) { ++ comment.add(doc); ++ } + +- for (Port port: service.getPorts()) { +- if (port.isProvider()) { +- continue; // No getXYZPort() for porvider based endpoint +- } ++ JMethod constructor = cls.constructor(JMod.PUBLIC); ++ constructor.param(URL.class, "wsdlLocation"); ++ constructor.param(QName.class, "serviceName"); ++ constructor.body().directStatement("super(wsdlLocation, serviceName);"); + +- //write getXyzPort() +- writeDefaultGetPort(port, cls); ++ constructor = cls.constructor(JMod.PUBLIC); ++ constructor.body().directStatement("super(" + wsdlLocationName + ", new QName(\"" + service.getName().getNamespaceURI() + "\", \"" + service.getName().getLocalPart() + "\"));"); + +- //write getXyzPort(WebServicesFeature...) +- if(options.target.isLaterThan(Options.Target.V2_1)) +- writeGetPort(port, cls); ++ //@WebService ++ JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class)); ++ writeWebServiceClientAnnotation(service, webServiceClientAnn); ++ ++ //@HandlerChain ++ writeHandlerConfig(Names.customJavaTypeClassName(service.getJavaInterface()), cls, options); ++ ++ for (Port port : service.getPorts()) { ++ if (port.isProvider()) { ++ continue; // No getXYZPort() for porvider based endpoint + } +- } catch (IOException e) { +- receiver.error(e); ++ ++ //Get the SEI class ++ JType retType; ++ try { ++ retType = getClass(port.getJavaInterface().getName(), ClassType.INTERFACE); ++ } catch (JClassAlreadyExistsException e) { ++ QName portTypeName = ++ (QName) port.getProperty( ++ ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME); ++ Locator loc = null; ++ if (portTypeName != null) { ++ PortType pt = port.portTypes.get(portTypeName); ++ if (pt != null) ++ loc = pt.getLocator(); ++ } ++ receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(port.getJavaInterface().getName(), portTypeName)); ++ return; ++ } ++ ++ //write getXyzPort() ++ writeDefaultGetPort(port, retType, cls); ++ ++ //write getXyzPort(WebServicesFeature...) ++ if (options.target.isLaterThan(Options.Target.V2_1)) ++ writeGetPort(port, retType, cls); + } + } + +- private void writeGetPort(Port port, JDefinedClass cls) { +- JType retType = getClass(port.getJavaInterface().getName(), ClassType.INTERFACE); ++ private void writeGetPort(Port port, JType retType, JDefinedClass cls) { + JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter()); + JDocComment methodDoc = m.javadoc(); +- if(port.getJavaDoc() != null) ++ if (port.getJavaDoc() != null) + methodDoc.add(port.getJavaDoc()); + JCommentPart ret = methodDoc.addReturn(); + JCommentPart paramDoc = methodDoc.addParam("features"); + paramDoc.append("A list of "); +- paramDoc.append("{@link "+WebServiceFeature.class.getName()+"}"); ++ paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}"); + paramDoc.append("to configure on the proxy. Supported features not in the features parameter will have their default values."); +- ret.add("returns "+retType.name()); ++ ret.add("returns " + retType.name()); + m.varParam(WebServiceFeature.class, "features"); + JBlock body = m.body(); +- StringBuffer statement = new StringBuffer("return ("); ++ StringBuffer statement = new StringBuffer("return "); ++ statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); + statement.append(retType.name()); +- statement.append(")super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); +- statement.append(retType.name()); + statement.append(".class, features);"); + body.directStatement(statement.toString()); + writeWebEndpoint(port, m); + } + +- private void writeDefaultGetPort(Port port, JDefinedClass cls) { +- JType retType = getClass(port.getJavaInterface().getName(), ClassType.INTERFACE); ++ private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) { + String portGetter = port.getPortGetter(); + JMethod m = cls.method(JMod.PUBLIC, retType, portGetter); + JDocComment methodDoc = m.javadoc(); +- if(port.getJavaDoc() != null) ++ if (port.getJavaDoc() != null) + methodDoc.add(port.getJavaDoc()); + JCommentPart ret = methodDoc.addReturn(); +- ret.add("returns "+retType.name()); ++ ret.add("returns " + retType.name()); + JBlock body = m.body(); +- StringBuffer statement = new StringBuffer("return ("); ++ StringBuffer statement = new StringBuffer("return "); ++ statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); + statement.append(retType.name()); +- statement.append(")super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); +- statement.append(retType.name()); + statement.append(".class);"); + body.directStatement(statement.toString()); + writeWebEndpoint(port, m); + } + +- +- protected JDefinedClass getClass(String className, ClassType type) { +- JDefinedClass cls; +- try { +- cls = cm._class(className, type); +- } catch (JClassAlreadyExistsException e){ +- cls = cm._getClass(className); +- } +- return cls; +- } +- + private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) { + String serviceName = service.getName().getLocalPart(); +- String serviceNS= service.getName().getNamespaceURI(); ++ String serviceNS = service.getName().getNamespaceURI(); + wsa.param("name", serviceName); + wsa.param("targetNamespace", serviceNS); + wsa.param("wsdlLocation", wsdlLocation); +--- old/src/share/classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java Tue Aug 4 09:28:29 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java Tue Aug 4 09:28:29 2009 +@@ -22,9 +22,6 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +-/* +- * $Id: W3CAddressingJavaGeneratorExtension.java,v 1.1.2.4 2006/10/31 19:57:28 vivekp Exp $ +- */ + + package com.sun.tools.internal.ws.processor.generator; + +--- old/src/share/classes/com/sun/tools/internal/ws/processor/model/Port.java Tue Aug 4 09:28:31 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/model/Port.java Tue Aug 4 09:28:31 2009 +@@ -26,6 +26,7 @@ + package com.sun.tools.internal.ws.processor.model; + + import com.sun.tools.internal.ws.processor.model.java.JavaInterface; ++import com.sun.tools.internal.ws.wsdl.document.PortType; + import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; + import com.sun.tools.internal.ws.wsdl.framework.Entity; + +@@ -174,4 +175,5 @@ + private String _address; + private String _serviceImplName; + private Map operationsByName = new HashMap(); ++ public Map portTypes = new HashMap(); + } +--- old/src/share/classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java Tue Aug 4 09:28:34 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java Tue Aug 4 09:28:33 2009 +@@ -27,6 +27,7 @@ + + import com.sun.tools.internal.ws.resources.ModelMessages; + import com.sun.tools.internal.ws.wscompile.ErrorReceiver; ++import com.sun.tools.internal.ws.wscompile.WsimportOptions; + import com.sun.tools.internal.ws.processor.model.Parameter; + + import java.util.ArrayList; +@@ -42,12 +43,14 @@ + private final String name; + private final List parameters = new ArrayList(); + private final List exceptions = new ArrayList(); ++ private final WsimportOptions options; + private JavaType returnType; + +- public JavaMethod(String name, ErrorReceiver receiver) { ++ public JavaMethod(String name, WsimportOptions options, ErrorReceiver receiver) { + this.name = name; + this.returnType = null; + this.errorReceiver = receiver; ++ this.options = options; + } + + public String getName() { +@@ -83,10 +86,19 @@ + public void addParameter(JavaParameter param) { + // verify that this member does not already exist + if (hasParameter(param.getName())) { +- errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getParameter().getEntityName())); +- Parameter duplicParam = getParameter(param.getName()); +- errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), duplicParam.getEntityName())); +- return; ++ if(options.isExtensionMode()){ ++ param.setName(getUniqueName(param.getName())); ++ }else{ ++ Parameter duplicParam = getParameter(param.getName()); ++ if(param.getParameter().isEmbedded()){ ++ errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), param.getParameter().getEntityName())); ++ errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), duplicParam.getEntityName())); ++ }else{ ++ errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getParameter().getEntityName())); ++ errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), duplicParam.getEntityName())); ++ } ++ return; ++ } + } + parameters.add(param); + } +@@ -106,4 +118,12 @@ + public Iterator getExceptions() { + return exceptions.iterator(); + } ++ ++ private String getUniqueName(String param){ ++ int parmNum = 0; ++ while(hasParameter(param)){ ++ param = param + Integer.toString(parmNum++); ++ } ++ return param; ++ } + } +--- old/src/share/classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java Tue Aug 4 09:28:36 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java Tue Aug 4 09:28:35 2009 +@@ -71,11 +71,11 @@ + } + + public boolean isUnwrappable(){ +- return getJaxbMapping().getWrapperStyleDrilldown() != null; ++ return jaxbMapping != null && jaxbMapping.getWrapperStyleDrilldown() != null; + } + + public boolean hasWrapperChildren(){ +- return (getWrapperChildren().size() > 0) ? true : false; ++ return wrapperChildren.size() > 0; + } + + public boolean isLiteralType() { +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAP.java Tue Aug 4 09:28:38 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAP.java Tue Aug 4 09:28:38 2009 +@@ -210,6 +210,7 @@ + public void onError(String message) { + if (messager != null) { + messager.printError(message); ++ throw new AbortException(); + } else { + throw new ModelerException(message); + } +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java Tue Aug 4 09:28:40 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java Tue Aug 4 09:28:40 2009 +@@ -441,10 +441,21 @@ + + protected boolean shouldProcessMethod(MethodDeclaration method, WebMethod webMethod) { + builder.log("should process method: "+method.getSimpleName()+" hasWebMethods: "+ hasWebMethods+" "); ++ /* ++ Fix for https://jax-ws.dev.java.net/issues/show_bug.cgi?id=577 + if (hasWebMethods && webMethod == null) { + builder.log("webMethod == null"); + return false; + } ++ */ ++ Collection modifiers = method.getModifiers(); ++ boolean staticFinal = modifiers.contains(Modifier.STATIC) || modifiers.contains(Modifier.FINAL); ++ if (staticFinal) { ++ if (webMethod != null) { ++ builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(method.getDeclaringType(), method)); ++ } ++ return false; ++ } + boolean retval = (endpointReferencesInterface || + method.getDeclaringType().equals(typeDecl) || + (method.getDeclaringType().getAnnotation(WebService.class) != null)); +@@ -474,10 +485,6 @@ + builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(classDecl.getQualifiedName())); + return false; + } +- if (classDecl.getDeclaringType() != null && !modifiers.contains(Modifier.STATIC) && !isStateful) { +- builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(classDecl.getQualifiedName())); +- return false; +- } + boolean hasDefaultConstructor = false; + for (ConstructorDeclaration constructor : classDecl.getConstructors()) { + if (constructor.getModifiers().contains(Modifier.PUBLIC) && +@@ -487,6 +494,11 @@ + } + } + if (!hasDefaultConstructor && !isStateful) { ++ if (classDecl.getDeclaringType() != null && !modifiers.contains(Modifier.STATIC)) { ++ builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(classDecl.getQualifiedName())); ++ return false; ++ } ++ + builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(classDecl.getQualifiedName())); + return false; + } +@@ -578,7 +590,7 @@ + } + ClassType superClass = classDecl.getSuperclass(); + +- if (!superClass.getDeclaration().getQualifiedName().equals(JAVA_LANG_OBJECT) && superClass != null && !methodsAreLegal(superClass.getDeclaration())) { ++ if (!superClass.getDeclaration().getQualifiedName().equals(JAVA_LANG_OBJECT) && !methodsAreLegal(superClass.getDeclaration())) { + return false; + } + return true; +@@ -596,11 +608,13 @@ + if (!hasWebMethods && (webMethod !=null) && webMethod.exclude()) { + return true; + } ++ /* ++ This check is not needed as Impl class is already checked that it is not abstract. + if (typeDecl instanceof ClassDeclaration && method.getModifiers().contains(Modifier.ABSTRACT)) { + builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(typeDecl.getQualifiedName(), method.getSimpleName())); + return false; + } +- ++ */ + if (!isLegalType(method.getReturnType())) { + builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(typeDecl.getQualifiedName(), + method.getSimpleName(), +@@ -750,7 +764,12 @@ + protected boolean isLegalType(TypeMirror type) { + if (!(type instanceof DeclaredType)) + return true; +- return !builder.isRemote(((DeclaredType)type).getDeclaration()); ++ TypeDeclaration typeDecl = ((DeclaredType)type).getDeclaration(); ++ if(typeDecl == null) { ++ // can be null, if this type's declaration is unknown. This may be the result of a processing error, such as a missing class file. ++ builder.onError(WebserviceapMessages.WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(typeDecl.toString(), context.getRound())); ++ } ++ return !builder.isRemote(typeDecl); + } + + protected ParameterDeclaration getOutParameter(MethodDeclaration method) { +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java Tue Aug 4 09:28:43 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java Tue Aug 4 09:28:42 2009 +@@ -127,8 +127,10 @@ + boolean beanGenerated = false; + for (ReferenceType thrownType : method.getThrownTypes()) { + ClassDeclaration typeDecl = ((ClassType)thrownType).getDeclaration(); +- if (typeDecl == null) ++ if (typeDecl == null){ + builder.onError(WebserviceapMessages.WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(thrownType.toString(), context.getRound())); ++ return false; ++ } + boolean tmp = generateExceptionBean(typeDecl, beanPackage); + beanGenerated = beanGenerated || tmp; + } +@@ -195,7 +197,7 @@ + if (resWrapper.targetNamespace().length() > 0) + resNamespace = resWrapper.targetNamespace(); + } +- canOverwriteResponse = builder.canOverWriteClass(requestClassName); ++ canOverwriteResponse = builder.canOverWriteClass(responseClassName); + if (!canOverwriteResponse) { + builder.log("Class " + responseClassName + " exists. Not overwriting."); + } +@@ -593,7 +595,7 @@ + return; + + String accessorName =JAXBRIContext.mangleNameToPropertyName(paramName); +- String getterPrefix = paramType.equals("boolean") || paramType.equals("java.lang.Boolean") ? "is" : "get"; ++ String getterPrefix = paramType.toString().equals("boolean")? "is" : "get"; + JType propType = getType(paramType); + JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName); + JDocComment methodDoc = m.javadoc(); +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java Tue Aug 4 09:28:45 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java Tue Aug 4 09:28:45 2009 +@@ -57,6 +57,8 @@ + print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e); + } + ++ ++ + public void fatalError(SAXParseException e) { + if(debug) + e.printStackTrace(); +@@ -76,6 +78,11 @@ + print(WscompileMessages.WSIMPORT_INFO_MESSAGE(e.getMessage()), e); + } + ++ public void debug(SAXParseException e){ ++ print(WscompileMessages.WSIMPORT_DEBUG_MESSAGE(e.getMessage()), e); ++ } ++ ++ + private void print(String message, SAXParseException e) { + output.println(message); + output.println(getLocationString(e)); +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java Tue Aug 4 09:28:47 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java Tue Aug 4 09:28:47 2009 +@@ -28,6 +28,7 @@ + import static com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModelerBase.getExtensionOfType; + import com.sun.tools.internal.ws.wscompile.ErrorReceiver; + import com.sun.tools.internal.ws.wscompile.WsimportOptions; ++import com.sun.tools.internal.ws.wscompile.Options; + import com.sun.tools.internal.ws.wsdl.document.*; + import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBinding; + import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds; +@@ -101,7 +102,7 @@ + is.setSystemId(sysId+(i + 1)); + } + //add w3c EPR binding +- if(!(options.noAddressingBbinding && options.isExtensionMode())){ ++ if(!(options.noAddressingBbinding) && options.target.isLaterThan(Options.Target.V2_1)){ + InputSource is = new InputSource(new ByteArrayInputStream(w3ceprSchemaBinding.getBytes())); + is.setSystemId(sysId+(++i +1)); + b.schemas.add(is); +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java Tue Aug 4 09:28:49 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java Tue Aug 4 09:28:49 2009 +@@ -74,7 +74,7 @@ + public class WSDLModeler extends WSDLModelerBase { + + //map of wsdl:operation QName to child, as per BP it must be unique in a port +- private final Map uniqueBodyBlocks = new HashMap(); ++ private final Map uniqueBodyBlocks = new HashMap(); + private final QName VOID_BODYBLOCK = new QName(""); + private ClassNameCollector classNameCollector; + private final String explicitDefaultPackage; +@@ -334,11 +334,12 @@ + || (!soapBinding.getTransport().equals( + SOAPConstants.URI_SOAP_TRANSPORT_HTTP) && !soapBinding.getTransport().equals( + SOAP12Constants.URI_SOAP_TRANSPORT_HTTP)))) { +- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(wsdlPort.getName())); + if (!options.isExtensionMode()) { + // cannot deal with non-HTTP ports ++ warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(wsdlPort.getName())); + return false; + } ++ + } + + /** +@@ -679,7 +680,12 @@ + + if (soapStyle == SOAPStyle.RPC) { + if (soapRequestBody.isEncoded()) { +- error(soapRequestBody, ModelerMessages.WSDLMODELER_20_RPCENC_NOT_SUPPORTED()); ++ if(options.isExtensionMode()){ ++ warning(soapRequestBody, ModelerMessages.WSDLMODELER_20_RPCENC_NOT_SUPPORTED()); ++ processNonSOAPOperation(); ++ }else{ ++ error(soapRequestBody, ModelerMessages.WSDLMODELER_20_RPCENC_NOT_SUPPORTED()); ++ } + } + return processLiteralSOAPOperation(StyleAndUse.RPC_LITERAL); + } +@@ -815,20 +821,71 @@ + QName body = VOID_BODYBLOCK; + QName opName = null; + ++ Operation thatOp; + if (bb.hasNext()) { + body = bb.next().getName(); +- opName = uniqueBodyBlocks.get(body); ++ thatOp = uniqueBodyBlocks.get(body); + } else { + //there is no body block + body = VOID_BODYBLOCK; +- opName = uniqueBodyBlocks.get(VOID_BODYBLOCK); ++ thatOp = uniqueBodyBlocks.get(VOID_BODYBLOCK); + } +- if (opName != null) { +- error(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY(info.port.getName(), info.operation.getName(), opName, body)); +- } else { +- uniqueBodyBlocks.put(body, info.operation.getName()); ++ ++ if(thatOp != null){ ++ if(options.isExtensionMode()){ ++ warning(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_WARNING(info.port.getName(), info.operation.getName(), thatOp.getName(), body)); ++ }else{ ++ error(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_ERROR(info.port.getName(), info.operation.getName(), thatOp.getName(), body)); ++ } ++ }else{ ++ uniqueBodyBlocks.put(body, info.operation); + } + ++ //Add additional headers ++ if (options.additionalHeaders) { ++ List additionalHeaders = new ArrayList(); ++ if (inputMessage != null) { ++ for (MessagePart part : getAdditionHeaderParts(inputMessage, true)) { ++ QName name = part.getDescriptor(); ++ JAXBType jaxbType = getJAXBType(part); ++ Block block = new Block(name, jaxbType, part); ++ Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, block); ++ additionalHeaders.add(param); ++ request.addHeaderBlock(block); ++ request.addParameter(param); ++ definitiveParameterList.add(param); ++ } ++ } ++ ++ if (isRequestResponse && outputMessage != null) { ++ List outParams = new ArrayList(); ++ for (MessagePart part : getAdditionHeaderParts(outputMessage, false)) { ++ QName name = part.getDescriptor(); ++ JAXBType jaxbType = getJAXBType(part); ++ Block block = new Block(name, jaxbType, part); ++ Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, block); ++ param.setMode(Mode.OUT); ++ outParams.add(param); ++ response.addHeaderBlock(block); ++ response.addParameter(param); ++ } ++ for (Parameter outParam : outParams) { ++ for (Parameter inParam : additionalHeaders) { ++ if (inParam.getName().equals(outParam.getName()) && ++ inParam.getBlock().getName().equals(outParam.getBlock().getName())) { ++ //it is INOUT ++ inParam.setMode(Mode.INOUT); ++ outParam.setMode(Mode.INOUT); ++ break; ++ } ++ } ++ if (outParam.isOUT()) { ++ definitiveParameterList.add(outParam); ++ } ++ } ++ } ++ } ++ + // faults with duplicate names + Set duplicateNames = getDuplicateFaultNames(); + +@@ -848,6 +905,7 @@ + return info.operation; + } + ++ + private boolean validateParameterName(List params) { + if (options.isExtensionMode()) + return true; +@@ -1460,6 +1518,19 @@ + return null; + } + ++ private List getAdditionHeaderParts(Message message, boolean isInput){ ++ List headerParts = new ArrayList(); ++ List parts = message.getParts(); ++ List headers = getHeaderParts(isInput); ++ ++ for(MessagePart part: headers){ ++ if(parts.contains(part)) ++ continue; ++ headerParts.add(part); ++ } ++ return headerParts; ++ } ++ + private List getHeaderPartsFromMessage(Message message, boolean isInput) { + List headerParts = new ArrayList(); + Iterator parts = message.parts(); +@@ -1490,19 +1561,6 @@ + return null; + } + +- private List getHeaderPartsNotFromMessage(Message message, boolean isInput) { +- List headerParts = new ArrayList(); +- List parts = message.getParts(); +- Iterator headers = getHeaderParts(isInput).iterator(); +- while (headers.hasNext()) { +- MessagePart part = headers.next(); +- if (!parts.contains(part)) { +- headerParts.add(part); +- } +- } +- return headerParts; +- } +- + private List getHeaderParts(boolean isInput) { + TWSDLExtensible ext; + if (isInput) { +@@ -2247,6 +2305,10 @@ + (QName) port.getProperty( + ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME); + PortType pt = (PortType) document.find(Kinds.PORT_TYPE, portTypeName); ++ //populate the portType map here. We should get rid of all these properties ++ // lets not do it as it may break NB ++ //TODO: clean all these stuff part of NB RFE ++ port.portTypes.put(portTypeName, pt); + JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(pt, JAXWSBinding.class); + if (jaxwsCust != null && jaxwsCust.getClassName() != null) { + CustomName name = jaxwsCust.getClassName(); +@@ -2271,7 +2333,7 @@ + private void createJavaMethodForAsyncOperation(Port port, Operation operation, + JavaInterface intf) { + String candidateName = getJavaNameForOperation(operation); +- JavaMethod method = new JavaMethod(candidateName, errReceiver); ++ JavaMethod method = new JavaMethod(candidateName, options, errReceiver); + Request request = operation.getRequest(); + Iterator requestBodyBlocks = request.getBodyBlocks(); + Block requestBlock = +@@ -2338,7 +2400,7 @@ + return; + } + String candidateName = getJavaNameForOperation(operation); +- JavaMethod method = new JavaMethod(candidateName, errReceiver); ++ JavaMethod method = new JavaMethod(candidateName, options, errReceiver); + Request request = operation.getRequest(); + Parameter returnParam = (Parameter) operation.getProperty(WSDL_RESULT_PARAMETER); + if (returnParam != null) { +@@ -2718,7 +2780,7 @@ + + private void reportError(Entity entity, + String formattedMsg, Exception nestedException ) { +- Locator locator = (entity == null)?NULL_LOCATOR:entity.getLocator(); ++ Locator locator = (entity == null)?null:entity.getLocator(); + + SAXParseException e = new SAXParseException2( formattedMsg, + locator, +--- old/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java Tue Aug 4 09:28:52 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java Tue Aug 4 09:28:52 2009 +@@ -288,23 +288,11 @@ + private boolean validateMimeContentPartNames(List mimeContents) { + //validate mime:content(s) in the mime:part as per R2909 + for (MIMEContent mimeContent : mimeContents) { +- String mimeContnetPart = null; ++ String mimeContnetPart; ++ mimeContnetPart = getMimeContentPartName(mimeContent); + if(mimeContnetPart == null) { +- mimeContnetPart = getMimeContentPartName(mimeContent); +- if(mimeContnetPart == null) { +- warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); +- return false; +- } +- }else { +- String newMimeContnetPart = getMimeContentPartName(mimeContent); +- if(newMimeContnetPart == null) { +- warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); +- return false; +- }else if(!newMimeContnetPart.equals(mimeContnetPart)) { +- //throw new ModelerException("mimemodeler.invalidMimeContent.differentPart"); +- warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART()); +- return false; +- } ++ warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); ++ return false; + } + } + return true; +@@ -386,6 +374,9 @@ + protected String getRequestNamespaceURI(SOAPBody body) { + String namespaceURI = body.getNamespace(); + if (namespaceURI == null) { ++ if(options.isExtensionMode()){ ++ return info.modelPort.getName().getNamespaceURI(); ++ } + // the WSDL document is invalid + // at least, that's my interpretation of section 3.5 of the WSDL 1.1 spec! + error(body, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(info.bindingOperation.getName())); +@@ -396,6 +387,9 @@ + protected String getResponseNamespaceURI(SOAPBody body) { + String namespaceURI = body.getNamespace(); + if (namespaceURI == null) { ++ if(options.isExtensionMode()){ ++ return info.modelPort.getName().getNamespaceURI(); ++ } + // the WSDL document is invalid + // at least, that's my interpretation of section 3.5 of the WSDL 1.1 spec! + error(body, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(info.bindingOperation.getName())); +@@ -703,7 +697,7 @@ + if(numPasses > 1) + return; + if(entity == null) +- errReceiver.warning(NULL_LOCATOR, message); ++ errReceiver.warning(null, message); + else + errReceiver.warning(entity.getLocator(), message); + } +@@ -710,7 +704,7 @@ + + protected void error(Entity entity, String message){ + if(entity == null) +- errReceiver.error(NULL_LOCATOR, message); ++ errReceiver.error(null, message); + else + errReceiver.error(entity.getLocator(), message); + throw new AbortException(); +--- old/src/share/classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java Tue Aug 4 09:28:55 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java Tue Aug 4 09:28:54 2009 +@@ -80,8 +80,10 @@ + protected void preVisit(Service service) throws Exception { + registerClassName( + ((JavaInterface)service.getJavaInterface()).getName()); +- registerClassName( +- ((JavaInterface)service.getJavaInterface()).getImpl()); ++ // We don't generate Impl classes, commenting it out. ++ // Otherwise, it would cause naming conflicts ++ //registerClassName( ++ // ((JavaInterface)service.getJavaInterface()).getImpl()); + } + + protected void processPort11x(Port port){ +--- old/src/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Tue Aug 4 09:28:57 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Tue Aug 4 09:28:56 2009 +@@ -38,6 +38,30 @@ + private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.generator"); + private final static Localizer localizer = new Localizer(); + ++ public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) { ++ return messageFactory.getMessage("generator.service.classAlreadyExist", arg0, arg1); ++ } ++ ++ /** ++ * Could not generate Service, class: {0} already exists. Rename wsdl:Service "{1}" using JAX-WS customization ++ * ++ */ ++ public static String GENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) { ++ return localizer.localize(localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(arg0, arg1)); ++ } ++ ++ public static Localizable localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) { ++ return messageFactory.getMessage("generator.sei.classAlreadyExist", arg0, arg1); ++ } ++ ++ /** ++ * Could not generate SEI, class: {0} already exists. Rename wsdl:portType "{1}" using JAX-WS customization ++ * ++ */ ++ public static String GENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) { ++ return localizer.localize(localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(arg0, arg1)); ++ } ++ + public static Localizable localizableGENERATOR_NESTED_GENERATOR_ERROR(Object arg0) { + return messageFactory.getMessage("generator.nestedGeneratorError", arg0); + } +--- old/src/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Tue Aug 4 09:28:59 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Tue Aug 4 09:28:59 2009 +@@ -255,18 +255,6 @@ + return localizer.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1)); + } + +- public static Localizable localizable_002F_002F_JAXWS() { +- return messageFactory.getMessage("//JAXWS"); +- } +- +- /** +- * 2.0 +- * +- */ +- public static String _002F_002F_JAXWS() { +- return localizer.localize(localizable_002F_002F_JAXWS()); +- } +- + public static Localizable localizableMODEL_DUPLICATE_FAULTMESSAGE(Object arg0) { + return messageFactory.getMessage("model.duplicate.faultmessage", arg0); + } +@@ -536,7 +524,9 @@ + } + + /** +- * Failed to generate Java signature: duplicate parameter names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}" ++ * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these ++ * 1. Use JAXWS binding customization to rename the wsdl:part "{1}" ++ * 2. Run wsimport with -extension switch. + * + */ + public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) { +@@ -639,6 +629,21 @@ + return localizer.localize(localizableMODEL_IMPORTER_INVALID_LITERAL(arg0)); + } + ++ public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) { ++ return messageFactory.getMessage("model.parameter.notunique.wrapper", arg0, arg1); ++ } ++ ++ /** ++ * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these ++ * 1. Use JAXWS binding customization to rename the wsdl:part "{1}" ++ * 2. Run wsimport with -extension switch. ++ * 3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using false wsdl customization. ++ * ++ */ ++ public static String MODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) { ++ return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1)); ++ } ++ + public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) { + return messageFactory.getMessage("model.schema.notImplemented", arg0); + } +--- old/src/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Tue Aug 4 09:29:01 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Tue Aug 4 09:29:01 2009 +@@ -331,7 +331,7 @@ + } + + /** +- * Schema descriptor {0} in message part "{1}" could not be bound to Java! ++ * Schema descriptor {0} in message part "{1}" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch. + * + */ + public static String WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) { +@@ -590,6 +590,18 @@ + return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(arg0)); + } + ++ public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return messageFactory.getMessage("wsdlmodeler.nonUnique.body.error", arg0, arg1, arg2, arg3); ++ } ++ ++ /** ++ * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction ++ * ++ */ ++ public static String WSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(arg0, arg1, arg2, arg3)); ++ } ++ + public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) { + return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle", arg0); + } +@@ -818,18 +830,6 @@ + return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(arg0, arg1)); + } + +- public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY(Object arg0, Object arg1, Object arg2, Object arg3) { +- return messageFactory.getMessage("wsdlmodeler.nonUnique.body", arg0, arg1, arg2, arg3); +- } +- +- /** +- * Non unique body parts! In a port, operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3} +- * +- */ +- public static String WSDLMODELER_NON_UNIQUE_BODY(Object arg0, Object arg1, Object arg2, Object arg3) { +- return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY(arg0, arg1, arg2, arg3)); +- } +- + public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) { + return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.cant.resolve.message", arg0, arg1); + } +@@ -1238,6 +1238,18 @@ + return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(arg0, arg1, arg2)); + } + ++ public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return messageFactory.getMessage("wsdlmodeler.nonUnique.body.warning", arg0, arg1, arg2, arg3); ++ } ++ ++ /** ++ * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction ++ * ++ */ ++ public static String WSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(arg0, arg1, arg2, arg3)); ++ } ++ + public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) { + return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2); + } +--- old/src/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Tue Aug 4 09:29:04 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Tue Aug 4 09:29:03 2009 +@@ -38,184 +38,184 @@ + private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.webserviceap"); + private final static Localizer localizer = new Localizer(); + +- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) { +- return messageFactory.getMessage("webserviceap.rpc.literal.must.not.be.bare", arg0); ++ public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1); + } + + /** +- * RPC literal SOAPBindings must have parameterStyle WRAPPPED. Class: {0}. ++ * The endpoint interface {0} does not match the interface {1}. + * + */ +- public static String WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(arg0)); ++ public static String WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element.exclude", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.invalid.webmethod.element.with.exclude", arg0, arg1, arg2); + } + + /** +- * The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class: {1} method: {2} ++ * The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class: {1} method: {2} + * + */ +- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.class.is.innerclass.not.static", arg0); ++ public static Localizable localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.sei.cannot.contain.constant.values", arg0, arg1); + } + + /** +- * Inner classes annotated with @javax.jws.WebService must be static. Class: {0} ++ * An service endpoint interface cannot contain constant declaration: Interface: {0} field: {1}. + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(arg0)); ++ public static String WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.webservice.method.is.abstract", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.rpc.literal.parameters.must.have.webparam", arg0, arg1, arg2); + } + + /** +- * Classes annotated with @javax.jws.WebService must not have abstract methods. Class: {0} Method: {1} ++ * All rpc literal parameters must have a WebParam annotation. Class: {0} method: {1} parameter {2} + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(arg0, arg1)); ++ public static String WEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.return.type", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.method.exception.bean.name.not.unique", arg0, arg1); + } + + /** +- * The method {1} of class {0} is annotated @Oneway but has a return type. ++ * Exception bean names must be unique and must not clash with other generated classes. Class: {0} exception {1} + * + */ +- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(arg0, arg1)); ++ public static String WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_WARNING(Object arg0) { +- return messageFactory.getMessage("webserviceap.warning", arg0); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.and.webserviceprovider", arg0); + } + + /** +- * warning: {0} ++ * Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class: {0} + * + */ +- public static String WEBSERVICEAP_WARNING(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WARNING(arg0)); ++ public static String WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.rpc.soapbinding.not.allowed.on.method", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.no.default.constructor", arg0); + } + + /** +- * SOAPBinding.Style.RPC binding annotations are not allowed on methods. Class: {0} Method: {1} ++ * Classes annotated with @javax.jws.WebService must have a public default constructor. Class: {0} + * + */ +- public static String WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(arg0, arg1)); ++ public static String WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.could.not.find.handlerchain", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.doc.bare.no.out", arg0, arg1); + } + + /** +- * Could not find the handlerchain {0} in the handler file {1} ++ * Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class: {0}, method: {1} + * + */ +- public static String WEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(arg0, arg1)); ++ public static String WEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) { +- return messageFactory.getMessage("webserviceap.no.package.class.must.have.targetnamespace", arg0); ++ public static Localizable localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.failed.to.parse.handlerchain.file", arg0, arg1); + } + + /** +- * @javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element. Class: {0} ++ * Failed to parse HandlerChain file. Class: {0}, file: {1} + * + */ +- public static String WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(arg0)); ++ public static String WEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) { +- return messageFactory.getMessage("webserviceap.class.not.found", arg0); ++ public static Localizable localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) { ++ return messageFactory.getMessage("webserviceap.java.typeNotFound", arg0); + } + + /** +- * Class Not Found: {0} ++ * The type: {0} was not found in the mapping + * + */ +- public static String WEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_CLASS_NOT_FOUND(arg0)); ++ public static String WEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.doc.bare.no.return.and.no.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.oneway.operation.cannot.declare.exceptions", arg0, arg1, arg2); + } + + /** +- * Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class: {0} Method: {1} ++ * The method {1} of class {0} is annotated @Oneway but declares the exception {2} + * + */ +- public static String WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) { +- return messageFactory.getMessage("webserviceap.document.literal.bare.method.return.not.unique", arg0, arg1, arg2, arg3); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.webservice.method.is.static.or.final", arg0, arg1); + } + + /** +- * Document literal bare methods must have a unique result name return type combination. Class {0} method: {1}, result name: {2} return type: {3} ++ * Method annotated with @javax.jws.WebMethod must not be static or final. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(arg0, arg1, arg2, arg3)); ++ public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.doc.bare.no.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.return.type", arg0, arg1); + } + + /** +- * Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class: {0}, method: {1} ++ * The method {1} of class {0} is annotated @Oneway but has a return type. + * + */ +- public static String WEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.rpc.literal.parameters.must.have.webparam", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_WARNING(Object arg0) { ++ return messageFactory.getMessage("webserviceap.warning", arg0); + } + + /** +- * All rpc literal parameters must have a WebParam annotation. Class: {0} method: {1} parameter {2} ++ * warning: {0} + * + */ +- public static String WEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_WARNING(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WARNING(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS() { +- return messageFactory.getMessage("webserviceap.model.already.exists"); ++ public static Localizable localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.method.response.wrapper.bean.name.not.unique", arg0, arg1); + } + + /** +- * model already exists ++ * Response wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1} + * + */ +- public static String WEBSERVICEAP_MODEL_ALREADY_EXISTS() { +- return localizer.localize(localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS()); ++ public static String WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); + } + + public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) { +@@ -230,376 +230,376 @@ + return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.method.not.annotated", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_NESTED_MODEL_ERROR(Object arg0) { ++ return messageFactory.getMessage("webserviceap.nestedModelError", arg0); + } + + /** +- * The method {0} on class {1} is not annotated. ++ * modeler error: {0} + * + */ +- public static String WEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(arg0, arg1)); ++ public static String WEBSERVICEAP_NESTED_MODEL_ERROR(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_NESTED_MODEL_ERROR(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.non.in.parameters.must.be.holder", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.oneway.and.out", arg0, arg1); + } + + /** +- * Class: {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder. ++ * @Oneway methods cannot have out parameters. Class: {0} method {1} + * + */ +- public static String WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.failed.to.find.handlerchain.file", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.rpc.literal.webparams.must.specify.name", arg0, arg1, arg2); + } + + /** +- * Cannot find HandlerChain file. class: {0}, file: {1} ++ * All rpc literal WebParams must specify a name. Class: {0} method {1} paramter {2} + * + */ +- public static String WEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1)); ++ public static String WEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.operation.name.not.unique", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element.exclude", arg0, arg1, arg2); + } + + /** +- * Operation names must be unique. Class: {0} method: {1} operation name: {2} ++ * The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class: {1} method: {2} + * + */ +- public static String WEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.method.not.implemented", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) { ++ return messageFactory.getMessage("webserviceap.class.not.found", arg0); + } + + /** +- * Methods in an endpointInterface must be implemented in the implementation class. Interface Class:{0} Implementation Class:{1} Method: {2} ++ * Class Not Found: {0} + * + */ +- public static String WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_CLASS_NOT_FOUND(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.header.parameters.must.have.webparam.name", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) { ++ return messageFactory.getMessage("webserviceap.endpointinteface.plus.element", arg0); + } + + /** +- * All WebParam annotations on header parameters must specify a name. Class: {0} method {1} paramter {2} ++ * The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element. + * + */ +- public static String WEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) { +- return messageFactory.getMessage("webserviceap.invalid.handlerchain.file.nohandler-config", arg0); ++ public static Localizable localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() { ++ return messageFactory.getMessage("webserviceap.cannot.combine.handlerchain.soapmessagehandlers"); + } + + /** +- * The handlerchain file {0} is invalid, it does not contain a handler-config element ++ * You cannot specify both HanlderChain and SOAPMessageHandlers annotations + * + */ +- public static String WEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(arg0)); ++ public static String WEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() { ++ return localizer.localize(localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS()); + } + +- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.declare.exceptions", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.class.is.innerclass.not.static", arg0); + } + + /** +- * The method {1} of class {0} is annotated @Oneway but declares the exception {2} ++ * Inner classes annotated with @javax.jws.WebService must be static. Class: {0} + * + */ +- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.holders", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.non.in.parameters.must.be.holder", arg0, arg1, arg2); + } + + /** +- * The method {1} of class {0} is annotated @Oneway but contains inout or out paramerters (javax.xml.ws.Holder) ++ * Class: {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder. + * + */ +- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(arg0, arg1)); ++ public static String WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.oneway.and.not.one.in", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element", arg0, arg1); + } + + /** +- * Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class: {0} Method: {1} ++ * The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class: {1} + * + */ +- public static String WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(arg0, arg1)); ++ public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) { +- return messageFactory.getMessage("webserviceap.rpc.encoded.not.supported", arg0); ++ public static Localizable localizableWEBSERVICEAP_SUCCEEDED() { ++ return messageFactory.getMessage("webserviceap.succeeded"); + } + + /** +- * The {0} class has a rpc/encoded SOAPBinding. Rpc/encoded SOAPBindings are not supported in JAXWS 2.0. ++ * Success + * + */ +- public static String WEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(arg0)); ++ public static String WEBSERVICEAP_SUCCEEDED() { ++ return localizer.localize(localizableWEBSERVICEAP_SUCCEEDED()); + } + +- public static Localizable localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) { +- return messageFactory.getMessage("webserviceap.java.typeNotFound", arg0); ++ public static Localizable localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.doc.bare.and.no.one.in", arg0, arg1); + } + + /** +- * The type: {0} was not found in the mapping ++ * Document literal bare methods must have one non-header, IN/INOUT parameter. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(arg0)); ++ public static String WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.invalid.sei.annotation", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.webservice.method.is.abstract", arg0, arg1); + } + + /** +- * The @{0} annotation cannot be used on a service endpoint interface. Class: {1} ++ * Classes annotated with @javax.jws.WebService must not have abstract methods. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(arg0, arg1)); ++ public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() { +- return messageFactory.getMessage("webserviceap.no.webservice.endpoint.found"); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return messageFactory.getMessage("webserviceap.document.literal.bare.method.return.not.unique", arg0, arg1, arg2, arg3); + } + + /** +- * A web service endpoint could not be found ++ * Document literal bare methods must have a unique result name return type combination. Class {0} method: {1}, result name: {2} return type: {3} + * + */ +- public static String WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() { +- return localizer.localize(localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND()); ++ public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(arg0, arg1, arg2, arg3)); + } + +- public static Localizable localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.invalid.webmethod.element.with.exclude", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() { ++ return messageFactory.getMessage("webserviceap.no.webservice.endpoint.found"); + } + + /** +- * The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class: {1} method: {2} ++ * A web service endpoint could not be found + * + */ +- public static String WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() { ++ return localizer.localize(localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND()); + } + +- public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.could.not.find.typedecl", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_FILE_NOT_FOUND(Object arg0) { ++ return messageFactory.getMessage("webserviceap.fileNotFound", arg0); + } + + /** +- * Could not get TypeDeclaration for: {0} in apt round: {1} ++ * error: file not found: {0} + * + */ +- public static String WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(arg0, arg1)); ++ public static String WEBSERVICEAP_FILE_NOT_FOUND(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_FILE_NOT_FOUND(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.document.literal.bare.cannot.have.more.than.one.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) { ++ return messageFactory.getMessage("webserviceap.invalid.handlerchain.file.nohandler-config", arg0); + } + + /** +- * Document literal bare methods must have a return value or one out parameter. Class: {0} Method: {1} ++ * The handlerchain file {0} is invalid, it does not contain a handler-config element + * + */ +- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(arg0)); + } + +- public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) { +- return messageFactory.getMessage("webservice.encoded.not.supported", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.header.parameters.must.have.webparam.name", arg0, arg1, arg2); + } + + /** +- * The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported ++ * All WebParam annotations on header parameters must specify a name. Class: {0} method {1} paramter {2} + * + */ +- public static String WEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(arg0, arg1)); ++ public static String WEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.class.is.final", arg0); ++ public static Localizable localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.method.return.type.cannot.implement.remote", arg0, arg1, arg2); + } + + /** +- * Classes annotated with @javax.jws.WebService must not be final. Class: {0} ++ * Method return types cannot implement java.rmi.Remote. Class: {0} method: {1} return type: {2} + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(arg0)); ++ public static String WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.no.default.constructor", arg0); ++ public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) { ++ return messageFactory.getMessage("webserviceap.endpointinteface.plus.annotation", arg0); + } + + /** +- * Classes annotated with @javax.jws.WebService must have a public default constructor. Class: {0} ++ * The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element. + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(arg0)); ++ public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.sei.cannot.contain.constant.values", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.holder.parameters.must.not.be.in.only", arg0, arg1, arg2); + } + + /** +- * An service endpoint interface cannot contain constant declaration: Interface: {0} field: {1}. ++ * javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property. Class: {0} method: {1} parameter: {2} + * + */ +- public static String WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(arg0, arg1)); ++ public static String WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) { +- return messageFactory.getMessage("webserviceap.endpointinterface.class.not.found", arg0); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.only.one.in.parameter", arg0, arg1, arg2); + } + + /** +- * The endpointInterface class {0} could not be found ++ * Document literal bare methods must have no more than 1 non-header in parameter. Class: {0} method: {1} number of non-header parameters: {2} + * + */ +- public static String WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(arg0)); ++ public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.only.one.in.parameter", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.doc.bare.return.and.out", arg0, arg1); + } + + /** +- * Document literal bare methods must have no more than 1 non-header in parameter. Class: {0} method: {1} number of non-header parameters: {2} ++ * Document/literal bare methods cannot have a return type and out parameters. Class: {0}, method: {1} + * + */ +- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_INFO(Object arg0) { +- return messageFactory.getMessage("webserviceap.info", arg0); ++ public static Localizable localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return messageFactory.getMessage("webserviceap.method.parameter.types.cannot.implement.remote", arg0, arg1, arg2, arg3); + } + + /** +- * info: {0} ++ * Method parameter types cannot implement java.rmi.Remote. Class: {0} method: {1} parameter: {2} type: {3} + * + */ +- public static String WEBSERVICEAP_INFO(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_INFO(arg0)); ++ public static String WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2, arg3)); + } + +- public static Localizable localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) { +- return messageFactory.getMessage("webserviceap.handlerclass.notspecified", arg0); ++ public static Localizable localizableWEBSERVICEAP_COMPILATION_FAILED() { ++ return messageFactory.getMessage("webserviceap.compilationFailed"); + } + + /** +- * A handler in the HandlerChain file: {0} does not specify a handler-class ++ * compilation failed, errors should have been reported + * + */ +- public static String WEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(arg0)); ++ public static String WEBSERVICEAP_COMPILATION_FAILED() { ++ return localizer.localize(localizableWEBSERVICEAP_COMPILATION_FAILED()); + } + +- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS() { ++ return messageFactory.getMessage("webserviceap.model.already.exists"); + } + + /** +- * The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class: {1} ++ * model already exists + * + */ +- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(arg0, arg1)); ++ public static String WEBSERVICEAP_MODEL_ALREADY_EXISTS() { ++ return localizer.localize(localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS()); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.document.literal.bare.method.not.unique", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.could.not.find.typedecl", arg0, arg1); + } + + /** +- * Document literal bare methods must have unique parameter names. Class: {0} method: {1} parameter name: {2} ++ * Could not get TypeDeclaration for: {0} in apt round: {1} + * + */ +- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.method.exception.bean.name.not.unique", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.class.not.public", arg0); + } + + /** +- * Exception bean names must be unique and must not clash with other generated classes. Class: {0} exception {1} ++ * Classes annotated with @javax.jws.WebService must be public. Class: {0} + * + */ +- public static String WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); ++ public static String WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.holder.parameters.must.not.be.in.only", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.document.literal.bare.method.not.unique", arg0, arg1, arg2); + } + + /** +- * javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property. Class: {0} method: {1} parameter: {2} ++ * Document literal bare methods must have unique parameter names. Class: {0} method: {1} parameter name: {2} + * + */ +- public static String WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.doc.bare.and.no.one.in", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.rpc.soapbinding.not.allowed.on.method", arg0, arg1); + } + + /** +- * Document literal bare methods must have one non-header, IN/INOUT parameter. Class: {0} Method: {1} ++ * SOAPBinding.Style.RPC binding annotations are not allowed on methods. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(arg0, arg1)); ++ public static String WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.rpc.literal.webparams.must.specify.name", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) { ++ return messageFactory.getMessage("webserviceap.no.package.class.must.have.targetnamespace", arg0); + } + + /** +- * All rpc literal WebParams must specify a name. Class: {0} method {1} paramter {2} ++ * @javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element. Class: {0} + * + */ +- public static String WEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(arg0)); + } + + public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) { +@@ -614,280 +614,292 @@ + return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() { +- return messageFactory.getMessage("webserviceap.cannot.combine.handlerchain.soapmessagehandlers"); ++ public static Localizable localizableWEBSERVICEAP_INFO(Object arg0) { ++ return messageFactory.getMessage("webserviceap.info", arg0); + } + + /** +- * You cannot specify both HanlderChain and SOAPMessageHandlers annotations ++ * info: {0} + * + */ +- public static String WEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() { +- return localizer.localize(localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS()); ++ public static String WEBSERVICEAP_INFO(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_INFO(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_NESTED_MODEL_ERROR(Object arg0) { +- return messageFactory.getMessage("webserviceap.nestedModelError", arg0); ++ public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) { ++ return messageFactory.getMessage("webserviceap.rpc.literal.must.not.be.bare", arg0); + } + + /** +- * modeler error: {0} ++ * RPC literal SOAPBindings must have parameterStyle WRAPPPED. Class: {0}. + * + */ +- public static String WEBSERVICEAP_NESTED_MODEL_ERROR(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_NESTED_MODEL_ERROR(arg0)); ++ public static String WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.method.request.wrapper.bean.name.not.unique", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.could.not.find.handlerchain", arg0, arg1); + } + + /** +- * Request wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1} ++ * Could not find the handlerchain {0} in the handler file {1} + * + */ +- public static String WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); ++ public static String WEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.class.not.public", arg0); ++ public static Localizable localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) { ++ return messageFactory.getMessage("webserviceap.rpc.encoded.not.supported", arg0); + } + + /** +- * Classes annotated with @javax.jws.WebService must be public. Class: {0} ++ * The {0} class has a rpc/encoded SOAPBinding. Rpc/encoded SOAPBindings are not supported in JAXWS 2.0. + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(arg0)); ++ public static String WEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) { +- return messageFactory.getMessage("webserviceap.mixed.binding.style", arg0); ++ public static Localizable localizableWEBSERVICEAP_ERROR(Object arg0) { ++ return messageFactory.getMessage("webserviceap.error", arg0); + } + + /** +- * Class: {0} contains mixed bindings. SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed. ++ * error: {0} + * + */ +- public static String WEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_MIXED_BINDING_STYLE(arg0)); ++ public static String WEBSERVICEAP_ERROR(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_ERROR(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_FILE_NOT_FOUND(Object arg0) { +- return messageFactory.getMessage("webserviceap.fileNotFound", arg0); ++ public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) { ++ return messageFactory.getMessage("webserviceap.endpointinterface.class.not.found", arg0); + } + + /** +- * error: file not found: {0} ++ * The endpointInterface class {0} could not be found + * + */ +- public static String WEBSERVICEAP_FILE_NOT_FOUND(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_FILE_NOT_FOUND(arg0)); ++ public static String WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.oneway.and.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.method.not.implemented", arg0, arg1, arg2); + } + + /** +- * @Oneway methods cannot have out parameters. Class: {0} method {1} ++ * Methods in an endpointInterface must be implemented in the implementation class. Interface Class:{0} Implementation Class:{1} Method: {2} + * + */ +- public static String WEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.method.response.wrapper.bean.name.not.unique", arg0, arg1); ++ public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webservice.encoded.not.supported", arg0, arg1); + } + + /** +- * Response wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1} ++ * The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported + * + */ +- public static String WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); ++ public static String WEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_COMPILATION_FAILED() { +- return messageFactory.getMessage("webserviceap.compilationFailed"); ++ public static Localizable localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) { ++ return messageFactory.getMessage("webserviceap.handlerclass.notspecified", arg0); + } + + /** +- * compilation failed, errors should have been reported ++ * A handler in the HandlerChain file: {0} does not specify a handler-class + * + */ +- public static String WEBSERVICEAP_COMPILATION_FAILED() { +- return localizer.localize(localizableWEBSERVICEAP_COMPILATION_FAILED()); ++ public static String WEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.one.in.or.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.failed.to.find.handlerchain.file", arg0, arg1); + } + + /** +- * Document literal bare methods must have at least one of: a return, an in parameter or an out parameter. Class: {0} Method: {1} ++ * Cannot find HandlerChain file. class: {0}, file: {1} + * + */ +- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) { +- return messageFactory.getMessage("webserviceap.endpointinteface.plus.element", arg0); ++ public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.doc.bare.no.return.and.no.out", arg0, arg1); + } + + /** +- * The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element. ++ * Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(arg0)); ++ public static String WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.doc.bare.return.and.out", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.class.is.abstract", arg0); + } + + /** +- * Document/literal bare methods cannot have a return type and out parameters. Class: {0}, method: {1} ++ * Classes annotated with @javax.jws.WebService must not be abstract. Class: {0} + * + */ +- public static String WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(arg0, arg1)); ++ public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_SUCCEEDED() { +- return messageFactory.getMessage("webserviceap.succeeded"); ++ public static Localizable localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() { ++ return messageFactory.getMessage("webserviceap.init_param.format.error"); + } + + /** +- * Success ++ * a element must have exactly 1 and 1 + * + */ +- public static String WEBSERVICEAP_SUCCEEDED() { +- return localizer.localize(localizableWEBSERVICEAP_SUCCEEDED()); ++ public static String WEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() { ++ return localizer.localize(localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR()); + } + +- public static Localizable localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.document.bare.holder.parameters.must.not.be.inout", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) { ++ return messageFactory.getMessage("webserviceap.mixed.binding.style", arg0); + } + + /** +- * javax.xml.ws.Holder parameters in document bare operations must be WebParam.Mode.INOUT; Class: {0} method: {1} parameter: {2} ++ * Class: {0} contains mixed bindings. SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed. + * + */ +- public static String WEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_MIXED_BINDING_STYLE(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.and.webserviceprovider", arg0); ++ public static Localizable localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.method.not.annotated", arg0, arg1); + } + + /** +- * Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class: {0} ++ * The method {0} on class {1} is not annotated. + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(arg0)); ++ public static String WEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.holders", arg0, arg1); + } + + /** +- * The endpoint interface {0} does not match the interface {1}. ++ * The method {1} of class {0} is annotated @Oneway but contains inout or out paramerters (javax.xml.ws.Holder) + * + */ +- public static String WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(arg0, arg1)); ++ public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) { +- return messageFactory.getMessage("webserviceap.endpointinteface.plus.annotation", arg0); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.document.literal.bare.cannot.have.more.than.one.out", arg0, arg1); + } + + /** +- * The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element. ++ * Document literal bare methods must have a return value or one out parameter. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(arg0)); ++ public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { +- return messageFactory.getMessage("webserviceap.failed.to.parse.handlerchain.file", arg0, arg1); ++ public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.invalid.sei.annotation", arg0, arg1); + } + + /** +- * Failed to parse HandlerChain file. Class: {0}, file: {1} ++ * The @{0} annotation cannot be used on a service endpoint interface. Class: {1} + * + */ +- public static String WEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { +- return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1)); ++ public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) { +- return messageFactory.getMessage("webserviceap.method.parameter.types.cannot.implement.remote", arg0, arg1, arg2, arg3); ++ public static Localizable localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.operation.name.not.unique", arg0, arg1, arg2); + } + + /** +- * Method parameter types cannot implement java.rmi.Remote. Class: {0} method: {1} parameter: {2} type: {3} ++ * Operation names must be unique. Class: {0} method: {1} operation name: {2} + * + */ +- public static String WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2, arg3)); ++ public static String WEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(arg0, arg1, arg2)); + } + +- public static Localizable localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) { +- return messageFactory.getMessage("webserviceap.method.return.type.cannot.implement.remote", arg0, arg1, arg2); ++ public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) { ++ return messageFactory.getMessage("webserviceap.webservice.class.is.final", arg0); + } + + /** +- * Method return types cannot implement java.rmi.Remote. Class: {0} method: {1} return type: {2} ++ * Classes annotated with @javax.jws.WebService must not be final. Class: {0} + * + */ +- public static String WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) { +- return localizer.localize(localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2)); ++ public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) { ++ return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(arg0)); + } + +- public static Localizable localizableWEBSERVICEAP_ERROR(Object arg0) { +- return messageFactory.getMessage("webserviceap.error", arg0); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.one.in.or.out", arg0, arg1); + } + + /** +- * error: {0} ++ * Document literal bare methods must have at least one of: a return, an in parameter or an out parameter. Class: {0} Method: {1} + * + */ +- public static String WEBSERVICEAP_ERROR(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_ERROR(arg0)); ++ public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) { +- return messageFactory.getMessage("webserviceap.webservice.class.is.abstract", arg0); ++ public static Localizable localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.method.request.wrapper.bean.name.not.unique", arg0, arg1); + } + + /** +- * Classes annotated with @javax.jws.WebService must not be abstract. Class: {0} ++ * Request wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1} + * + */ +- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) { +- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(arg0)); ++ public static String WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1)); + } + +- public static Localizable localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() { +- return messageFactory.getMessage("webserviceap.init_param.format.error"); ++ public static Localizable localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("webserviceap.document.bare.holder.parameters.must.not.be.inout", arg0, arg1, arg2); + } + + /** +- * a element must have exactly 1 and 1 ++ * javax.xml.ws.Holder parameters in document bare operations must be WebParam.Mode.INOUT; Class: {0} method: {1} parameter: {2} + * + */ +- public static String WEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() { +- return localizer.localize(localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR()); ++ public static String WEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(arg0, arg1, arg2)); + } + ++ public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) { ++ return messageFactory.getMessage("webserviceap.oneway.and.not.one.in", arg0, arg1); ++ } ++ ++ /** ++ * Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class: {0} Method: {1} ++ * ++ */ ++ public static String WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) { ++ return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(arg0, arg1)); ++ } ++ + } +--- old/src/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Tue Aug 4 09:29:06 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Tue Aug 4 09:29:06 2009 +@@ -62,6 +62,30 @@ + return localizer.localize(localizableWSGEN_CLASS_NOT_FOUND(arg0)); + } + ++ public static Localizable localizableWSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) { ++ return messageFactory.getMessage("wsimport.httpRedirect", arg0, arg1); ++ } ++ ++ /** ++ * Server returned HTTP Status code: "{0}", retrying with "{1}" ++ * ++ */ ++ public static String WSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) { ++ return localizer.localize(localizableWSIMPORT_HTTP_REDIRECT(arg0, arg1)); ++ } ++ ++ public static Localizable localizableWSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("wsimport.authInfoNeeded", arg0, arg1, arg2); ++ } ++ ++ /** ++ * {0}, "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port// ++ * ++ */ ++ public static String WSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWSIMPORT_AUTH_INFO_NEEDED(arg0, arg1, arg2)); ++ } ++ + public static Localizable localizableWSGEN_USAGE_EXAMPLES() { + return messageFactory.getMessage("wsgen.usage.examples"); + } +@@ -142,6 +166,27 @@ + return localizer.localize(localizableWSIMPORT_MISSING_FILE()); + } + ++ public static Localizable localizableWSIMPORT_USAGE_EXTENSIONS() { ++ return messageFactory.getMessage("wsimport.usage.extensions"); ++ } ++ ++ /** ++ * ++ * Extensions: ++ * -XadditionalHeaders map headers not bound to request or response message to ++ * Java method parameters ++ * -Xauthfile file to carry authorization information in the format ++ * http://username:password@example.org/stock?wsdl ++ * -Xdebug print debug information ++ * -Xno-addressing-databinding enable binding of W3C EndpointReferenceType to Java ++ * -Xnocompile do not compile generated Java files ++ * ++ * ++ */ ++ public static String WSIMPORT_USAGE_EXTENSIONS() { ++ return localizer.localize(localizableWSIMPORT_USAGE_EXTENSIONS()); ++ } ++ + public static Localizable localizableWSIMPORT_USAGE(Object arg0) { + return messageFactory.getMessage("wsimport.usage", arg0); + } +@@ -221,8 +266,8 @@ + * -p specifies the target package + * -quiet suppress wsimport output + * -s specify where to place generated source files +- * -target generate code as per the given JAXWS specification version. +- * version 2.0 will generate compliant code for JAXWS 2.0 spec. ++ * -target generate code as per the given JAXWS spec version ++ * e.g. 2.0 will generate compliant code for JAXWS 2.0 spec + * -verbose output messages about what the compiler is doing + * -version print version information + * -wsdllocation @WebServiceClient.wsdlLocation value +@@ -245,6 +290,44 @@ + return localizer.localize(localizableWSCOMPILE_ERROR(arg0)); + } + ++ public static Localizable localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) { ++ return messageFactory.getMessage("wsgen.protocol.without.extension", arg0); ++ } ++ ++ /** ++ * The optional protocol "{0}" must be used in conjunction with the "-extension" option. ++ * ++ */ ++ public static String WSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) { ++ return localizer.localize(localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(arg0)); ++ } ++ ++ public static Localizable localizableWSIMPORT_COMPILING_CODE() { ++ return messageFactory.getMessage("wsimport.CompilingCode"); ++ } ++ ++ /** ++ * ++ * compiling code... ++ * ++ * ++ */ ++ public static String WSIMPORT_COMPILING_CODE() { ++ return localizer.localize(localizableWSIMPORT_COMPILING_CODE()); ++ } ++ ++ public static Localizable localizableWSIMPORT_READING_AUTH_FILE(Object arg0) { ++ return messageFactory.getMessage("wsimport.readingAuthFile", arg0); ++ } ++ ++ /** ++ * Trying to read authorization file : "{0}"... ++ * ++ */ ++ public static String WSIMPORT_READING_AUTH_FILE(Object arg0) { ++ return localizer.localize(localizableWSIMPORT_READING_AUTH_FILE(arg0)); ++ } ++ + public static Localizable localizableWSGEN_NO_WEBSERVICES_CLASS(Object arg0) { + return messageFactory.getMessage("wsgen.no.webservices.class", arg0); + } +@@ -281,6 +364,18 @@ + return localizer.localize(localizableWSCOMPILE_INFO(arg0)); + } + ++ public static Localizable localizableWSIMPORT_MAX_REDIRECT_ATTEMPT() { ++ return messageFactory.getMessage("wsimport.maxRedirectAttempt"); ++ } ++ ++ /** ++ * Can not get a WSDL maximum number of redirects(5) reached ++ * ++ */ ++ public static String WSIMPORT_MAX_REDIRECT_ATTEMPT() { ++ return localizer.localize(localizableWSIMPORT_MAX_REDIRECT_ATTEMPT()); ++ } ++ + public static Localizable localizableWSIMPORT_WARNING_MESSAGE(Object arg0) { + return messageFactory.getMessage("wsimport.WarningMessage", arg0); + } +@@ -324,6 +419,7 @@ + /** + * generating code... + * ++ * + */ + public static String WSIMPORT_GENERATING_CODE() { + return localizer.localize(localizableWSIMPORT_GENERATING_CODE()); +@@ -389,6 +485,30 @@ + return localizer.localize(localizableWSIMPORT_NO_SUCH_JAXB_OPTION(arg0)); + } + ++ public static Localizable localizableWSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) { ++ return messageFactory.getMessage("wsimport.authFileNotFound", arg0, arg1); ++ } ++ ++ /** ++ * Authorization file "{0}" not found. If the WSDL access needs Basic Authentication, please provide authorization file with read access at {1} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port// ++ * ++ */ ++ public static String WSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) { ++ return localizer.localize(localizableWSIMPORT_AUTH_FILE_NOT_FOUND(arg0, arg1)); ++ } ++ ++ public static Localizable localizableWSIMPORT_DEBUG_MESSAGE(Object arg0) { ++ return messageFactory.getMessage("wsimport.DebugMessage", arg0); ++ } ++ ++ /** ++ * [DEBUG] {0} ++ * ++ */ ++ public static String WSIMPORT_DEBUG_MESSAGE(Object arg0) { ++ return localizer.localize(localizableWSIMPORT_DEBUG_MESSAGE(arg0)); ++ } ++ + public static Localizable localizableWSGEN_COULD_NOT_CREATE_FILE(Object arg0) { + return messageFactory.getMessage("wsgen.could.not.create.file", arg0); + } +@@ -413,8 +533,8 @@ + return localizer.localize(localizableWSGEN_WSDL_ARG_NO_GENWSDL(arg0)); + } + +- public static Localizable localizableWSGEN_HELP(Object arg0) { +- return messageFactory.getMessage("wsgen.help", arg0); ++ public static Localizable localizableWSGEN_HELP(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("wsgen.help", arg0, arg1, arg2); + } + + /** +@@ -436,10 +556,12 @@ + * -s specify where to place generated source files + * -verbose output messages about what the compiler is doing + * -version print version information +- * -wsdl[:protocol] generate a WSDL file. The protocol is optional. +- * Valid protocols are soap1.1 and Xsoap1.2, the default +- * is soap1.1. Xsoap1.2 is not standard and can only be +- * used in conjunction with the -extension option ++ * -wsdl[:protocol] generate a WSDL file. The protocol is optional. ++ * Valid protocols are {1}, ++ * the default is soap1.1. ++ * The non stanadard protocols {2} ++ * can only be used in conjunction with the ++ * -extension option. + * -servicename specify the Service name to use in the generated WSDL + * Used in conjunction with the -wsdl option. + * -portname specify the Port name to use in the generated WSDL +@@ -446,8 +568,8 @@ + * Used in conjunction with the -wsdl option. + * + */ +- public static String WSGEN_HELP(Object arg0) { +- return localizer.localize(localizableWSGEN_HELP(arg0)); ++ public static String WSGEN_HELP(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableWSGEN_HELP(arg0, arg1, arg2)); + } + + public static Localizable localizableWSIMPORT_INFO_MESSAGE(Object arg0) { +@@ -474,6 +596,18 @@ + return localizer.localize(localizableWSGEN_SOAP_12_WITHOUT_EXTENSION()); + } + ++ public static Localizable localizableWSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) { ++ return messageFactory.getMessage("wsimport.ILLEGAL_AUTH_INFO", arg0); ++ } ++ ++ /** ++ * "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//. ++ * ++ */ ++ public static String WSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) { ++ return localizer.localize(localizableWSIMPORT_ILLEGAL_AUTH_INFO(arg0)); ++ } ++ + public static Localizable localizableWSCOMPILE_COMPILATION_FAILED() { + return messageFactory.getMessage("wscompile.compilationFailed"); + } +@@ -546,6 +680,18 @@ + return localizer.localize(localizableWSIMPORT_NO_WSDL(arg0)); + } + ++ public static Localizable localizableWSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) { ++ return messageFactory.getMessage("wsimport.AUTH_INFO_LINENO", arg0, arg1); ++ } ++ ++ /** ++ * "line {0} of {1} ++ * ++ */ ++ public static String WSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) { ++ return localizer.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1)); ++ } ++ + public static Localizable localizableWSGEN_USAGE(Object arg0) { + return messageFactory.getMessage("wsgen.usage", arg0); + } +--- old/src/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Tue Aug 4 09:29:09 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Tue Aug 4 09:29:08 2009 +@@ -55,7 +55,7 @@ + } + + /** +- * wsdl:binding "{0}" referenced by wsdl:port "{1}", but its not found in the wsdl ++ * wsdl:binding "{0}" referenced by wsdl:port "{1}", but it's not found in the wsdl + * + */ + public static String ENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) { +@@ -62,28 +62,30 @@ + return localizer.localize(localizableENTITY_NOT_FOUND_BINDING(arg0, arg1)); + } + +- public static Localizable localizablePARSING_PARSE_FAILED() { +- return messageFactory.getMessage("Parsing.ParseFailed"); ++ public static Localizable localizablePARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) { ++ return messageFactory.getMessage("parsing.unableToGetMetadata", arg0, arg1); + } + + /** +- * Failed to parse the WSDL. ++ * {0} + * ++ * {1} ++ * + */ +- public static String PARSING_PARSE_FAILED() { +- return localizer.localize(localizablePARSING_PARSE_FAILED()); ++ public static String PARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) { ++ return localizer.localize(localizablePARSING_UNABLE_TO_GET_METADATA(arg0, arg1)); + } + +- public static Localizable localizablePARSING_UNABLE_TO_GET_METADATA(Object arg0) { +- return messageFactory.getMessage("parsing.unableToGetMetadata", arg0); ++ public static Localizable localizablePARSING_PARSE_FAILED() { ++ return messageFactory.getMessage("Parsing.ParseFailed"); + } + + /** +- * Unable to get Metadata from: {0} ++ * Failed to parse the WSDL. + * + */ +- public static String PARSING_UNABLE_TO_GET_METADATA(Object arg0) { +- return localizer.localize(localizablePARSING_UNABLE_TO_GET_METADATA(arg0)); ++ public static String PARSING_PARSE_FAILED() { ++ return localizer.localize(localizablePARSING_PARSE_FAILED()); + } + + public static Localizable localizableVALIDATION_INVALID_PREFIX(Object arg0) { +@@ -151,7 +153,7 @@ + } + + /** +- * wsdl:portType "{0}" referenced by wsdl:binding "{1}", but its not found in the wsdl ++ * wsdl:portType "{0}" referenced by wsdl:binding "{1}", but it's not found in the wsdl + * + */ + public static String ENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) { +@@ -199,7 +201,7 @@ + } + + /** +- * Both jaxws:version and version are present ++ * Both jaxws:version and version are present + * + */ + public static String INTERNALIZER_TWO_VERSION_ATTRIBUTES() { +@@ -212,7 +214,7 @@ + + /** + * Invalid WSDL, duplicate parts in a wsdl:message is not allowed. +- * wsdl:message {0} has duplicated part name: "{1}" ++ * wsdl:message {0} has a duplicated part name: "{1}" + * + */ + public static String VALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) { +@@ -248,7 +250,7 @@ + } + + /** +- * found unexpected non whitespace text: "{0}" ++ * found unexpected non-whitespace text: "{0}" + * + */ + public static String PARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) { +@@ -260,7 +262,7 @@ + } + + /** +- * No target found for the wsdlLocation: {0} ++ * No target found for the wsdlLocation: {0} + * + */ + public static String INTERNALIZER_TARGET_NOT_FOUND(Object arg0) { +@@ -344,7 +346,7 @@ + } + + /** +- * JAXWS version attribute must be "2.0" ++ * JAXWS version attribute must be "2.0" + * + */ + public static String INTERNALIZER_INCORRECT_VERSION() { +@@ -399,6 +401,20 @@ + return localizer.localize(localizablePARSING_INCORRECT_ROOT_ELEMENT(arg0, arg1, arg2, arg3)); + } + ++ public static Localizable localizableTRY_WITH_MEX(Object arg0) { ++ return messageFactory.getMessage("try.with.mex", arg0); ++ } ++ ++ /** ++ * {0} ++ * ++ * retrying with MEX... ++ * ++ */ ++ public static String TRY_WITH_MEX(Object arg0) { ++ return localizer.localize(localizableTRY_WITH_MEX(arg0)); ++ } ++ + public static Localizable localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) { + return messageFactory.getMessage("validation.missingRequiredAttribute", arg0, arg1); + } +@@ -440,7 +456,7 @@ + } + + /** +- * not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1} ++ * not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1} + * + */ + public static String PARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) { +@@ -548,7 +564,7 @@ + } + + /** +- * Unable to parse "{0}" : {1} ++ * Unable to parse "{0}" : {1} + * + */ + public static String ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) { +@@ -596,7 +612,7 @@ + } + + /** +- * XPath evaluation of "{0}" results in empty target node ++ * XPath evaluation of "{0}" results in an empty target node + * + */ + public static String INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) { +@@ -620,7 +636,7 @@ + } + + /** +- * Ignoring customization: "{0}", it has no namespace. It must belong to the customization namespace. ++ * Ignoring customization: "{0}", because it has no namespace. It must belong to the customization namespace. + * + */ + public static String INVALID_CUSTOMIZATION_NAMESPACE(Object arg0) { +@@ -687,28 +703,28 @@ + return localizer.localize(localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(arg0, arg1)); + } + +- public static Localizable localizableENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1) { +- return messageFactory.getMessage("entity.notFoundByQName", arg0, arg1); ++ public static Localizable localizableENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) { ++ return messageFactory.getMessage("entity.notFoundByQName", arg0, arg1, arg2); + } + + /** +- * invalid entity name: "{0}" (in namespace: "{1}") ++ * {0} "{1}" not found in the wsdl: {2} + * + */ +- public static String ENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1) { +- return localizer.localize(localizableENTITY_NOT_FOUND_BY_Q_NAME(arg0, arg1)); ++ public static String ENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) { ++ return localizer.localize(localizableENTITY_NOT_FOUND_BY_Q_NAME(arg0, arg1, arg2)); + } + +- public static Localizable localizableINVALID_WSDL(Object arg0) { +- return messageFactory.getMessage("invalid.wsdl", arg0); ++ public static Localizable localizableINVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return messageFactory.getMessage("invalid.wsdl", arg0, arg1, arg2, arg3); + } + + /** +- * "{0} does not look like a WSDL document, retrying with MEX..." ++ * Invalid WSDL {0}, expected {1} found {2} at (line {3}) + * + */ +- public static String INVALID_WSDL(Object arg0) { +- return localizer.localize(localizableINVALID_WSDL(arg0)); ++ public static String INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { ++ return localizer.localize(localizableINVALID_WSDL(arg0, arg1, arg2, arg3)); + } + + public static Localizable localizableVALIDATION_UNSUPPORTED_SCHEMA_FEATURE(Object arg0) { +@@ -788,7 +804,7 @@ + } + + /** +- * Target node is not an element ++ * Target node is not an element + * + */ + public static String INTERNALIZER_TARGET_NOT_AN_ELEMENT() { +@@ -860,7 +876,7 @@ + } + + /** +- * Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definition emmbedded inline within WSDLDocument. ++ * Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document. + * + */ + public static String WARNING_WSI_R_2004() { +@@ -872,7 +888,7 @@ + } + + /** +- * Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema element. ++ * Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema elements. + * + */ + public static String WARNING_WSI_R_2003() { +@@ -884,7 +900,7 @@ + } + + /** +- * Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected wsdl namesapce: {0}, found: {1} ++ * Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected wsdl namespace: {0}, found: {1} + * + */ + public static String WARNING_WSI_R_2002(Object arg0, Object arg1) { +@@ -903,18 +919,30 @@ + return localizer.localize(localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(arg0)); + } + +- public static Localizable localizableWARNING_WSI_R_2001(Object arg0) { +- return messageFactory.getMessage("warning.wsi.r2001", arg0); ++ public static Localizable localizableWARNING_WSI_R_2001() { ++ return messageFactory.getMessage("warning.wsi.r2001"); + } + + /** +- * Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must only import WSDL document. Its trying to import: "{0}" ++ * Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: "{0}" + * + */ +- public static String WARNING_WSI_R_2001(Object arg0) { +- return localizer.localize(localizableWARNING_WSI_R_2001(arg0)); ++ public static String WARNING_WSI_R_2001() { ++ return localizer.localize(localizableWARNING_WSI_R_2001()); + } + ++ public static Localizable localizableFILE_NOT_FOUND(Object arg0) { ++ return messageFactory.getMessage("file.not.found", arg0); ++ } ++ ++ /** ++ * {0} is unreachable ++ * ++ */ ++ public static String FILE_NOT_FOUND(Object arg0) { ++ return localizer.localize(localizableFILE_NOT_FOUND(arg0)); ++ } ++ + public static Localizable localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) { + return messageFactory.getMessage("validation.invalidSimpleTypeInElement", arg0, arg1); + } +@@ -944,7 +972,7 @@ + } + + /** +- * JAXWS version attribute must be present ++ * JAXWS version attribute must be present + * + */ + public static String INTERNALIZER_VERSION_NOT_PRESENT() { +@@ -951,6 +979,20 @@ + return localizer.localize(localizableINTERNALIZER_VERSION_NOT_PRESENT()); + } + ++ public static Localizable localizableFAILED_NOSERVICE(Object arg0) { ++ return messageFactory.getMessage("failed.noservice", arg0); ++ } ++ ++ /** ++ * failed.noservice=Could not find wsdl:service in the provided WSDL(s): ++ * ++ * {0} At least one WSDL with at least one service definition needs to be provided. ++ * ++ */ ++ public static String FAILED_NOSERVICE(Object arg0) { ++ return localizer.localize(localizableFAILED_NOSERVICE(arg0)); ++ } ++ + public static Localizable localizablePARSING_TOO_MANY_ELEMENTS(Object arg0, Object arg1, Object arg2) { + return messageFactory.getMessage("parsing.tooManyElements", arg0, arg1, arg2); + } +@@ -968,7 +1010,7 @@ + } + + /** +- * "{0}" is not a part of this compilation. Is this a mistake for "{1}"? ++ * "{0}" is not a part of this compilation. Is this a mistake for "{1}"? + * + */ + public static String INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(Object arg0, Object arg1) { +--- old/src/share/classes/com/sun/tools/internal/ws/resources/configuration.properties Tue Aug 4 09:29:11 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/configuration.properties Tue Aug 4 09:29:10 2009 +@@ -25,4 +25,3 @@ + + configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) + configuration.notBindingFile=Ignoring: binding file "\"{0}\". It is not a jaxws or a jaxb binding file. +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/generator.properties Tue Aug 4 09:29:13 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/generator.properties Tue Aug 4 09:29:13 2009 +@@ -32,4 +32,5 @@ + + #IndentingWriter + generator.indentingwriter.charset.cantencode=WSDL has some characters which native java encoder can''t encode: \"{0}\" +- ++generator.sei.classAlreadyExist=Could not generate SEI, class: {0} already exists. Rename wsdl:portType \"{1}\" using JAX-WS customization ++generator.service.classAlreadyExist=Could not generate Service, class: {0} already exists. Rename wsdl:Service \"{1}\" using JAX-WS customization +--- old/src/share/classes/com/sun/tools/internal/ws/resources/javacompiler.properties Tue Aug 4 09:29:15 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/javacompiler.properties Tue Aug 4 09:29:15 2009 +@@ -29,4 +29,3 @@ + javacompiler.classpath.error={0} is not available in the classpath, requires Sun's JDK version 5.0 or latter. + javacompiler.nosuchmethod.error=There is no such method {0} available, requires Sun's JDK version 5.0 or latter. + javacompiler.error=error : {0}. +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/model.properties Tue Aug 4 09:29:17 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/model.properties Tue Aug 4 09:29:17 2009 +@@ -58,7 +58,6 @@ + + model.uniqueness=uniqueness constraint violation + model.part.notUnique=parts in wsdl:message \"{0}\", reference \"{1}\", they must reference unique global elements. +-model.parameter.notunique=Failed to generate Java signature: duplicate parameter names {0}. Use JAXWS binding customization to rename the wsdl:part \"{1}\" + model.exception.notunique=Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part \"{1}\" + model.uniqueness.javastructuretype=uniqueness constraint violation, duplicate member \"{0}\" added to JavaStructureType \"{1}\" + model.parent.type.already.set=parent of type \"{0}\" already set to \"{1}\", new value = \"{2}\" +@@ -78,15 +77,16 @@ + model.arraywrapper.no.subtypes=LiteralArrayWrapper cannot have subtypes + model.arraywrapper.no.content.member=LiteralArrayWrapper cannot have a content member + model.complexType.simpleContent.reservedName=invalid attribute name: "_value" in complexType: \"{0}\", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent. ++model.parameter.notunique.wrapper=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch.\n\t3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using false wsdl customization. ++model.parameter.notunique=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch. + +-//JAXWS 2.0 ++#JAXWS 2.0 + model.schema.elementNotFound=Element \"{0}\" not found. + model.schema.jaxbException.message="{0}" + model.saxparser.exception:{0}\n{1} + + ConsoleErrorReporter.UnknownLocation = \ +- unknown location ++ unknown location + + ConsoleErrorReporter.LineXOfY = \ +- \ \ line {0} of {1} +- ++ \ \ line {0} of {1} +--- old/src/share/classes/com/sun/tools/internal/ws/resources/modeler.properties Tue Aug 4 09:29:20 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/modeler.properties Tue Aug 4 09:29:19 2009 +@@ -65,9 +65,9 @@ + wsdlmodeler.warning.noPortsInService=Service \"{0}\" does not contain any usable ports. try running wsimport with -extension switch. + wsdlmodeler.warning.noOperationsInPort=Port \"{0}\" does not contain any usable operations + wsdlmodeler.warning.ignoringNonSOAPPort=ignoring port \"{0}\": not a standard SOAP port. try running wsimport with -extension switch. +-wsdlmodeler.warning.nonSOAPPort=port \"{0}\": not a standard SOAP port. The generated artifacts may not work with JAXWS runtime. ++wsdlmodeler.warning.nonSOAPPort=port \"{0}\": not a standard SOAP port. The generated artifacts may not work with JAXWS runtime. + wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignoring port \"{0}\": no SOAP address specified. try running wsimport with -extension switch. +-wsdlmodeler.warning.noSOAPAddress=port \"{0}\" is not a SOAP port, it has no soap:address ++wsdlmodeler.warning.noSOAPAddress=port \"{0}\" is not a SOAP port, it has no soap:address + wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignoring SOAP port \"{0}\": unrecognized transport. try running wsimport with -extension switch. + + #BP1.1 R2705 +@@ -189,7 +189,7 @@ + mimemodeler.invalidMimePart.nameNotAllowed=name attribute on wsdl:part in Operation \"{0}\" is ignored. Its not allowed as per WS-I AP 1.0. + + +-wsdlmodeler20.rpcenc.not.supported=rpc/encoded wsdl's are not supported in JAXWS 2.0. ++wsdlmodeler20.rpcenc.not.supported=rpc/encoded wsdl's are not supported in JAXWS 2.0. + wsdlmodeler.warning.ignoringOperation.notNCName=Ignoring operation \"{0}\", it has illegal character ''{1}'' in its name. Its rpc-literal operation - jaxws won't be able to serialize it! + + wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignoring operation \"{0}\", can''t generate java method. Parameter: part "{2}\" in wsdl:message \"{1}\", is a java keyword. Use customization to change the parameter name or change the wsdl:part name. +@@ -207,11 +207,12 @@ + wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignoring operation \"{0}\", can''t generate java method ,customized name \"{1}\" of the wsdl:operation is a java keyword. + wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Invalid operation \"{0}\", can''t generate java method ,customized name \"{1}\" of the wsdl:operation is a java keyword. + +-wsdlmodeler.jaxb.javatype.notfound=Schema descriptor {0} in message part \"{1}\" could not be bound to Java! ++wsdlmodeler.jaxb.javatype.notfound=Schema descriptor {0} in message part \"{1}\" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch. + wsdlmodeler.unsupportedBinding.mime=WSDL MIME binding is not currently supported! + +-wsdlmodeler.nonUnique.body=Non unique body parts! In a port, operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\" have the same request body block {3} +-wsdlmodeler.rpclit.unkownschematype=XML type \"{0}\" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part \"{1}\" in the wsdl:message \"{2}\". ++wsdlmodeler.nonUnique.body.error=Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction ++wsdlmodeler.nonUnique.body.warning=Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction + ++wsdlmodeler.rpclit.unkownschematype=XML type \"{0}\" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part \"{1}\" in the wsdl:message \"{2}\". ++ + wsdlmodeler.responsebean.notfound=wsimport failed to generate async response bean for operation: {0} +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/processor.properties Tue Aug 4 09:29:22 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/processor.properties Tue Aug 4 09:29:21 2009 +@@ -24,4 +24,3 @@ + # + + processor.missing.model=model is missing +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/util.properties Tue Aug 4 09:29:24 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/util.properties Tue Aug 4 09:29:24 2009 +@@ -26,4 +26,3 @@ + holder.valuefield.not.found=Could not find the field in the Holder that contains the Holder''s value: {0} + null.namespace.found=Encountered error in wsdl. Check namespace of element <{0}> + sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/webserviceap.properties Tue Aug 4 09:29:26 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/webserviceap.properties Tue Aug 4 09:29:26 2009 +@@ -50,7 +50,7 @@ + webserviceap.oneway.operation.cannot.have.holders=The method {1} of class {0} is annotated @Oneway but contains inout or out paramerters (javax.xml.ws.Holder) + + webserviceap.oneway.operation.cannot.declare.exceptions=The method {1} of class {0} is annotated @Oneway but declares the exception {2} +- ++ + webserviceap.cannot.combine.handlerchain.soapmessagehandlers=You cannot specify both HanlderChain and SOAPMessageHandlers annotations + + webserviceap.invalid.handlerchain.file.nohandler-config=The handlerchain file {0} is invalid, it does not contain a handler-config element +@@ -109,19 +109,19 @@ + + webserviceap.mixed.binding.style=Class\: {0} contains mixed bindings. SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed. + +-webserviceap.endpointinteface.plus.annotation=The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element. ++webserviceap.endpointinteface.plus.annotation=The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element. + +-webserviceap.endpointinteface.plus.element=The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element. ++webserviceap.endpointinteface.plus.element=The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element. + +-webserviceap.non.in.parameters.must.be.holder=Class:\ {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder. ++webserviceap.non.in.parameters.must.be.holder=Class:\ {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder. + +-webserviceap.invalid.sei.annotation.element=The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class\: {1} ++webserviceap.invalid.sei.annotation.element=The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class\: {1} + +-webserviceap.invalid.sei.annotation=The @{0} annotation cannot be used on a service endpoint interface. Class\: {1} ++webserviceap.invalid.sei.annotation=The @{0} annotation cannot be used on a service endpoint interface. Class\: {1} + + webserviceap.invalid.sei.annotation.element.exclude=The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class\: {1} method\: {2} + +-webserviceap.invalid.webmethod.element.with.exclude=The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class\: {1} method\: {2} ++webserviceap.invalid.webmethod.element.with.exclude=The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class\: {1} method\: {2} + + webserviceap.doc.bare.no.out=Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class\: {0}, method: {1} + webserviceap.doc.bare.return.and.out=Document/literal bare methods cannot have a return type and out parameters. Class\: {0}, method: {1} +@@ -137,15 +137,17 @@ + + webserviceap.webservice.method.is.abstract=Classes annotated with @javax.jws.WebService must not have abstract methods. Class\: {0} Method: {1} + +-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1} ++webserviceap.webservice.method.is.static.or.final=Method annotated with @javax.jws.WebMethod must not be static or final. Class\: {0} Method: {1} + ++#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1} ++ + webserviceap.webservice.no.default.constructor=Classes annotated with @javax.jws.WebService must have a public default constructor. Class\: {0} + +-webserviceap.oneway.and.not.one.in=Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class\: {0} Method\: {1} ++webserviceap.oneway.and.not.one.in=Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class\: {0} Method\: {1} + +-webserviceap.doc.bare.no.return.and.no.out=Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class\: {0} Method\: {1} ++webserviceap.doc.bare.no.return.and.no.out=Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class\: {0} Method\: {1} + +-webserviceap.doc.bare.and.no.one.in=Document literal bare methods must have one non-header, IN/INOUT parameter. Class\: {0} Method\: {1} ++webserviceap.doc.bare.and.no.one.in=Document literal bare methods must have one non-header, IN/INOUT parameter. Class\: {0} Method\: {1} + + webserviceap.method.not.implemented=Methods in an endpointInterface must be implemented in the implementation class. Interface Class\:{0} Implementation Class\:{1} Method\: {2} + +@@ -152,4 +154,3 @@ + webserviceap.no.package.class.must.have.targetnamespace=@javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element. Class\: {0} + + webserviceap.webservice.and.webserviceprovider=Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class\: {0} +- +--- old/src/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties Tue Aug 4 09:29:28 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties Tue Aug 4 09:29:28 2009 +@@ -44,13 +44,23 @@ + \ -p specifies the target package\n\ + \ -quiet suppress wsimport output\n\ + \ -s specify where to place generated source files\n\ +-\ -target generate code as per the given JAXWS specification version.\n\ +-\ version 2.0 will generate compliant code for JAXWS 2.0 spec.\n\ ++\ -target generate code as per the given JAXWS spec version\n\ ++\ e.g. 2.0 will generate compliant code for JAXWS 2.0 spec\n\ + \ -verbose output messages about what the compiler is doing\n\ + \ -version print version information\n\ + \ -wsdllocation @WebServiceClient.wsdlLocation value\n\ + ++wsimport.usage.extensions=\n\ ++\Extensions:\n\ ++\ -XadditionalHeaders map headers not bound to request or response message to \n\ ++\ Java method parameters\n\ ++\ -Xauthfile file to carry authorization information in the format \n\ ++\ http://username:password@example.org/stock?wsdl\n\ ++\ -Xdebug print debug information\n\ ++\ -Xno-addressing-databinding enable binding of W3C EndpointReferenceType to Java\n\ ++\ -Xnocompile do not compile generated Java files\n\ + ++ + wsimport.usage.examples=\n\ + \Examples:\n\ + \ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ +@@ -76,15 +86,18 @@ + \ -s specify where to place generated source files\n\ + \ -verbose output messages about what the compiler is doing\n\ + \ -version print version information\n\ +-\ -wsdl[:protocol] generate a WSDL file. The protocol is optional.\n\ +-\ Valid protocols are soap1.1 and Xsoap1.2, the default\n\ +-\ is soap1.1. Xsoap1.2 is not standard and can only be\n\ +-\ used in conjunction with the -extension option\n\ ++\ -wsdl[:protocol] generate a WSDL file. The protocol is optional.\n\ ++\ Valid protocols are {1},\n\ ++\ the default is soap1.1.\n\ ++\ The non stanadard protocols {2}\n\ ++\ can only be used in conjunction with the\n\ ++\ -extension option.\n\ + \ -servicename specify the Service name to use in the generated WSDL\n\ + \ Used in conjunction with the -wsdl option.\n\ + \ -portname specify the Port name to use in the generated WSDL\n\ + \ Used in conjunction with the -wsdl option. + ++ + wsgen.usage.examples=\n\ + \Examples:\n\ + \ wsgen -cp . example.Stock\n\ +@@ -93,7 +106,7 @@ + wrapperTask.needEndorsed=\ + You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API. \ + Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), \ +-or set xendorsed="true" on <{0}>. ++or set xendorsed="true" on <{0}>. + + wrapperTask.loading20Api=\ + You are loading JAX-WS 2.0 API from {0} but this tool requires JAX-WS 2.1 API. +@@ -126,7 +139,8 @@ + wsgen.could.not.create.file="Could not create file: "\{0}\" + wsgen.missingFile=Missing SEI + wsgen.soap12.without.extension=The optional protocol \"Xsoap1.2\" must be used in conjunction with the \"-extension\" option. +-wsgen.wsdl.arg.no.genwsdl=The \"{0}\" option can only be in conjunction with the "-wsdl" option. ++wsgen.protocol.without.extension=The optional protocol \"{0}\" must be used in conjunction with the \"-extension\" option. ++wsgen.wsdl.arg.no.genwsdl=The \"{0}\" option can only be in conjunction with the "-wsdl" option. + wsgen.servicename.missing.namespace=The service name \"{0}\" is missing a namespace. + wsgen.servicename.missing.localname=The service name \"{0}\" is missing a localname. + wsgen.portname.missing.namespace=The port name \"{0}\" is missing a namespace. +@@ -151,17 +165,41 @@ + Failed to parse "{0}": {1} + + wsimport.ParsingWSDL=parsing WSDL...\n\n +-wsimport.GeneratingCode=generating code... +- ++wsimport.GeneratingCode=generating code...\n ++wsimport.CompilingCode=\ncompiling code...\n + wsimport.ILLEGAL_TARGET_VERSION = \ + "{0}" is not a valid target version. "2.0" and "2.1" are supported. + ++wsimport.ILLEGAL_AUTH_INFO = \ ++ "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//. ++ ++wsimport.readingAuthFile = \ ++ Trying to read authorization file : "{0}"... ++ ++wsimport.authFileNotFound = \ ++ Authorization file "{0}" not found. If the WSDL access needs Basic Authentication, please provide authorization file with read access at {1} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port// ++ ++wsimport.authInfoNeeded = \ ++ {0}, "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port// ++ ++wsimport.AUTH_INFO_LINENO = \ ++ "line {0} of {1} ++ ++ + wsimport.ErrorMessage = \ +- [ERROR] {0} ++ [ERROR] {0} + + wsimport.WarningMessage = \ +- [WARNING] {0} ++ [WARNING] {0} + + wsimport.InfoMessage = \ +- [INFO] {0} +- ++ [INFO] {0} ++ ++wsimport.DebugMessage = \ ++ [DEBUG] {0} ++ ++wsimport.httpRedirect = \ ++ Server returned HTTP Status code: "{0}", retrying with "{1}" ++ ++wsimport.maxRedirectAttempt = \ ++ Can not get a WSDL maximum number of redirects(5) reached +--- old/src/share/classes/com/sun/tools/internal/ws/resources/wsdl.properties Tue Aug 4 09:29:31 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/resources/wsdl.properties Tue Aug 4 09:29:30 2009 +@@ -41,7 +41,6 @@ + parsing.unknownNamespacePrefix=undeclared namespace prefix: \"{0}\" + parsing.invalidURI=invalid URI: {0} + parsing.ioExceptionWithSystemId=failed to parse document at \"{0}\" +-parsing.unableToGetMetadata= Unable to get Metadata from: {0} + parsing.ioException=parsing failed: {0} + parsing.saxExceptionWithSystemId=invalid WSDL file! failed to parse document at \"{0}\" + parsing.saxException=invalid WSDL file! parsing failed: {0} +@@ -52,7 +51,7 @@ + parsing.missingRequiredAttribute=missing required attribute \"{1}\" of element \"{0}\" + parsing.invalidTag=expected element \"{1}\", found \"{0}\" + parsing.invalidTagNS=Invalid WSDL at {4}: expected element \"{2}\" (in namespace \"{3}\"), found element \"{0}\" (in namespace \"{1}\") +-parsing.nonWhitespaceTextFound=found unexpected non whitespace text: \"{0}\" ++parsing.nonWhitespaceTextFound=found unexpected non-whitespace text: \"{0}\" + parsing.elementExpected=unexpected non-element found + # + entity.duplicate=duplicate entity: \"{0}\" +@@ -59,9 +58,9 @@ + entity.duplicateWithType=duplicate \"{0}\" entity: \"{1}\" + + entity.notFoundByID=invalid entity id: \"{0}\" +-entity.notFoundByQName=invalid entity name: \"{0}\" (in namespace: \"{1}\") +-entity.notFound.portType=wsdl:portType \"{0}\" referenced by wsdl:binding \"{1}\", but its not found in the wsdl +-entity.notFound.binding=wsdl:binding \"{0}" referenced by wsdl:port \"{1}\", but its not found in the wsdl ++entity.notFoundByQName={0} \"{1}\" not found in the wsdl: {2} ++entity.notFound.portType=wsdl:portType \"{0}\" referenced by wsdl:binding \"{1}\", but it's not found in the wsdl ++entity.notFound.binding=wsdl:binding \"{0}" referenced by wsdl:port \"{1}\", but it's not found in the wsdl + + # + validation.missingRequiredAttribute=missing required attribute \"{0}\" of element \"{1}\" +@@ -71,7 +70,7 @@ + validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" + validation.invalidSimpleTypeInElement=invalid element: \"{1}\", has named simpleType: \"{0}\" + validation.duplicatedElement=duplicated element: \"{0}\" +-validation.duplicatePartName=Invalid WSDL, duplicate parts in a wsdl:message is not allowed. \nwsdl:message {0} has duplicated part name: \"{1}\" ++validation.duplicatePartName=Invalid WSDL, duplicate parts in a wsdl:message is not allowed. \nwsdl:message {0} has a duplicated part name: \"{1}\" + validation.invalidSubEntity=invalid sub-element \"{0}\" of element \"{1}\" + validation.invalidAttribute=invalid attribute \"{0}\" of element \"{1}\" + validation.invalidAttributeValue=invalid value \"{1}\" for attribute \"{0}\" +@@ -88,51 +87,54 @@ + warning.inputOutputEmptyAction=ignoring empty Action in {0} element of \"{1}\" operation, using default instead + + #wsi compliant WSDL warnings +-warning.wsi.r2001=Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must only import WSDL document. Its trying to import: \"{0}\" +-warning.wsi.r2002=Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected wsdl namesapce: {0}, found: {1} +-warning.wsi.r2003=Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema element. +-warning.wsi.r2004=Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definition emmbedded inline within WSDLDocument. ++warning.wsi.r2001=Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: \"{0}\" ++warning.wsi.r2002=Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected wsdl namespace: {0}, found: {1} ++warning.wsi.r2003=Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema elements. ++warning.wsi.r2004=Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document. + + #Parser + Parsing.ParseFailed = \ +- Failed to parse the WSDL. ++\tFailed to parse the WSDL. + + Parsing.NotAWSDL=Failed to get WSDL components, probably {0} is not a valid WSDL file. + + AbstractReferenceFinderImpl.UnableToParse = \ +- Unable to parse "{0}" : {1} ++\tUnable to parse "{0}" : {1} + + Parser.NotABindingFile = \ +- not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1} ++\tnot an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1} + + + #Internalizer + Internalizer.TwoVersionAttributes = \ +- Both jaxws:version and version are present ++\tBoth jaxws:version and version are present + Internalizer.IncorrectVersion = \ +- JAXWS version attribute must be "2.0" ++\tJAXWS version attribute must be "2.0" + + Internalizer.VersionNotPresent = \ +- JAXWS version attribute must be present ++\tJAXWS version attribute must be present + + internalizer.targetNotAnElement= \ +- Target node is not an element ++\tTarget node is not an element + internalizer.targetNotFound= \ +- No target found for the wsdlLocation: {0} ++\tNo target found for the wsdlLocation: {0} + + Internalizer.IncorrectSchemaReference= \ +- "{0}" is not a part of this compilation. Is this a mistake for "{1}"? ++\t"{0}" is not a part of this compilation. Is this a mistake for "{1}"? + + internalizer.XPathEvaluationError = \ + XPath error: {0} + internalizer.XPathEvaluatesToNoTarget = \ +- XPath evaluation of "{0}" results in empty target node ++ XPath evaluation of "{0}" results in an empty target node + internalizer.XPathEvaulatesToTooManyTargets = \ + XPath evaluation of "{0}" results in too many ({1}) target nodes + internalizer.XPathEvaluatesToNonElement = \ + XPath evaluation of "{0}" needs to result in an element. +-invalid.customization.namespace=Ignoring customization: \"{0}\", it has no namespace. It must belong to the customization namespace. ++invalid.customization.namespace=Ignoring customization: \"{0}\", because it has no namespace. It must belong to the customization namespace. + + invalid.wsdl.with.dooc="Not a WSDL document: {0}, it gives \"{1}\", retrying with MEX..." +-invalid.wsdl="{0} does not look like a WSDL document, retrying with MEX..." +- ++invalid.wsdl=Invalid WSDL {0}, expected {1} found {2} at (line {3}) ++try.with.mex= {0} \n\nretrying with MEX... ++file.not.found={0} is unreachable ++parsing.unableToGetMetadata= {0}\n\n{1} ++failed.noservice=failed.noservice=Could not find wsdl:service in the provided WSDL(s): \n\n{0} At least one WSDL with at least one service definition needs to be provided. +--- old/src/share/classes/com/sun/tools/internal/ws/version.properties Tue Aug 4 09:29:33 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/version.properties Tue Aug 4 09:29:33 2009 +@@ -23,7 +23,7 @@ + # have any questions. + # + +-build-id=JAX-WS RI 2.1.1 +-build-version=JAX-WS RI 2.1.1 +-major-version=2.1.1 +- ++#Fri May 15 16:16:14 CEST 2009 ++build-id=JAX-WS RI 2.1.6 ++major-version=2.1.6 ++build-version=JAX-WS RI 2.1.6 +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/AbortException.java Tue Aug 4 09:29:35 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/AbortException.java Tue Aug 4 09:29:35 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + /** +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java Tue Aug 4 09:29:37 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java Tue Aug 4 09:29:37 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.istack.internal.Nullable; +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java Tue Aug 4 09:29:39 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java Tue Aug 4 09:29:39 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.istack.internal.Nullable; +@@ -126,6 +125,8 @@ + info( new SAXParseException(msg,null) ); + } + ++ public abstract void debug(SAXParseException exception); ++ + // + // + // convenience methods for derived classes +@@ -145,7 +146,7 @@ + return ModelMessages.CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(line==-1?"?":Integer.toString( line ), + getShortName( e.getSystemId())); + } else { +- return ModelMessages.CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION(); ++ return ""; //for unkown location just return empty string + } + } + +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java Tue Aug 4 09:29:42 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java Tue Aug 4 09:29:41 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.tools.internal.xjc.api.ErrorListener; +@@ -66,6 +65,10 @@ + if(core!=null) core.info(exception); + } + ++ public void debug(SAXParseException exception) { ++ ++ } ++ + public void warning(SAXParseException exception) { + if(core!=null) core.warning(exception); + } +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java Tue Aug 4 09:29:44 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java Tue Aug 4 09:29:43 2009 +@@ -35,6 +35,7 @@ + import java.lang.reflect.Method; + import java.net.MalformedURLException; + import java.net.URL; ++import java.net.URISyntaxException; + + /** + * A helper class to invoke javac. +@@ -43,9 +44,10 @@ + */ + class JavaCompilerHelper{ + static File getJarFile(Class clazz) { ++ URL url = null; + try { +- URL url = ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class")); +- return new File(url.getPath()); // this code is assuming that url is a file URL ++ url = ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class")); ++ return new File(url.toURI()); + } catch (ClassNotFoundException e) { + // if we can't figure out where JAXB/JAX-WS API are, we couldn't have been executing this code. + throw new Error(e); +@@ -52,6 +54,9 @@ + } catch (MalformedURLException e) { + // if we can't figure out where JAXB/JAX-WS API are, we couldn't have been executing this code. + throw new Error(e); ++ } catch (URISyntaxException e) { ++ // url.toURI() is picky and doesn't like ' ' in URL, so this is the fallback ++ return new File(url.getPath()); + } + } + +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/Options.java Tue Aug 4 09:29:46 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/Options.java Tue Aug 4 09:29:46 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.tools.internal.ws.resources.WscompileMessages; +@@ -150,6 +149,10 @@ + + + public boolean debug = false; ++ ++ /** ++ * -Xdebug - gives complete stack trace ++ */ + public boolean debugMode = false; + + +@@ -206,7 +209,7 @@ + * @exception BadCommandLineException + * thrown when there's a problem in the command-line arguments + */ +- public final void parseArguments( String[] args ) throws BadCommandLineException { ++ public void parseArguments( String[] args ) throws BadCommandLineException { + + for (int i = 0; i < args.length; i++) { + if(args[i].length()==0) +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java Tue Aug 4 09:29:48 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java Tue Aug 4 09:29:48 2009 +@@ -24,18 +24,20 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.mirror.apt.Filer; + import com.sun.tools.internal.ws.resources.WscompileMessages; ++import com.sun.tools.internal.ws.api.WsgenExtension; ++import com.sun.tools.internal.ws.api.WsgenProtocol; + import com.sun.xml.internal.ws.api.BindingID; ++import com.sun.xml.internal.ws.util.ServiceFinder; ++import com.sun.xml.internal.ws.binding.SOAPBindingImpl; + + import javax.jws.WebService; + import javax.xml.namespace.QName; + import java.io.File; +-import java.util.ArrayList; +-import java.util.List; ++import java.util.*; + + /** + * @author Vivek Pandey +@@ -66,8 +68,10 @@ + * protocol value + */ + public String protocol = "soap1.1"; +- public String transport; + ++ public Set protocols = new LinkedHashSet(); ++ public Map nonstdProtocols = new LinkedHashMap(); ++ + /** + * -XwsgenReport + */ +@@ -92,8 +96,22 @@ + private static final String SOAP11 = "soap1.1"; + public static final String X_SOAP12 = "Xsoap1.2"; + ++ public WsgenOptions() { ++ protocols.add(SOAP11); ++ protocols.add(X_SOAP12); ++ nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING); ++ ServiceFinder extn = ServiceFinder.find(WsgenExtension.class); ++ for(WsgenExtension ext : extn) { ++ Class clazz = ext.getClass(); ++ WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class); ++ protocols.add(pro.token()); ++ nonstdProtocols.put(pro.token(), pro.lexical()); ++ } ++ } ++ + @Override + protected int parseArguments(String[] args, int i) throws BadCommandLineException { ++ + int j = super.parseArguments(args, i); + if (args[i].equals(SERVICENAME_OPTION)) { + serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i)); +@@ -132,10 +150,8 @@ + index = value.indexOf('/'); + if (index == -1) { + protocol = value; +- transport = HTTP; + } else { + protocol = value.substring(0, index); +- transport = value.substring(index + 1); + } + protocolSet = true; + } +@@ -168,13 +184,9 @@ + public void validate() throws BadCommandLineException { + if(nonclassDestDir == null) + nonclassDestDir = destDir; +- if (!protocol.equalsIgnoreCase(SOAP11) && +- !protocol.equalsIgnoreCase(X_SOAP12)) { +- throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, SOAP11 + ", " + X_SOAP12)); +- } + +- if (transport != null && !transport.equalsIgnoreCase(HTTP)) { +- throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_TRANSPORT(transport, HTTP)); ++ if (!protocols.contains(protocol)) { ++ throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols)); + } + + if (endpoints.isEmpty()) { +@@ -184,6 +196,10 @@ + throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION()); + } + ++ if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) { ++ throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol)); ++ } ++ + validateEndpointClass(); + validateArguments(); + } +@@ -245,12 +261,13 @@ + } + } + +- public static BindingID getBindingID(String protocol) { ++ BindingID getBindingID(String protocol) { + if (protocol.equals(SOAP11)) + return BindingID.SOAP11_HTTP; + if (protocol.equals(X_SOAP12)) + return BindingID.SOAP12_HTTP; +- return null; ++ String lexical = nonstdProtocols.get(protocol); ++ return (lexical != null) ? BindingID.parse(lexical) : null; + } + + +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Tue Aug 4 09:29:50 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Tue Aug 4 09:29:50 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.mirror.apt.AnnotationProcessor; +@@ -32,6 +31,8 @@ + import com.sun.mirror.apt.AnnotationProcessorFactory; + import com.sun.mirror.declaration.AnnotationTypeDeclaration; + import com.sun.tools.internal.ws.ToolVersion; ++import com.sun.tools.internal.ws.api.WsgenExtension; ++import com.sun.tools.internal.ws.api.WsgenProtocol; + import com.sun.tools.internal.ws.processor.modeler.annotation.AnnotationProcessorContext; + import com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP; + import com.sun.tools.internal.ws.processor.modeler.wsdl.ConsoleErrorReporter; +@@ -46,11 +47,13 @@ + import com.sun.xml.internal.ws.api.server.Container; + import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension; + import com.sun.xml.internal.ws.binding.WebServiceFeatureList; ++import com.sun.xml.internal.ws.binding.SOAPBindingImpl; + import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; + import com.sun.xml.internal.ws.model.RuntimeModeler; + import com.sun.xml.internal.ws.util.ServiceFinder; + import com.sun.xml.internal.ws.wsdl.writer.WSDLGenerator; + import com.sun.xml.internal.ws.wsdl.writer.WSDLResolver; ++import com.sun.istack.internal.tools.ParallelWorldClassLoader; + import org.xml.sax.SAXParseException; + + import javax.xml.bind.annotation.XmlSeeAlso; +@@ -110,14 +113,16 @@ + return false; + } + }catch (Options.WeAreDone done){ +- usage(done.getOptions()); ++ usage((WsgenOptions)done.getOptions()); + }catch (BadCommandLineException e) { + if(e.getMessage()!=null) { + System.out.println(e.getMessage()); + System.out.println(); + } +- usage(e.getOptions()); ++ usage((WsgenOptions)e.getOptions()); + return false; ++ }catch(AbortException e){ ++ //error might have been reported + }finally{ + if(!options.keep){ + options.removeGeneratedFiles(); +@@ -161,12 +166,27 @@ + } + } + ++ /* ++ * To take care of JDK6-JDK6u3, where 2.1 API classes are not there ++ */ ++ private static boolean useBootClasspath(Class clazz) { ++ try { ++ ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class")); ++ return true; ++ } catch(Exception e) { ++ return false; ++ } ++ } ++ ++ + public boolean buildModel(String endpoint, Listener listener) throws BadCommandLineException { + final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener); + context = new AnnotationProcessorContext(); + webServiceAP = new WebServiceAP(options, context, errReceiver, out); + +- String[] args = new String[9]; ++ boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class); ++ ++ String[] args = new String[8 + (bootCP ? 1 :0)]; + args[0] = "-d"; + args[1] = options.destDir.getAbsolutePath(); + args[2] = "-classpath"; +@@ -175,7 +195,9 @@ + args[5] = options.sourceDir.getAbsolutePath(); + args[6] = "-XclassesAsDecls"; + args[7] = endpoint; +- args[8] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointReference.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(XmlSeeAlso.class); ++ if (bootCP) { ++ args[8] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointReference.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(XmlSeeAlso.class); ++ } + + // Workaround for bug 6499165: issue with javac debug option + workAroundJavacDebug(); +@@ -195,11 +217,12 @@ + throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_NOT_FOUND(endpoint)); + } + +- BindingID bindingID = WsgenOptions.getBindingID(options.protocol); ++ BindingID bindingID = options.getBindingID(options.protocol); + if (!options.protocolSet) { + bindingID = BindingID.parse(endpointClass); + } +- RuntimeModeler rtModeler = new RuntimeModeler(endpointClass, options.serviceName, bindingID); ++ WebServiceFeatureList wsfeatures = new WebServiceFeatureList(endpointClass); ++ RuntimeModeler rtModeler = new RuntimeModeler(endpointClass, options.serviceName, bindingID, wsfeatures.toArray()); + rtModeler.setClassLoader(classLoader); + if (options.portName != null) + rtModeler.setPortName(options.portName); +@@ -207,7 +230,7 @@ + + final File[] wsdlFileName = new File[1]; // used to capture the generated WSDL file. + final Map schemaFiles = new HashMap(); +- WebServiceFeatureList wsfeatures = new WebServiceFeatureList(endpointClass); ++ + WSDLGenerator wsdlGenerator = new WSDLGenerator(rtModel, + new WSDLResolver() { + private File toFile(String suggestedFilename) { +@@ -327,8 +350,12 @@ + } + } + +- protected void usage(Options options) { +- System.out.println(WscompileMessages.WSGEN_HELP("WSGEN")); ++ protected void usage(WsgenOptions options) { ++ // Just don't see any point in passing WsgenOptions ++ // BadCommandLineException also shouldn't have options ++ if (options == null) ++ options = this.options; ++ System.out.println(WscompileMessages.WSGEN_HELP("WSGEN", options.protocols, options.nonstdProtocols.keySet())); + System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES()); + } + +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java Tue Aug 4 09:29:53 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java Tue Aug 4 09:29:52 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.tools.internal.xjc.api.ErrorListener; +@@ -75,6 +74,8 @@ + + } + ++ public void debug(SAXParseException exception){} ++ + /** + * wsimport will periodically invoke this method to see if it should cancel a compilation. + * +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java Tue Aug 4 09:29:55 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java Tue Aug 4 09:29:54 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.codemodel.internal.JCodeModel; +@@ -50,6 +49,7 @@ + import javax.xml.stream.XMLStreamReader; + import java.io.File; + import java.io.IOException; ++import java.net.Authenticator; + import java.net.MalformedURLException; + import java.net.URL; + import java.util.ArrayList; +@@ -78,11 +78,27 @@ + public String defaultPackage = null; + + /** ++ * -XadditionalHeaders ++ */ ++ public boolean additionalHeaders; ++ ++ /** ++ * Setting disableSSLHostVerification to true disables the SSL Hostname verification while fetching the wsdls. ++ * -XdisableSSLHostVerification ++ */ ++ public boolean disableSSLHostnameVerification; ++ ++ /** + * JAXB's {@link SchemaCompiler} to be used for handling the schema portion. + * This object is also configured through options. + */ + private SchemaCompiler schemaCompiler = XJC.createSchemaCompiler(); + ++ /** ++ * Authentication file ++ */ ++ public File authFile; ++ + public JCodeModel getCodeModel() { + if(codeModel == null) + codeModel = new JCodeModel(); +@@ -101,6 +117,50 @@ + + private JCodeModel codeModel; + ++ /** ++ * This captures jars passed on the commandline and passes them to XJC and puts them in the classpath for compilation ++ */ ++ public List cmdlineJars = new ArrayList(); ++ ++ /** ++ * Parses arguments and fill fields of this object. ++ * ++ * @exception BadCommandLineException ++ * thrown when there's a problem in the command-line arguments ++ */ ++ @Override ++ public final void parseArguments( String[] args ) throws BadCommandLineException { ++ ++ for (int i = 0; i < args.length; i++) { ++ if(args[i].length()==0) ++ throw new BadCommandLineException(); ++ if (args[i].charAt(0) == '-') { ++ int j = parseArguments(args,i); ++ if(j==0) ++ throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i])); ++ i += (j-1); ++ } else { ++ if(args[i].endsWith(".jar")) { ++ ++ try { ++ cmdlineJars.add(args[i]); ++ schemaCompiler.getOptions().scanEpisodeFile(new File(args[i])); ++ ++ } catch (com.sun.tools.internal.xjc.BadCommandLineException e) { ++ //Driver.usage(jaxbOptions,false); ++ throw new BadCommandLineException(e.getMessage(), e); ++ } ++ } else{ ++ addFile(args[i]); ++ } ++ } ++ } ++ if(destDir == null) ++ destDir = new File("."); ++ if(sourceDir == null) ++ sourceDir = destDir; ++ } ++ + /** -Xno-addressing-databinding option to disable addressing namespace data binding. This is + * experimental switch and will be working as a temporary workaround till + * jaxb can provide a better way to selelctively disable compiling of an +@@ -119,6 +179,12 @@ + } else if (args[i].equals("-wsdllocation")) { + wsdlLocation = requireArgument("-wsdllocation", args, ++i); + return 2; ++ } else if (args[i].equals("-XadditionalHeaders")) { ++ additionalHeaders = true; ++ return 1; ++ } else if (args[i].equals("-XdisableSSLHostnameVerification")) { ++ disableSSLHostnameVerification = true; ++ return 1; + } else if (args[i].equals("-p")) { + defaultPackage = requireArgument("-p", args, ++i); + return 2; +@@ -173,6 +239,10 @@ + //Driver.usage(jaxbOptions,false); + throw new BadCommandLineException(e.getMessage(),e); + } ++ } else if (args[i].equals("-Xauthfile")) { ++ String authfile = requireArgument("-Xauthfile", args, ++i); ++ authFile = new File(authfile); ++ return 2; + } + + return 0; // what's this option? +@@ -182,12 +252,12 @@ + if (wsdls.isEmpty()) { + throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE()); + } ++ + if(wsdlLocation == null){ + wsdlLocation = wsdls.get(0).getSystemId(); + } + } + +- + @Override + protected void addFile(String arg) throws BadCommandLineException { + addFile(arg, wsdls, "*.wsdl"); +@@ -360,5 +430,4 @@ + } + } + } +- + } +--- old/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Tue Aug 4 09:29:57 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Tue Aug 4 09:29:57 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wscompile; + + import com.sun.codemodel.internal.CodeWriter; +@@ -42,6 +41,7 @@ + import com.sun.tools.internal.xjc.util.NullStream; + import com.sun.xml.internal.ws.api.server.Container; + import com.sun.xml.internal.ws.util.ServiceFinder; ++import com.sun.istack.internal.tools.ParallelWorldClassLoader; + import org.xml.sax.EntityResolver; + import org.xml.sax.SAXParseException; + +@@ -53,6 +53,7 @@ + import java.io.PrintStream; + import java.util.ArrayList; + import java.util.List; ++import java.net.Authenticator; + + /** + * @author Vivek Pandey +@@ -76,7 +77,6 @@ + this.container = container; + } + +- + public boolean run(String[] args) { + class Listener extends WsimportListener { + ConsoleErrorReporter cer = new ConsoleErrorReporter(out == null ? new PrintStream(new NullStream()) : out); +@@ -107,6 +107,11 @@ + } + + @Override ++ public void debug(SAXParseException exception) { ++ cer.debug(exception); ++ } ++ ++ @Override + public void info(SAXParseException exception) { + cer.info(exception); + } +@@ -132,6 +137,13 @@ + if (listener.isCanceled()) + throw new AbortException(); + } ++ ++ @Override ++ public void debug(SAXParseException exception){ ++ if(options.debugMode){ ++ listener.debug(exception); ++ } ++ } + }; + + for (String arg : args) { +@@ -151,6 +163,11 @@ + if( !options.quiet ) + listener.message(WscompileMessages.WSIMPORT_PARSING_WSDL()); + ++ //set auth info ++ //if(options.authFile != null) ++ Authenticator.setDefault(new DefaultAuthenticator(receiver, options.authFile)); ++ ++ + WSDLModeler wsdlModeler = new WSDLModeler(options, receiver); + Model wsdlModel = wsdlModeler.buildModel(); + if (wsdlModel == null) { +@@ -165,10 +182,13 @@ + TJavaGeneratorExtension[] genExtn = ServiceFinder.find(TJavaGeneratorExtension.class).toArray(); + CustomExceptionGenerator.generate(wsdlModel, options, receiver); + SeiGenerator.generate(wsdlModel, options, receiver, genExtn); ++ if(receiver.hadError()){ ++ throw new AbortException(); ++ } + ServiceGenerator.generate(wsdlModel, options, receiver); + CodeWriter cw = new WSCodeWriter(options.sourceDir, options); + if (options.verbose) +- cw = new ProgressCodeWriter(cw, System.out); ++ cw = new ProgressCodeWriter(cw, out); + options.getCodeModel().build(cw); + } catch(AbortException e){ + //error might have been reported +@@ -177,7 +197,7 @@ + } + + if (!options.nocompile){ +- if(!compileGeneratedClasses(receiver)){ ++ if(!compileGeneratedClasses(receiver, listener)){ + listener.message(WscompileMessages.WSCOMPILE_COMPILATION_FAILED()); + return false; + } +@@ -204,7 +224,20 @@ + this.options.entityResolver = resolver; + } + +- protected boolean compileGeneratedClasses(ErrorReceiver receiver){ ++ /* ++ * To take care of JDK6-JDK6u3, where 2.1 API classes are not there ++ */ ++ private static boolean useBootClasspath(Class clazz) { ++ try { ++ ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class")); ++ return true; ++ } catch(Exception e) { ++ return false; ++ } ++ } ++ ++ ++ protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){ + List sourceFiles = new ArrayList(); + + for (File f : options.getGeneratedFiles()) { +@@ -216,14 +249,18 @@ + if (sourceFiles.size() > 0) { + String classDir = options.destDir.getAbsolutePath(); + String classpathString = createClasspathString(); +- String[] args = new String[5 + (options.debug ? 1 : 0) ++ boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class); ++ String[] args = new String[4 + (bootCP ? 1 : 0) + (options.debug ? 1 : 0) + + sourceFiles.size()]; + args[0] = "-d"; + args[1] = classDir; + args[2] = "-classpath"; + args[3] = classpathString; +- args[4] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointReference.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(XmlSeeAlso.class); +- int baseIndex = 5; ++ int baseIndex = 4; ++ if (bootCP) { ++ args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointReference.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(XmlSeeAlso.class); ++ } ++ + if (options.debug) { + args[baseIndex++] = "-g"; + } +@@ -231,6 +268,15 @@ + args[baseIndex + i] = sourceFiles.get(i); + } + ++ listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE()); ++ if(options.verbose){ ++ StringBuffer argstr = new StringBuffer(); ++ for(String arg:args){ ++ argstr.append(arg).append(" "); ++ } ++ listener.message("javac "+ argstr.toString()); ++ } ++ + return JavaCompilerHelper.compile(args, out, receiver); + } + //there are no files to compile, so return true? +@@ -238,11 +284,16 @@ + } + + private String createClasspathString() { +- return System.getProperty("java.class.path"); ++ String classpathStr = System.getProperty("java.class.path"); ++ for(String s: options.cmdlineJars) { ++ classpathStr = classpathStr+File.pathSeparator+new File(s); ++ } ++ return classpathStr; + } + + protected void usage(Options options) { + System.out.println(WscompileMessages.WSIMPORT_HELP(WSIMPORT)); ++ System.out.println(WscompileMessages.WSIMPORT_USAGE_EXTENSIONS()); + System.out.println(WscompileMessages.WSIMPORT_USAGE_EXAMPLES()); + } + } +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/document/Message.java Tue Aug 4 09:29:59 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/document/Message.java Tue Aug 4 09:29:59 2009 +@@ -53,8 +53,11 @@ + throw new AbortException(); + } + +- _partsByName.put(part.getName(), part); +- _parts.add(part); ++ if(part.getDescriptor() != null && part.getDescriptorKind() != null) { ++ _partsByName.put(part.getName(), part); ++ _parts.add(part); ++ } else ++ errorReceiver.warning(part.getLocator(), WsdlMessages.PARSING_ELEMENT_OR_TYPE_REQUIRED(part.getName())); + } + + public Iterator parts() { +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java Tue Aug 4 09:30:02 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java Tue Aug 4 09:30:01 2009 +@@ -232,15 +232,6 @@ + this.isProvider = isProvider; + } + +- /* (non-Javadoc) +- * @see Entity#getProperty(java.lang.String) +- */ +- public Object getProperty(String key) { +- if(key.equals(JAXWSBindingsConstants.JAXB_BINDINGS)) +- return jaxbBindings; +- return null; +- } +- + /** + * @return Returns the methodName. + */ +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java Tue Aug 4 09:30:04 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java Tue Aug 4 09:30:03 2009 +@@ -134,26 +134,11 @@ + } + } + +- public void undefine(GloballyKnown e) { +- Map map = getMap(e.getKind()); +- if (e.getName() == null) +- return; +- QName name = +- new QName(e.getDefining().getTargetNamespaceURI(), e.getName()); +- +- if (map.containsKey(name)){ +- errReceiver.error(e.getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(e.getElementName().getLocalPart(), e.getElementName().getNamespaceURI())); +- throw new AbortException(); +- } else{ +- map.remove(name); +- } +- } +- + public GloballyKnown find(Kind k, QName name) { + Map map = getMap(k); + Object result = map.get(name); + if (result == null){ +- errReceiver.error(new LocatorImpl(), WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(name.getLocalPart(), name.getNamespaceURI())); ++ errReceiver.error(null, WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(k.getName(), name, _systemId)); + throw new AbortException(); + } + return (GloballyKnown) result; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java Tue Aug 4 09:30:06 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java Tue Aug 4 09:30:06 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.istack.internal.SAXParseException2; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java Tue Aug 4 09:30:08 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java Tue Aug 4 09:30:08 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Tue Aug 4 09:30:10 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Tue Aug 4 09:30:10 2009 +@@ -24,22 +24,23 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + ++import com.sun.istack.internal.NotNull; ++import com.sun.tools.internal.ws.resources.WscompileMessages; ++import com.sun.tools.internal.ws.wscompile.AbortException; ++import com.sun.tools.internal.ws.wscompile.DefaultAuthenticator; + import com.sun.tools.internal.ws.wscompile.ErrorReceiver; + import com.sun.tools.internal.ws.wscompile.WsimportOptions; + import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants; +-import com.sun.tools.internal.ws.resources.WscompileMessages; + import com.sun.tools.internal.xjc.reader.internalizer.LocatorTable; + import com.sun.xml.internal.bind.marshaller.DataWriter; ++import com.sun.xml.internal.ws.util.JAXWSUtils; + import org.w3c.dom.Document; + import org.w3c.dom.Element; + import org.w3c.dom.NodeList; + import org.xml.sax.ContentHandler; +-import org.xml.sax.InputSource; +-import org.xml.sax.SAXException; +-import org.xml.sax.XMLReader; ++import org.xml.sax.*; + import org.xml.sax.helpers.XMLFilterImpl; + + import javax.xml.parsers.DocumentBuilder; +@@ -51,17 +52,15 @@ + import javax.xml.transform.TransformerFactory; + import javax.xml.transform.dom.DOMSource; + import javax.xml.transform.sax.SAXResult; ++import javax.net.ssl.HttpsURLConnection; ++import javax.net.ssl.HostnameVerifier; ++import javax.net.ssl.SSLSession; + import java.io.IOException; ++import java.io.InputStream; + import java.io.OutputStream; + import java.io.OutputStreamWriter; +-import java.net.URI; +-import java.net.URISyntaxException; +-import java.util.ArrayList; +-import java.util.HashMap; +-import java.util.HashSet; +-import java.util.List; +-import java.util.Map; +-import java.util.Set; ++import java.net.*; ++import java.util.*; + + /** + * @author Vivek Pandey +@@ -134,10 +133,9 @@ + return inlinedSchemaElements; + } + +- public Document parse(InputSource source, boolean root) throws SAXException { ++ public @NotNull Document parse(InputSource source, boolean root) throws SAXException, IOException { + if (source.getSystemId() == null) + throw new IllegalArgumentException(); +- + return parse(source.getSystemId(), source, root); + } + +@@ -148,7 +146,7 @@ + * + * @return the parsed DOM document object. + */ +- public Document parse(String systemId, boolean root) throws SAXException, IOException { ++ public Document parse(String systemId, boolean root) throws SAXException, IOException{ + + systemId = normalizeSystemId(systemId); + +@@ -179,13 +177,11 @@ + * + * @return null if there was a parse error. otherwise non-null. + */ +- public Document parse(String systemId, InputSource inputSource, boolean root) throws SAXException { ++ public @NotNull Document parse(String systemId, InputSource inputSource, boolean root) throws SAXException, IOException{ + Document dom = documentBuilder.newDocument(); + + systemId = normalizeSystemId(systemId); + +- boolean retryMex = false; +- Exception exception = null; + // put into the map before growing a tree, to + // prevent recursive reference from causing infinite loop. + core.put(systemId, dom); +@@ -201,8 +197,70 @@ + reader.setErrorHandler(errorReceiver); + if (options.entityResolver != null) + reader.setEntityResolver(options.entityResolver); ++ ++ InputStream is = null; ++ if(inputSource.getByteStream() != null){ ++ is = inputSource.getByteStream(); ++ } ++ if(is == null){ ++ int redirects=0; ++ boolean redirect; ++ URL url = JAXWSUtils.getFileOrURL(inputSource.getSystemId()); ++ URLConnection conn = url.openConnection(); ++ if (conn instanceof HttpsURLConnection) { ++ if (options.disableSSLHostnameVerification) { ++ ((HttpsURLConnection) conn).setHostnameVerifier(new HttpClientVerifier()); ++ } ++ } ++ ++ do { ++ redirect = false; ++ try { ++ is = conn.getInputStream(); ++ //is = sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedirects(conn); ++ } catch (IOException e) { ++ if (conn instanceof HttpURLConnection) { ++ HttpURLConnection httpConn = ((HttpURLConnection) conn); ++ int code = httpConn.getResponseCode(); ++ if (code == 401) { ++ errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_INFO_NEEDED(e.getMessage(), systemId, DefaultAuthenticator.defaultAuthfile), null, e)); ++ throw new AbortException(); ++ } ++ //FOR other code we will retry with MEX ++ } ++ throw e; ++ } ++ ++ //handle 302 or 303, JDK does not seem to handle 302 very well. ++ //Need to redesign this a bit as we need to throw better error message for IOException in this case ++ if (conn instanceof HttpURLConnection) { ++ HttpURLConnection httpConn = ((HttpURLConnection) conn); ++ int code = httpConn.getResponseCode(); ++ if (code == 302 || code == 303) { ++ //retry with the value in Location header ++ List seeOther = httpConn.getHeaderFields().get("Location"); ++ if (seeOther != null && seeOther.size() > 0) { ++ URL newurl = new URL(url, seeOther.get(0)); ++ if (!newurl.equals(url)){ ++ errorReceiver.info(new SAXParseException(WscompileMessages.WSIMPORT_HTTP_REDIRECT(code, seeOther.get(0)), null)); ++ url = newurl; ++ httpConn.disconnect(); ++ if(redirects >= 5){ ++ errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_MAX_REDIRECT_ATTEMPT(), null)); ++ throw new AbortException(); ++ } ++ conn = url.openConnection(); ++ redirects++; ++ redirect = true; ++ } ++ } ++ } ++ } ++ } while (redirect); ++ } ++ inputSource.setByteStream(is); + reader.parse(inputSource); +- Element doc = dom.getDocumentElement(); ++ Element doc = dom.getDocumentElement(); + if (doc == null) { + return null; + } +@@ -211,18 +269,10 @@ + inlinedSchemaElements.add((Element) schemas.item(i)); + } + } catch (ParserConfigurationException e) { +- exception = e; +- } catch (IOException e) { +- exception = e; +- } catch (SAXException e) { +- exception = e; ++ errorReceiver.error(e); ++ throw new SAXException(e.getMessage()); + } + +- if (exception != null) { +- errorReceiver.error(WscompileMessages.WSIMPORT_NO_WSDL(systemId), exception); +- core.remove(systemId); +- rootDocuments.remove(systemId); +- } + return dom; + } + +@@ -236,6 +286,14 @@ + return externalReferences; + } + ++ // overide default SSL HttpClientVerifier to always return true ++ // effectively overiding Hostname client verification when using SSL ++ private static class HttpClientVerifier implements HostnameVerifier { ++ public boolean verify(String s, SSLSession sslSession) { ++ return true; ++ } ++ } ++ + public interface Handler extends ContentHandler { + /** + * Gets the DOM that was built. +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java Tue Aug 4 09:30:13 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java Tue Aug 4 09:30:12 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.xml.internal.bind.unmarshaller.DOMScanner; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java Tue Aug 4 09:30:15 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java Tue Aug 4 09:30:14 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import org.w3c.dom.Element; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java Tue Aug 4 09:30:17 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java Tue Aug 4 09:30:17 2009 +@@ -33,9 +33,14 @@ + import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants; + import com.sun.tools.internal.xjc.util.DOMUtils; + import com.sun.xml.internal.bind.v2.util.EditDistance; +-import com.sun.xml.internal.ws.util.JAXWSUtils; + import com.sun.xml.internal.ws.util.DOMUtil; +-import org.w3c.dom.*; ++import com.sun.xml.internal.ws.util.JAXWSUtils; ++import org.w3c.dom.Attr; ++import org.w3c.dom.Document; ++import org.w3c.dom.Element; ++import org.w3c.dom.NamedNodeMap; ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; + import org.xml.sax.SAXParseException; + + import javax.xml.namespace.NamespaceContext; +@@ -45,11 +50,17 @@ + import javax.xml.xpath.XPathFactory; + import java.net.MalformedURLException; + import java.net.URL; +-import java.util.*; ++import java.util.ArrayList; ++import java.util.HashMap; ++import java.util.HashSet; ++import java.util.Iterator; ++import java.util.Map; ++import java.util.Set; + + + /** + * Internalizes external binding declarations. ++ * + * @author Vivek Pandey + */ + public class Internalizer { +@@ -66,13 +77,13 @@ + this.errorReceiver = errorReceiver; + } + +- public void transform(){ +- Map targetNodes = new HashMap(); +- for(Element jaxwsBinding : forest.outerMostBindings){ +- buildTargetNodeMap(jaxwsBinding, jaxwsBinding, targetNodes ); ++ public void transform() { ++ Map targetNodes = new HashMap(); ++ for (Element jaxwsBinding : forest.outerMostBindings) { ++ buildTargetNodeMap(jaxwsBinding, jaxwsBinding, targetNodes); + } +- for(Element jaxwsBinding : forest.outerMostBindings){ +- move(jaxwsBinding, targetNodes ); ++ for (Element jaxwsBinding : forest.outerMostBindings) { ++ move(jaxwsBinding, targetNodes); + } + } + +@@ -79,15 +90,15 @@ + /** + * Validates attributes of a <JAXWS:bindings> element. + */ +- private void validate( Element bindings ) { ++ private void validate(Element bindings) { + NamedNodeMap atts = bindings.getAttributes(); +- for( int i=0; i result ) { ++ private void buildTargetNodeMap(Element bindings, Node inheritedTarget, Map result) { + // start by the inherited target + Node target = inheritedTarget; + +@@ -106,22 +117,27 @@ + validate(bindings); // validate this node + + // look for @wsdlLocation +- if( bindings.getAttributeNode("wsdlLocation")!=null ) { +- String wsdlLocation = bindings.getAttribute("wsdlLocation"); ++ if (isTopLevelBinding(bindings)) { ++ String wsdlLocation; ++ if (bindings.getAttributeNode("wsdlLocation") != null) { ++ wsdlLocation = bindings.getAttribute("wsdlLocation"); + +- try { +- // absolutize this URI. +- // TODO: use the URI class +- // TODO: honor xml:base +- wsdlLocation = new URL(new URL(forest.getSystemId(bindings.getOwnerDocument())), +- wsdlLocation ).toExternalForm(); +- } catch( MalformedURLException e ) { +- wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); ++ try { ++ // absolutize this URI. ++ // TODO: use the URI class ++ // TODO: honor xml:base ++ wsdlLocation = new URL(new URL(forest.getSystemId(bindings.getOwnerDocument())), ++ wsdlLocation).toExternalForm(); ++ } catch (MalformedURLException e) { ++ wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); ++ } ++ } else { ++ //the node does not have ++ wsdlLocation = forest.getFirstRootDocument(); + } +- +- //target = wsdlDocuments.get(wsdlLocation); + target = forest.get(wsdlLocation); +- if(target==null) { ++ ++ if (target == null) { + reportError(bindings, WsdlMessages.INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(wsdlLocation, EditDistance.findNearest(wsdlLocation, forest.listSystemIDs()))); + return; // abort processing this + } +@@ -134,7 +150,7 @@ + if (element != null && element.getNamespaceURI().equals(Constants.NS_WSDL) && element.getLocalName().equals("definitions")) { + //get all schema elements + Element type = DOMUtils.getFirstChildElement(element, Constants.NS_WSDL, "types"); +- if(type != null){ ++ if (type != null) { + for (Element schemaElement : DOMUtils.getChildElements(type, Constants.NS_XSD, "schema")) { + if (!schemaElement.hasAttributeNS(Constants.NS_XMLNS, "jaxb")) { + schemaElement.setAttributeNS(Constants.NS_XMLNS, "xmlns:jaxb", JAXWSBindingsConstants.NS_JAXB_BINDINGS); +@@ -150,45 +166,50 @@ + + + boolean hasNode = true; +- if((isJAXWSBindings(bindings) || isJAXBBindings(bindings)) && bindings.getAttributeNode("node")!=null ) { ++ if ((isJAXWSBindings(bindings) || isJAXBBindings(bindings)) && bindings.getAttributeNode("node") != null) { + target = evaluateXPathNode(bindings, target, bindings.getAttribute("node"), new NamespaceContextImpl(bindings)); +- }else if(isJAXWSBindings(bindings) && (bindings.getAttributeNode("node")==null) && !isTopLevelBinding(bindings)) { ++ } else ++ if (isJAXWSBindings(bindings) && (bindings.getAttributeNode("node") == null) && !isTopLevelBinding(bindings)) { + hasNode = false; +- }else if(isGlobalBinding(bindings) && !isWSDLDefinition(target) && isTopLevelBinding(bindings.getParentNode())){ ++ } else ++ if (isGlobalBinding(bindings) && !isWSDLDefinition(target) && isTopLevelBinding(bindings.getParentNode())) { + target = getWSDLDefintionNode(bindings, target); + } + + //if target is null it means the xpath evaluation has some problem, + // just return +- if(target == null) ++ if (target == null) + return; + + // update the result map +- if(hasNode) +- result.put( bindings, target ); ++ if (hasNode) ++ result.put(bindings, target); + + // look for child and process them recursively +- Element[] children = getChildElements( bindings); ++ Element[] children = getChildElements(bindings); + for (Element child : children) + buildTargetNodeMap(child, target, result); + } + +- private Node getWSDLDefintionNode(Node bindings, Node target){ ++ private Node getWSDLDefintionNode(Node bindings, Node target) { + return evaluateXPathNode(bindings, target, "wsdl:definitions", +- new NamespaceContext(){ +- public String getNamespaceURI(String prefix){ +- return "http://schemas.xmlsoap.org/wsdl/"; +- } +- public String getPrefix(String nsURI){ +- throw new UnsupportedOperationException(); +- } +- public Iterator getPrefixes(String namespaceURI) { +- throw new UnsupportedOperationException(); +- }}); ++ new NamespaceContext() { ++ public String getNamespaceURI(String prefix) { ++ return "http://schemas.xmlsoap.org/wsdl/"; ++ } ++ ++ public String getPrefix(String nsURI) { ++ throw new UnsupportedOperationException(); ++ } ++ ++ public Iterator getPrefixes(String namespaceURI) { ++ throw new UnsupportedOperationException(); ++ } ++ }); + } + +- private boolean isWSDLDefinition(Node target){ +- if(target == null) ++ private boolean isWSDLDefinition(Node target) { ++ if (target == null) + return false; + String localName = target.getLocalName(); + String nsURI = target.getNamespaceURI(); +@@ -195,43 +216,41 @@ + return fixNull(localName).equals("definitions") && fixNull(nsURI).equals("http://schemas.xmlsoap.org/wsdl/"); + } + +- private boolean isTopLevelBinding(Node node){ +- if(node instanceof Document) +- node = ((Document)node).getDocumentElement(); +- return ((node != null) && (((Element)node).getAttributeNode("wsdlLocation") != null)); ++ private boolean isTopLevelBinding(Node node) { ++ return node.getOwnerDocument().getDocumentElement() == node; + } + +- private boolean isJAXWSBindings(Node bindings){ ++ private boolean isJAXWSBindings(Node bindings) { + return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) && bindings.getLocalName().equals("bindings")); + } + +- private boolean isJAXBBindings(Node bindings){ ++ private boolean isJAXBBindings(Node bindings) { + return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXB_BINDINGS) && bindings.getLocalName().equals("bindings")); + } + +- private boolean isGlobalBinding(Node bindings){ +- if(bindings.getNamespaceURI() == null){ ++ private boolean isGlobalBinding(Node bindings) { ++ if (bindings.getNamespaceURI() == null) { + errorReceiver.warning(forest.locatorTable.getStartLocation((Element) bindings), WsdlMessages.INVALID_CUSTOMIZATION_NAMESPACE(bindings.getLocalName())); + return false; + } +- return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) && ++ return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) && + (bindings.getLocalName().equals("package") || +- bindings.getLocalName().equals("enableAsyncMapping") || +- bindings.getLocalName().equals("enableAdditionalSOAPHeaderMapping") || +- bindings.getLocalName().equals("enableWrapperStyle") || +- bindings.getLocalName().equals("enableMIMEContent"))); ++ bindings.getLocalName().equals("enableAsyncMapping") || ++ bindings.getLocalName().equals("enableAdditionalSOAPHeaderMapping") || ++ bindings.getLocalName().equals("enableWrapperStyle") || ++ bindings.getLocalName().equals("enableMIMEContent"))); + } + + private static Element[] getChildElements(Element parent) { + ArrayList a = new ArrayList(); + NodeList children = parent.getChildNodes(); +- for( int i=0; i + } + +- if( nlst.getLength()==0 ) { ++ if (nlst.getLength() == 0) { + reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(expression)); + return null; // abort + } + +- if( nlst.getLength()!=1 ) { ++ if (nlst.getLength() != 1) { + reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(expression, nlst.getLength())); + return null; // abort + } + + Node rnode = nlst.item(0); +- if(!(rnode instanceof Element )) { ++ if (!(rnode instanceof Element)) { + reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(expression)); + return null; // abort + } +@@ -267,9 +286,9 @@ + /** + * Moves JAXWS customizations under their respective target nodes. + */ +- private void move( Element bindings, Map targetNodes ) { ++ private void move(Element bindings, Map targetNodes) { + Node target = targetNodes.get(bindings); +- if(target==null) ++ if (target == null) + // this must be the result of an error on the external binding. + // recover from the error by ignoring this node + return; +@@ -277,27 +296,27 @@ + Element[] children = DOMUtils.getChildElements(bindings); + + for (Element item : children) { +- if ("bindings".equals(item.getLocalName())){ +- // process child recursively ++ if ("bindings".equals(item.getLocalName())) { ++ // process child recursively + move(item, targetNodes); +- }else if(isGlobalBinding(item)){ ++ } else if (isGlobalBinding(item)) { + target = targetNodes.get(item); +- moveUnder(item,(Element)target); +- }else { ++ moveUnder(item, (Element) target); ++ } else { + if (!(target instanceof Element)) { + return; // abort + } + // move this node under the target +- moveUnder(item,(Element)target); ++ moveUnder(item, (Element) target); + } + } + } + +- private boolean isJAXBBindingElement(Element e){ ++ private boolean isJAXBBindingElement(Element e) { + return fixNull(e.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXB_BINDINGS); + } + +- private boolean isJAXWSBindingElement(Element e){ ++ private boolean isJAXWSBindingElement(Element e) { + return fixNull(e.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS); + } + +@@ -304,25 +323,22 @@ + /** + * Moves the "decl" node under the "target" node. + * +- * @param decl +- * A JAXWS customization element (e.g., <JAXWS:class>) +- * +- * @param target +- * XML wsdl element under which the declaration should move. +- * For example, <xs:element> ++ * @param decl A JAXWS customization element (e.g., <JAXWS:class>) ++ * @param target XML wsdl element under which the declaration should move. ++ * For example, <xs:element> + */ +- private void moveUnder( Element decl, Element target ) { ++ private void moveUnder(Element decl, Element target) { + + //if there is @node on decl and has a child element jaxb:bindings, move it under the target + //Element jaxb = getJAXBBindingElement(decl); +- if(isJAXBBindingElement(decl)){ ++ if (isJAXBBindingElement(decl)) { + //add jaxb namespace declaration +- if(!target.hasAttributeNS(Constants.NS_XMLNS, "jaxb")){ ++ if (!target.hasAttributeNS(Constants.NS_XMLNS, "jaxb")) { + target.setAttributeNS(Constants.NS_XMLNS, "xmlns:jaxb", JAXWSBindingsConstants.NS_JAXB_BINDINGS); + } + + //add jaxb:bindings version info. Lets put it to 1.0, may need to change latter +- if(!target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "version")){ ++ if (!target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "version")) { + target.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:version", JAXWSBindingsConstants.JAXB_BINDING_VERSION); + } + +@@ -334,7 +350,7 @@ + // it can't support user-defined extensions. This needs more careful thought. + + //JAXB doesn't allow writing jaxb:extensionbindingPrefix anywhere other than root element so lets write only on +- if(target.getLocalName().equals("schema") && target.getNamespaceURI().equals(Constants.NS_XSD)&& !target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "extensionBindingPrefixes")){ ++ if (target.getLocalName().equals("schema") && target.getNamespaceURI().equals(Constants.NS_XSD) && !target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "extensionBindingPrefixes")) { + target.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:extensionBindingPrefixes", "xjc"); + target.setAttributeNS(Constants.NS_XMLNS, "xmlns:xjc", JAXWSBindingsConstants.NS_XJC_BINDINGS); + } +@@ -342,9 +358,9 @@ + //insert xs:annotation/xs:appinfo where in jaxb:binding will be put + target = refineSchemaTarget(target); + copyInscopeNSAttributes(decl); +- }else if(isJAXWSBindingElement(decl)){ ++ } else if (isJAXWSBindingElement(decl)) { + //add jaxb namespace declaration +- if(!target.hasAttributeNS(Constants.NS_XMLNS, "JAXWS")){ ++ if (!target.hasAttributeNS(Constants.NS_XMLNS, "JAXWS")) { + target.setAttributeNS(Constants.NS_XMLNS, "xmlns:JAXWS", JAXWSBindingsConstants.NS_JAXWS_BINDINGS); + } + +@@ -351,59 +367,59 @@ + //insert xs:annotation/xs:appinfo where in jaxb:binding will be put + target = refineWSDLTarget(target); + copyInscopeNSAttributes(decl); +- }else{ ++ } else { + return; + } + + // finally move the declaration to the target node. +- if( target.getOwnerDocument()!=decl.getOwnerDocument() ) { ++ if (target.getOwnerDocument() != decl.getOwnerDocument()) { + // if they belong to different DOM documents, we need to clone them +- decl = (Element)target.getOwnerDocument().importNode(decl,true); ++ decl = (Element) target.getOwnerDocument().importNode(decl, true); + + } + +- target.appendChild( decl ); ++ target.appendChild(decl); + } + + /** +- * Copy in-scope namespace declarations of the decl node +- * to the decl node itself so that this move won't change +- * the in-scope namespace bindings. ++ * Copy in-scope namespace declarations of the decl node ++ * to the decl node itself so that this move won't change ++ * the in-scope namespace bindings. + */ +- private void copyInscopeNSAttributes(Element e){ ++ private void copyInscopeNSAttributes(Element e) { + Element p = e; + Set inscopes = new HashSet(); +- while(true) { ++ while (true) { + NamedNodeMap atts = p.getAttributes(); +- for( int i=0; i mexWsdls = serviceDescriptor.getWSDLs(); + List mexSchemas = serviceDescriptor.getSchemas(); + Document root = null; +@@ -220,8 +232,8 @@ + } + } + NodeList nl = doc.getDocumentElement().getElementsByTagNameNS(WSDLConstants.NS_WSDL, "import"); +- if (nl.getLength() > 0) { +- Element imp = (Element) nl.item(0); ++ for(int i = 0; i < nl.getLength(); i++){ ++ Element imp = (Element) nl.item(i); + String loc = imp.getAttribute("location"); + if (loc != null) { + if (!externalReferences.contains(loc)) +@@ -247,6 +259,6 @@ + //TODO:handle SAXSource + //TODO:handler StreamSource + } +- return root; ++ return root.getDocumentElement(); + } + } +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java Tue Aug 4 09:30:24 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java Tue Aug 4 09:30:24 2009 +@@ -2,7 +2,7 @@ + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +-/* ++ /* + * Portions Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * +@@ -29,6 +29,22 @@ + * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC. + */ + ++/* ++ * Copyright 1999-2004 The Apache Software Foundation. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.xml.internal.bind.v2.WellKnownNamespace; +@@ -47,21 +63,6 @@ + this.e = e; + } + +- /* +- * Copyright 1999-2004 The Apache Software Foundation. +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ + public String getNamespaceURI(String prefix) { + Node parent = e; + String namespace = null; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java Tue Aug 4 09:30:26 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java Tue Aug 4 09:30:26 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.tools.internal.ws.resources.WsdlMessages; +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java Tue Aug 4 09:30:28 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java Tue Aug 4 09:30:28 2009 +@@ -22,9 +22,6 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +-/* +- * $Id: W3CAddressingExtensionHandler.java,v 1.1.2.9 2007/02/06 00:33:38 kohsuke Exp $ +- */ + + package com.sun.tools.internal.ws.wsdl.parser; + +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java Tue Aug 4 09:30:31 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java Tue Aug 4 09:30:30 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.tools.internal.ws.wsdl.document.WSDLConstants; +@@ -56,9 +55,14 @@ + //TODO: add support for importing schema using wsdl:import + } + return atts.getValue("location"); +- }else if(SchemaConstants.NS_XSD.equals(nsURI) && "import".equals(localName)){ ++ } ++ /* ++ We don't need to do this anymore, JAXB handles the schema imports, includes etc. ++ ++ else if(SchemaConstants.NS_XSD.equals(nsURI) && "import".equals(localName)){ + return atts.getValue("schemaLocation"); + } ++ */ + return null; + } + } +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java Tue Aug 4 09:30:33 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java Tue Aug 4 09:30:32 2009 +@@ -29,9 +29,8 @@ + import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensionHandler; + import com.sun.tools.internal.ws.resources.WsdlMessages; + import com.sun.tools.internal.ws.util.xml.XmlUtil; +-import com.sun.tools.internal.ws.wscompile.ErrorReceiver; +-import com.sun.tools.internal.ws.wscompile.WsimportOptions; + import com.sun.tools.internal.ws.wscompile.ErrorReceiverFilter; ++import com.sun.tools.internal.ws.wscompile.WsimportOptions; + import com.sun.tools.internal.ws.wsdl.document.Binding; + import com.sun.tools.internal.ws.wsdl.document.BindingFault; + import com.sun.tools.internal.ws.wsdl.document.BindingInput; +@@ -68,11 +67,11 @@ + import org.xml.sax.Locator; + import org.xml.sax.SAXException; + ++import java.io.IOException; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.Iterator; + import java.util.Map; +-import java.io.IOException; + + /** + * A parser for WSDL documents. This parser is used only at the tool time. +@@ -135,7 +134,7 @@ + // parse external binding files + for (InputSource value : options.getWSDLBindings()) { + errReceiver.pollAbort(); +- Document root = forest.parse(value, true); // TODO: I think this should be false - KK ++ Document root = forest.parse(value, false); + if(root==null) continue; // error must have been reported + Element binding = root.getDocumentElement(); + if (!fixNull(binding.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) +@@ -168,7 +167,7 @@ + private WSDLDocument buildWSDLDocument(){ + /** + * Currently we are working off first WSDL document +- * TODO: add support of creating WSDLDocument from collection of WSDL documents ++ * TODO: add support of creating WSDLDocument from fromjava.collection of WSDL documents + */ + + String location = forest.getRootWSDL(); +--- old/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java Tue Aug 4 09:30:35 2009 ++++ new/src/share/classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java Tue Aug 4 09:30:35 2009 +@@ -24,7 +24,6 @@ + */ + + +- + package com.sun.tools.internal.ws.wsdl.parser; + + import com.sun.xml.internal.bind.WhiteSpaceProcessor; +--- old/src/share/classes/com/sun/tools/internal/xjc/Driver.java Tue Aug 4 09:30:37 2009 ++++ new/src/share/classes/com/sun/tools/internal/xjc/Driver.java Tue Aug 4 09:30:37 2009 +@@ -24,6 +24,7 @@ + */ + package com.sun.tools.internal.xjc; + ++import java.io.File; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.OutputStream; +@@ -101,7 +102,7 @@ + + private static void _main( String[] args ) throws Exception { + try { +- System.exit(run( args, System.err, System.out )); ++ System.exit(run( args, System.out, System.out )); + } catch (BadCommandLineException e) { + // there was an error in the command line. + // print usage and abort. +@@ -240,6 +241,8 @@ + listener.message(Messages.format(Messages.PARSING_SCHEMA)); + } + ++ final boolean[] hadWarning = new boolean[1]; ++ + ErrorReceiver receiver = new ErrorReceiverFilter(listener) { + public void info(SAXParseException exception) { + if(opt.verbose) +@@ -246,6 +249,7 @@ + super.info(exception); + } + public void warning(SAXParseException exception) { ++ hadWarning[0] = true; + if(!opt.quiet) + super.warning(exception); + } +@@ -367,6 +371,15 @@ + assert false; + } + ++ if(opt.debugMode) { ++ try { ++ new FileOutputStream(new File(opt.targetDir,hadWarning[0]?"hadWarning":"noWarning")).close(); ++ } catch (IOException e) { ++ receiver.error(e); ++ return -1; ++ } ++ } ++ + return 0; + } catch( StackOverflowError e ) { + if(opt.verbose) +--- old/src/share/classes/com/sun/tools/internal/xjc/Language.java Tue Aug 4 09:30:40 2009 ++++ new/src/share/classes/com/sun/tools/internal/xjc/Language.java Tue Aug 4 09:30:39 2009 +@@ -22,6 +22,7 @@ + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ ++ + package com.sun.tools.internal.xjc; + + /** +--- old/src/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties Tue Aug 4 09:30:42 2009 ++++ new/src/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties Tue Aug 4 09:30:41 2009 +@@ -24,20 +24,20 @@ + # + + ConsoleErrorReporter.UnknownLocation = \ +- unknown location +- ++ unknown location ++ + ConsoleErrorReporter.LineXOfY = \ +- \ \ line {0} of {1} ++ \ \ line {0} of {1} + + ConsoleErrorReporter.UnknownFile = \ +- unknown file +- ++ unknown file ++ + Driver.Private.Usage = \ + Usage: xjc [-options ...] ... [-b ] ...\n\ + If dir is specified, all schema files in it will be compiled.\n\ + If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.\n\ + Options:\n\ +-\ \ -debug : run in the debug mode\n\ ++\ \ -debug : run in debug mode (includes -verbose)\n\ + \ \ -nv : do not perform strict validation of the input schema(s)\n\ + \ \ -extension : allow vendor extensions - do not strictly follow the\n\ + \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Compatibility Rules and App E.2 from the JAXB Spec\n\ +@@ -106,27 +106,30 @@ + Driver.AddonUsage = \nExtensions: + + Driver.ExperimentalLanguageWarning = \ +- Are you trying to compile {0}? Support for {0} is experimental. \ +- You may enable it by using the {1} option. ++ Are you trying to compile {0}? Support for {0} is experimental. \ ++ You may enable it by using the {1} option. + + Driver.NonExistentDir = \ + cowardly refuses to write to a non-existent directory "{0}" +- ++ + Driver.MissingRuntimePackageName = \ +- the -use-runtime option is missing a package name +- ++ the -use-runtime option is missing a package name ++ + Driver.MissingModeOperand = \ +- the -mode option is missing an operand +- ++ the -mode option is missing an operand ++ + Driver.MissingCompatibilityOperand = \ +- the -compatibility option is missing an operand ++ the -compatibility option is missing an operand + ++Driver.MissingOperand = \ ++ an operand is missing ++ + Driver.MissingProxyHost = \ +- either the -host option is missing an operand \n\ ++ either the -host option is missing an operand \n\ + or -port was specified but not -host +- ++ + Driver.MissingProxyPort = \ +- either the -port option is missing an operand \n\ ++ either the -port option is missing an operand \n\ + or -host was specified but not -port + + Driver.ILLEGAL_PROXY = \ +@@ -145,77 +148,80 @@ + "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort + + Driver.UnrecognizedMode = \ +- unrecognized mode {0} ++ unrecognized mode {0} + + Driver.UnrecognizedParameter = \ +- unrecognized parameter {0} +- ++ unrecognized parameter {0} ++ + Driver.MissingGrammar = \ +- grammar is not specified ++ grammar is not specified + + Driver.NotABindingFile = \ +- not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxb'}'bindings but it is '{'{0}'}'{1} +- ++ not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxb'}'bindings but it is '{'{0}'}'{1} ++ + Driver.ParsingSchema = \ +- parsing a schema... +- ++ parsing a schema... ++ + Driver.ParseFailed = \ +- Failed to parse a schema. ++ Failed to parse a schema. + + Driver.StackOverflow = \ +- Stack overflow. Either you are compiling a large schema that requires more resource, or \ +- XJC has a bug. First, please extend the stack size by using the -Xss JVM option. If this \ +- doesn'''t solve the problem, please use the -debug option to obtain the stack trace and \ +- contact Sun. +- ++ Stack overflow. Either you are compiling a large schema that requires more resources, or \ ++ XJC has a bug. First, please extend the stack size by using the -Xss JVM option. If this \ ++ doesn'''t solve the problem, please use the -debug option to obtain the stack trace and \ ++ contact Sun. ++ + Driver.CompilingSchema = \ +- compiling a schema... ++ compiling a schema... + + Driver.FailedToGenerateCode = \ +- Failed to produce code. ++ Failed to produce code. + +-# DO NOT localize the JAXB 2.1.3 in JDK string - it is a token for an ant ++# DO NOT localize the JAXB 2.1.10 string - it is a token for an ant + Driver.FilePrologComment = \ +- This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK \n\ +- See http://java.sun.com/xml/jaxb \n\ +- Any modifications to this file will be lost upon recompilation of the source schema. \n\ +- Generated on: {0} \n ++ This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 \n\ ++ See http://java.sun.com/xml/jaxb \n\ ++ Any modifications to this file will be lost upon recompilation of the source schema. \n\ ++ Generated on: {0} \n + + Driver.Version = \ +- xjc version "JAXB 2.1.3" \n\ +- JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.3 in JDK) ++ xjc version "JAXB 2.1.10" \n\ ++ JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10) + +-Driver.BuildID = JAXB 2.1.3 in JDK +- ++Driver.BuildID = JAXB 2.1.10 ++ ++# for JDK integration - include version in source zip ++jaxb.jdk.version=2.1.10 ++ + # see java.text.SimpleDateFormat for format syntax + Driver.DateFormat = \ +- yyyy.MM.dd ++ yyyy.MM.dd + + # see java.text.SimpleDateFormat for format syntax + Driver.TimeFormat = \ +- hh:mm:ss a z ++ hh:mm:ss a z + +-# as in: "generated on at